11.03.2010, 15:19
Bump
I mean like a global variable storing deaths and kills (I can make that by my self)
Then something finding wich player who had the biggest value in deaths or kills.
I mean like a global variable storing deaths and kills (I can make that by my self)
Then something finding wich player who had the biggest value in deaths or kills.
pawn Код:
enum Data
{
Deaths,
Kills,
};
new Info[MAX_PLAYERS][Data];
public OnPlayerDeath(playerid, killerid, reason)
{
Info[playerid][Deaths]++;
Info[killerid][Kills]++;
return 1;
}
public OnRoundEnd()//Yes this is my own callback...
{
new mKills;
new mDeaths;
for(new i=0; MAX_PLAYERS; i++)
{
GetMostKills(i, mKills, pName);//Getting the player who had the most kills by all players then storing most kills into mKills and the player with the most kills name in pName
GetMostDeaths(i, mDeaths, pName);
format(str, sizeof(str), "%s had most kills for this round! (Kills: 1337)", pName, mKills);
SendClientMessageToAll(red, str);
format(str, sizeof(str), "%s had most deaths for this round! (Deaths: 1337)", pName, mDeaths);
SendClientMessageToAll(red, str);
}
return 1;
}