04.08.2010, 23:20
(
Последний раз редактировалось Kitten; 24.11.2013 в 04:54.
)
Solved
new randomplayer = Itter_Random(Player);
public RandomPlayer()
{
for(new i=0; i != MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new rand = random(2);
if(rand == 1)
{
SendClientMessage(i, 0xFAFFFF0, "You have been randomly chosen!");
break;
}
else continue;
}
}
return 1;
}
new playaz[MAX_PLAYERS], count;
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
playaz[count] = i;
count++;
}
}
new rand = playaz[random(count)];
stock GetRandomPlayer()
{
new playaz[MAX_PLAYERS], count;
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
playaz[count] = i;
count++;
}
}
return playaz[random(count)];
}