21.07.2013, 01:35
pawn Код:
stock GetHighestKills() // it will return the id of highest kills
{
new id = -1;
new id2;
for(new i = 0;i < MAX_PLAYERS)
{
if(IsPlayerConnected(i))
{
id2 = PlayerInfo[playerid][pKill];
if(id2 > id && id != -1)
{
id = i;
}
}
}
return id; //if the was was empty it will return to -1; which you can say its INVALID PLAYER ID
}