Kills and deaths
#2

You can declare 2 global variables for every player (or PVars) of which values are set by the OnPlayerDeath callback. This example I've created is uses PVars:

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)  {
   SetPVarInt(playerid, "Deaths", GetPVarInt(playerid, "Deaths")+1);
   SetPVarInt(killerid, "Kills", GetPVarInt(killerid, "Kills")+1);
   return 1;
}
Then you can use the following code:
pawn Код:
format(string, sizeof(string), "[Kills]%d [Deaths]%d", GetPVarInt(ID, "Kills"), GetPVarInt(ID, "Deaths"));
SendClientMessage(ID, green, string);
Reply


Messages In This Thread
Kills and deaths - by emokidx - 28.07.2011, 12:03
Re: Kills and deaths - by Calgon - 28.07.2011, 12:06
Re: Kills and deaths - by emokidx - 28.07.2011, 12:10
Re: Kills and deaths - by Calgon - 28.07.2011, 12:13
Re: Kills and deaths - by emokidx - 28.07.2011, 12:15

Forum Jump:


Users browsing this thread: 1 Guest(s)