27.01.2014, 16:15
I will give you the idea:
on rand = random( 4 ), (change the 4 to number object of random you wish)
on the cases instead of objectid set the number of your object for the random.
On your top of your script
then on your code:
SetPlayerAttachedObject(playerid, index, myobject, bla bla bla bla..); // myobject is your random objects number
Hope it helps D:
on rand = random( 4 ), (change the 4 to number object of random you wish)
on the cases instead of objectid set the number of your object for the random.
On your top of your script
Quote:
new rand = random( 4 ), myobject ; switch( rand ) { case 0: objectid; case 1: objectid: case 2: objectid; case 3: objectid; } |
SetPlayerAttachedObject(playerid, index, myobject, bla bla bla bla..); // myobject is your random objects number
Hope it helps D: