09.03.2011, 20:24
Код:
stock GetPlayerNumber(numero)
{
for(new i = 0; i <= GetMaxPlayers(); i++)
{
if(PlayerInfo[i][CellNumber] == numero) return i; // Playerinfo[i][Cellnumber] is where you store the cell number of each player
}
return INVALID_PLAYER_ID;
}
Also, it's more efficient to use GetMaxPlayers instead of looping 500 times when the maximum your server allows is, say 100.

