Castillo Posted March 25, 2013 Share Posted March 25, 2013 Create a table with the weapons you want to give, then use: math.random giveWeapon onPlayerSpawn Link to comment
GamerDeMTA Posted March 25, 2013 Author Share Posted March 25, 2013 How to create a table with the weapons?? Sorry for my ignorance =C Link to comment
50p Posted March 25, 2013 Share Posted March 25, 2013 local weapons = { 12, 14, 15, 20, 30, 31 } addEventHandler( "onPlayerSpawn", root, function ( ) giveWeapon( source, weapons[ math.random( #weapons ) ] ) ); end ) Link to comment
GamerDeMTA Posted March 25, 2013 Author Share 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 Link to comment
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