Jacobob14 Posted February 17, 2014 Posted February 17, 2014 is possible that players have different fighting styles every time you spawn
Castillo Posted February 17, 2014 Posted February 17, 2014 Yes, it is. local styles = { 4, 5, 6, 7, 15, 16 } addEventHandler ( "onPlayerSpawn", root, function ( ) setPedFightingStyle ( source, styles [ math.random ( #styles ) ] ) end )
Jacobob14 Posted February 17, 2014 Author Posted February 17, 2014 Yes, it is. local styles = { 4, 5, 6, 7, 15, 16 } addEventHandler ( "onPlayerSpawn", root, function ( ) setPedFightingStyle ( source, styles [ math.random ( #styles ] ) ) end ) o thanks solid go to try right now
Moderators Citizen Posted February 17, 2014 Moderators Posted February 17, 2014 @Solidsnake: You made a typo, swap the ] and the ) for math.random
Moderators Citizen Posted February 17, 2014 Moderators Posted February 17, 2014 error http://prntscr.com/2t70yu Did you even read what I just said ? I just said how to fix it ...
Jacobob14 Posted February 17, 2014 Author Posted February 17, 2014 I corrected but I keep throwing error
Moderators Citizen Posted February 17, 2014 Moderators Posted February 17, 2014 Show me how your code looks like now ? What is the error now ?
Jacobob14 Posted February 17, 2014 Author Posted February 17, 2014 I had made a mistake already resolved thanks you very much for your help
Castillo Posted February 17, 2014 Posted February 17, 2014 @Solidsnake: You made a typo, swap the ] and the ) for math.random Woops, fixed. @Jacob: You're welcome.
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