30.10.2012, 16:37
Hello, I want to do a betting system with random places but I need some help at choising them random. How can I make the places to be random and not to repeat ? (6 places)
new Float:RandomSpawns[][] =
{
{ x , y , z , angle },
{ x , y , z , angle },
{ x , y , z , angle },
{ x , y , z , angle },
{ x , y , z , angle },
{ x , y , z , angle }
};
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);