28.07.2011, 12:06
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:
Then you can use the following code:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason) {
SetPVarInt(playerid, "Deaths", GetPVarInt(playerid, "Deaths")+1);
SetPVarInt(killerid, "Kills", GetPVarInt(killerid, "Kills")+1);
return 1;
}
pawn Код:
format(string, sizeof(string), "[Kills]%d [Deaths]%d", GetPVarInt(ID, "Kills"), GetPVarInt(ID, "Deaths"));
SendClientMessage(ID, green, string);