18.03.2012, 02:32
you dont need a 2d array for this,
the reason the wiki using one is each row is storing 3 values...
so code like this should work,
it wont seam very random with just 3 values however
there is a 33.333333333% chance that each car will be called
hope this helps,
the reason the wiki using one is each row is storing 3 values...
so code like this should work,
pawn Код:
new RandomVehicles[] =
{
404,
401,
405
};
new rand = random(sizeof(RandomVehicles));
AddStaticVehicleEx(RandomVehicles[rand],-901.9831,2687.4890,42.4714,43.9074,-1,0,60000); // RandCar1
random(sizeof(RandomVehicles));
AddStaticVehicleEx(RandomVehicles[rand],-901.9831,2687.4890,42.4714,43.9074,-1,0,60000); // RandCar2
random(sizeof(RandomVehicles));
AddStaticVehicleEx(RandomVehicles[rand],-901.9831,2687.4890,42.4714,43.9074,-1,0,60000); // RandCar3
there is a 33.333333333% chance that each car will be called
hope this helps,