Irgendwie passiert wenn der Spieler stirbt überhaupt nichts.. woran liegt das, kann es an 0.3x liegen? if(GetPVarInt(killerid,"Fraktion")==2)
{
if(GetPlayerWantedLevel(playerid)==0)return 1;
SetPlayerPos(playerid,219.7151,111.1871,999.0156);
SetPlayerInterior(playerid,6);
SendClientMessage(playerid,ROT,"Ein Polizist hat dich getötet!Du bist nun im Gefängnis!");
SendClientMessage(killerid,BLAU,"Du hast den Verbrecher erfolgreich getötet und in das Gefängnis gesteckt!");
if(GetPlayerWantedLevel(playerid)==1)
{
GivePlayerMoney(killerid,500);
GivePlayerMoney(playerid,-500);
SetPVarInt(playerid,"knasttime",120);
}
if(GetPlayerWantedLevel(playerid)==2)
{
GivePlayerMoney(killerid,1000);
GivePlayerMoney(playerid,-1000);
SetPVarInt(playerid,"knasttime",240);
}
if(GetPlayerWantedLevel(playerid)==3)
{
GivePlayerMoney(killerid,1500);
GivePlayerMoney(playerid,-1500);
SetPVarInt(playerid,"knasttime",360);
}
if(GetPlayerWantedLevel(playerid)==4)
{
GivePlayerMoney(killerid,2000);
GivePlayerMoney(playerid,-2000);
SetPVarInt(playerid,"knasttime",480);
}
if(GetPlayerWantedLevel(playerid)==5)
{
GivePlayerMoney(killerid,2500);
GivePlayerMoney(playerid,-2500);
SetPVarInt(playerid,"knasttime",600);
}
if(GetPlayerWantedLevel(playerid)==6)
{
GivePlayerMoney(killerid,3000);
GivePlayerMoney(playerid,-3000);
SetPVarInt(playerid,"knasttime",720);
}
if(GetPlayerWantedLevel(playerid)==7)
{
GivePlayerMoney(killerid,3500);
GivePlayerMoney(playerid,-3500);
SetPVarInt(playerid,"knasttime",840);
}
if(GetPlayerWantedLevel(playerid)==8)
{
GivePlayerMoney(killerid,4000);
GivePlayerMoney(playerid,-4000);
SetPVarInt(playerid,"knasttime",960);
}
if(GetPlayerWantedLevel(playerid)==9)
{
GivePlayerMoney(killerid,4500);
GivePlayerMoney(playerid,-4500);
SetPVarInt(playerid,"knasttime",1080);
}
if(GetPlayerWantedLevel(playerid)==10)
{
GivePlayerMoney(killerid,5000);
GivePlayerMoney(playerid,-5000);
SetPVarInt(playerid,"knasttime",1200);
}
if(GetPlayerWantedLevel(playerid)==11)
{
GivePlayerMoney(killerid,5500);
GivePlayerMoney(playerid,-5500);
SetPVarInt(playerid,"knasttime",1320);
}
if(GetPlayerWantedLevel(playerid)==12)
{
GivePlayerMoney(killerid,6000);
GivePlayerMoney(playerid,-6000);
SetPVarInt(playerid,"knasttime",1440);
}
SetPVarInt(playerid,"knast",1);
SetPlayerWantedLevel(playerid,0);
SetPVarInt(playerid,"wanteds",0);
}Habe keine Errors oder anderes.
OnPlayerDeath wird nicht richtig ausgeführt?
- Jason27993
- Geschlossen
- Erledigt
-
-
versuch mal mit "else if" du hast zu viele "if"
wenns nicht funkt muss ich dann Morgen am PC schaun.
MFG,
Pr0x -
versuch mal mit "else if" du hast zu viele "if"
wenns nicht funkt muss ich dann Morgen am PC schaun.
MFG,
Pr0xWerde es nacher ausprobieren brauche dazu jemand der mit mir es kurz testet werde dir später bescheid geben obs geklappt hat.
-
new wanted=GetPlayerWantedLevel(playerid);
if(!wanted) return 1;
SetPlayerPos(playerid,219.7151,111.1871,999.0156);
SetPlayerInterior(playerid,6);
SendClientMessage(playerid,ROT,"Ein Polizist hat dich getötet!Du bist nun im Gefängnis!");
SendClientMessage(killerid,BLAU,"Du hast den Verbrecher erfolgreich getötet und in das Gefängnis gesteckt!");
GivePlayerMoney(killerid,500*wanted);
GivePlayerMoney(playerid,-(500*wanted));
SetPVarInt(playerid,"knasttime",120*wanted);
SetPVarInt(playerid,"knast",1);
SetPlayerWantedLevel(playerid,0);
SetPVarInt(playerid,"wanteds",0); -
breadfish.de
Hat das Thema geschlossen.