Tunner Posted September 1, 2012 Share Posted September 1, 2012 So I use this script and I got error: attempt to call global "createWeapon" (a nil value). Changing "weapon =" to "local weapon =" doesnt help, changing m4 to 21 doesnt help either. anyone got a clue? function crtwpn() weapon = createWeapon ( M4, 25.5, 1523.0930908203, 12.705202865601 ) end addCommandHandler ( "weapon", crtwpn) THX Link to comment
scratcher911 Posted September 1, 2012 Share Posted September 1, 2012 function crtwpn() weapon = createWeapon ( "M4", 25.5, 1523.0930908203, 12.705202865601 ) end addCommandHandler ( "weapon", crtwpn) and be sure that is client side. Link to comment
Castillo Posted September 1, 2012 Share Posted September 1, 2012 1: Make sure your server version is at least: 1.3.0 r4557. 2: Make sure your script is set as client side. 3: The weapon must be set as string, so it's "M4", not M4. Link to comment
Tunner Posted September 1, 2012 Author Share Posted September 1, 2012 Thanks for the fast reply. It was clientside alright, but I didnt have the "M4" thing. So I changed it, but it sitll doesnt work. Ive got the latest nightly (the one MTA kept annyoing with when i ran it). In the console it says it is 1.3.0 r4550, so I guess ill need to update to make it work. Link to comment
Tunner Posted September 1, 2012 Author Share Posted September 1, 2012 Excellent! Thank you very much guys. I updated to the very newest version of MTA and it worked. Well, I had to add after updating it to the meta to make it start (which is weird) but it works now. Thanks again. 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