SA-MP Forums Archive
Not working. Is this is correct? - 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)
+--- Thread: Not working. Is this is correct? (/showthread.php?tid=531096)



Not working. Is this is correct? - krytans - 10.08.2014

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(playerid > MAX_PLAYERS || issuerid > MAX_PLAYERS || playerid == INVALID_PLAYER_ID || issuerid == INVALID_PLAYER_ID) return 1;
if(PlayerInfo[playerid][pMember] == 8 && weaponid == 34 && bodypart == 9)
    {
        SetPlayerHealth(playerid, 0.0);
    }
return 1;
}
its a part of the code. This function only not working.


Re: Not working. Is this is correct? - Twizted - 10.08.2014

What exactly are you trying to do by checking playerid > MAX_PLAYERS || issuerid > MAX_PLAYERS?


Re: Not working. Is this is correct? - Kaperstone - 10.08.2014

Probably because PlayerInfo[playerid][pMember] isn't equal to 8