Shockboy23 Posted October 22, 2014 Share Posted October 22, 2014 In the MTA wiki page it says: "This example makes the silenced pistol dual wielded at pro skill level" and then this "example" is shown. setWeaponProperty(23, "pro", "flags", 0x000800) -- Warning - Depends on the current flag setting setWeaponProperty(23, "pro", "flags", 0x000002) -- Warning - Depends on the current flag setting setWeaponProperty(23, "pro", "maximum_clip_ammo", 34) I tried it with a command, make a function, It dind't worked. Can somebody give me a pre-made script, that makes the weapon "Silenced" (ID 23) "wieldable" at Pro skill level? I'm actually new in these kind of thigs, please, help me! Link to comment
-.Paradox.- Posted October 22, 2014 Share Posted October 22, 2014 Post what you tried Link to comment
Shockboy23 Posted October 22, 2014 Author Share Posted October 22, 2014 I deleted what i tried, it was a stupid try... like I said I'm new in those kind of things. Link to comment
Shockboy23 Posted October 23, 2014 Author Share Posted October 23, 2014 I fixed it. Just a mistake in meta.xml Here it is. function dualSilenced() setWeaponProperty(23, "pro", "flags", 0x000800) setWeaponProperty(23, "pro", "flags", 0x000002) setWeaponProperty(23, "pro", "maximum_clip_ammo", 34) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "dualsilenced", dualSilenced ) Feel free to use it, everybody. Link to comment
-.Paradox.- Posted October 23, 2014 Share Posted October 23, 2014 Why this? addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) Link to comment
Shockboy23 Posted October 23, 2014 Author Share Posted October 23, 2014 Took it from one my my old resources, because I tried A LOT of things. (Good scripts) and dind't worked. I ended up trying my old scripts, replacing what function does with "setWeaponProperty(23, "pro", "flags", 0x000800) setWeaponProperty(23, "pro", "flags", 0x000002) setWeaponProperty(23, "pro", "maximum_clip_ammo", 34)"... Yes... Link to comment
-.Paradox.- Posted October 23, 2014 Share Posted October 23, 2014 function dualSilenced( ) setWeaponProperty(23,"pro","flags",0x000800) setWeaponProperty(23,"pro","flags",0x000002) setWeaponProperty(23,"pro","flags",0x000008) setWeaponProperty(23,"pro","maximum_clip_ammo",34) end addCommandHandler("dualsilenced", dualSilenced) This should work 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