SA-MP Forums Archive
OnPlayerDeath Issues - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerDeath Issues (/showthread.php?tid=152652)



OnPlayerDeath Issues - king s dm - 05.06.2010

Hello!
I'm experiencing issues with OnPlayerDeath callback. Namely, server constantly doesn't reach one point in this callback.
I don't know how to explain it to you, so I'll post what is going on.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if () // For example, here I have reason == 255
    {
        return 1;
    }

    if () // Here I have gTeam[playerid] == gTeam[killerid]
    {
        retrurn 1;
    }

    printf("debug"); // This point will not be reached, and I'll not get "debug" message, I'm not sure why is this happening
    return 1;
}



Re: OnPlayerDeath Issues - king s dm - 05.06.2010

Ok, I got a solution
I put "return 1;" at the end of every if statement lol, and that was a problem.. now I removed it and it works