deaths not counting - 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: deaths not counting (
/showthread.php?tid=149241)
deaths not counting -
iStarzz - 21.05.2010
I have this in my script:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
GivePlayerMoney(killerid, 500);
pInfo[killerid][kills]++;
pInfo[playerid][deaths]++;
return 1;
}
But when a player types /kill or just dies it doesn't count :S it stays at 0
Re: deaths not counting -
Mr L - 21.05.2010
Use this:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
GivePlayerMoney(killerid, 500);
pInfo[playerid][pDeaths] += 1;
pInfo[killerid][pKills] += 1;
return 1;
}
Re: deaths not counting -
Calgon - 21.05.2010
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if( killerid != INVALID_PLAYER_ID )
{
GivePlayerMoney(killerid, 500);
pInfo[killerid][kills]++;
}
pInfo[playerid][deaths]++;
return 1;
}
That's not really going to change much, but yeah.
Re: deaths not counting -
iStarzz - 21.05.2010
Thanks, it worked