OnPlayerDeath wird nicht richtig ausgeführt?

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • 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.

  • 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);