SA-MP Forums Archive
Nvm Solved - 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: Nvm Solved (/showthread.php?tid=134324)



Nvm Solved - aircombat - 16.03.2010

Nvm Solved


Re: need help urgently plz - biltong - 16.03.2010

At top of script:
pawn Код:
new Deaths[MAX_PLAYERS];
new Kills[MAX_PLAYERS];
forward SetKills(killerid);
Then under OnPlayerDeath
pawn Код:
Deaths[playerid]+=1;
Anywhere in script:
pawn Код:
public SetKills(killerid)
{
  if(killerid == INVALID_PLAYER_ID) return 1;
  else Kills[killerid]+=1;
  return 1;
}
Then under OnPlayerDisconnect(playerid,reason)
pawn Код:
Deaths[playerid] = 0;
  Kills[playerid] = 0;
UNTESTED

Note that this only stores their kills and deaths, it doesn't display them anywhere.


Re: Nvm Solved - aircombat - 16.03.2010

nvm solved , thnx anyways