SA-MP Forums Archive
Random Selecting Numbers - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Random Selecting Numbers (/showthread.php?tid=166644)



Random Selecting Numbers - Kyle - 09.08.2010

I got these numbers.

pawn Код:
new VehicleIDs[] =
{
400,401,405,410,411,412,413,
419,421,426,429,434,439,445,
458,459,468,474,475,477,478,
482,489,492,496,500,505,507,
517,526,535,542,545,546,549,
550,555,561,566,575,576,579,
};
And what I want to do is randomly select one of THOSE numbers above.

Reguards.


Re: Random Selecting Numbers - selten98 - 09.08.2010

i use this:
pawn Код:
AddStaticVehicle(VehileIDs[random(sizeof(VehileIDs))],x,y,z,a,c1,c2);



Re: Random Selecting Numbers - Kyle - 09.08.2010

Thanks alot