Jump to content

createWeapon error


Tunner

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...