16.03.2012, 19:34
(
Последний раз редактировалось Psymetrix; 16.03.2012 в 19:41.
Причина: Small changes
)
pawn Код:
stock GetHighestKills()
{
new kills, player = INVALID_PLAYER_ID;
for (new i, j = GetMaxPlayers(); i < j; i++)
{
if (IsPlayerConnected(i))
{
if (GetPVarInt(i, "Kills") > kills)
{
player = i;
kills = GetPVarInt(i, "Kills");
}
}
}
return player;
}
pawn Код:
new bestkiller = GetHighestKills();
if (bestkiller != INVALID_PLAYER_ID)
{
// Do something
}