27.07.2014, 22:44
pawn Код:
stock RandomPlayerPato()
{
new OnlineUser[MAX_PLAYERS], ContaPlayers = 0;
for(new i = 0; i <= MAX_PLAYERS; i++)
if(IsPlayerConnected(i))
if(Afk[i] == false)
if(PlayerLogado[i] == true)
if(GetPlayerState(i) != PLAYER_STATE_SPECTATING)
if(GetPlayerVirtualWorld(i) == 0)
if(!PlayerEsc(i))
if(!IsInTrampolim(i))
if(!IsARCvehicle(GetPlayerVehicleID(i)))
if(PlayerInfo[i][tempopreso] == 0)
if(IsPlayerInArea(i,PatoArea))
if(!IsPlayerNPC(i))
OnlineUser[ContaPlayers] = i, ContaPlayers++;
return OnlineUser[random(ContaPlayers)];
}