01.11.2015, 13:10
I am doing a Spectate System with the Derby. It sometimes work, and it sometimes don't.
It also spectates a player which is not on the Derby Round (even though i coded it in the way that the Iter_Random would repeat itself if the return value is a playerid which is not in the Derby Round.)
How can i fix this?
Note; Sorry if i coded it bad or in a way. I am just trying to do the stuffs on my way. <RIP my grammar>
It also spectates a player which is not on the Derby Round (even though i coded it in the way that the Iter_Random would repeat itself if the return value is a playerid which is not in the Derby Round.)
How can i fix this?
PHP код:
new specplayer = Iter_Random(Player);
if(specplayer == playerid)
{
specplayer = Iter_Random(Player);
}
else
{
if(OnDerby[specplayer] == false)
{
specplayer = Iter_Random(Player);
}
else
{
StartSpectate(playerid, specplayer);
}
}