30.08.2014, 09:18
pawn Код:
forward RandomPlayer();
public RandomPlayer()
{
new
ConnectedPlayers[MAX_PLAYERS] = {INVALID_PLAYER_ID, ...},
idx;
for(new i = 0; i != MAX_PLAYERS; ++i)
{
ConnectedPlayers[idx] = i;
idx++;
}
if(!idx)
return INVALID_PLAYER_ID;
GivePlayerMoney(ConnectedPlayers[random(idx),50000]/*it has Random Playerid*/);
return 1;
}
Btw Server slot 150 only
and its not giving to online players