Castillo Posted March 25, 2013 Posted March 25, 2013 Create a table with the weapons you want to give, then use: math.random giveWeapon onPlayerSpawn San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
GamerDeMTA Posted March 25, 2013 Author Posted March 25, 2013 How to create a table with the weapons?? Sorry for my ignorance =C
50p Posted March 25, 2013 Posted March 25, 2013 local weapons = { 12, 14, 15, 20, 30, 31 } addEventHandler( "onPlayerSpawn", root, function ( ) giveWeapon( source, weapons[ math.random( #weapons ) ] ) ); end ) - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
GamerDeMTA Posted March 25, 2013 Author Posted March 25, 2013 local weapons = { 12, 14, 15, 20, 30, 31 } addEventHandler( "onPlayerSpawn", root, function ( ) giveWeapon( source, weapons[ math.random( #weapons ) ] ) ); end ) Thanks 50p
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now