05.03.2010, 08:37
pawn Код:
enum Data
{
Kills,
Deaths,
};
new pInfo[MAX_PLAYERS][Data];
public OnPlayerConnect(playerid)
{
pInfo[playerid][Kills] = 0;
pInfo[playerid][Deaths] = 0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
pInfo[killerid][Kills]++;
pInfo[playerid][Deaths]++;
return 1;
}
pawn Код:
format(str, sizeof(str), "Kills: %s | Deaths: %s", pInfo[playerid][Kills], pInfo[playerid][Deaths]);
Also if you do not use a save system for these stats, it will reset evry time you connect and just show the kills you have after your connect.