What's wrong with my if statement?
#4

Yeah I had a look at the wiki for OnPlayerDeath, and saw that I've been using killerid wrong, -> that caused the bug.

However, when I die now I get frozen and my skin gets reset?
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
    {
        PInfo[killerid][Kills] ++;
        SendDeathMessage(killerid, playerid, reason);
    }

    SetPlayerSkin(playerid, PInfo[playerid][Skin]);
    PInfo[playerid][Deaths] ++;
   
    if(PInfo[playerid][VortexJump] == 1) LeaveVortexGame(playerid);
    if(PInfo[playerid][CaveGame] == 1) LeaveCaveGame(playerid);
    if(PInfo[playerid][Racing] != -1) LeaveRace(playerid, PInfo[playerid][Racing]);
   
    return 1;
}
?
Reply


Messages In This Thread
What's wrong with my if statement? - by knackworst - 10.09.2013, 11:08
Re: What's wrong with my if statement? - by knackworst - 10.09.2013, 11:24
Re: What's wrong with my if statement? - by Konstantinos - 10.09.2013, 11:26
Re: What's wrong with my if statement? - by knackworst - 10.09.2013, 11:37
Re: What's wrong with my if statement? - by Konstantinos - 10.09.2013, 12:02

Forum Jump:


Users browsing this thread: 4 Guest(s)