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
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 )
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