SA-MP Forums Archive
Why OnPlayerDeath doesnt work ? - 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: Why OnPlayerDeath doesnt work ? (/showthread.php?tid=461294)



Why OnPlayerDeath doesnt work ? - bustern - 01.09.2013

My code:
PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    
PlayerInfo[killerid][pKills]++;
    
PlayerInfo[playerid][pDeaths]++;
    
GivePlayerMoney(killerid1000);
    
GameTextForPlayer(playerid"Wasted."50002);
    
GivePlayerMoney(playerid, -500);
    return 
1;

And all doesnt work, player doesnt lose 500 cash when die and doesnt see message....Why ?


Re: Why OnPlayerDeath doesnt work ? - park4bmx - 01.09.2013

check if ur gamemode or FS is returning 0