raptorr Posted August 26, 2013 Posted August 26, 2013 I'm trying to make a Minigun weapon that fire fast like an original minigun in the GTA. I have tried "setWeaponFiringRate()" but it doesn't work. Example: function createMinigunWeapon() local x, y, z = getElementPosition(getLocalPlayer()) weapon = createWeapon("minigun", x, y, z + 1) setWeaponFiringRate(weapon, 100) addEventHandler("onClientPreRender", root, fireMinigun) end addCommandHandler("createminigun", createMinigunWeapon) function fireMinigun() fireWeapon(weapon) end This fire every rendered frame and it's too fast. Please help me solve my problem. Thanks in advance
Moderators IIYAMA Posted August 26, 2013 Moderators Posted August 26, 2013 function createMinigunWeapon() local x, y, z = getElementPosition(getLocalPlayer()) local weapon = createWeapon("minigun", x, y, z + 1) --setWeaponFiringRate(weapon, 100) setWeaponClipAmmo ( weapon,99999) setWeaponState ( weapon,"firing") end addCommandHandler("createminigun", createMinigunWeapon) Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Moderators IIYAMA Posted August 26, 2013 Moderators Posted August 26, 2013 np. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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