-Blaze- Posted September 4, 2015 Posted September 4, 2015 Hey guys, I'm trying to make a script that can regulate the fire rate of various weapons without using ( setWeaponProperty ) , since the fire rate can only be changed on server side, but i want each player to have a different shooting speed. Any methods on how this can be done?
Markeloff Posted September 4, 2015 Posted September 4, 2015 Why don't you use triggerServerEvent? Some people want it to happen, some wish it would happen, others make it happen.
-ffn-python Posted September 4, 2015 Posted September 4, 2015 Client-Side addEventHandler("onClientGUIClick",root, function() if source == ButtonName then triggerServerEvent("example", getLocalPlayer()) end end ) Server-Side addEvent("example") addEventHandler("example",root, function() setWeaponProperty(22, "poor", "weapon_range", 70) end ) Are You Find Scripter ? Contact Me Web Skype:Click To Skype
JR10 Posted September 4, 2015 Posted September 4, 2015 allowRemoteTrigger must be set to true. addEvent("example", true) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Moderators IIYAMA Posted September 6, 2015 Moderators Posted September 6, 2015 Hey guys,I'm trying to make a script that can regulate the fire rate of various weapons without using ( setWeaponProperty ) , since the fire rate can only be changed on server side, but i want each player to have a different shooting speed. Any methods on how this can be done? No. Only an overwrite in lua might make it possible. Which is far from real bullets and afaik not even close to your lua skills. 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
Markeloff Posted September 6, 2015 Posted September 6, 2015 There's still some luck but, not really efficient as you wish. You can increase or decrease the client's gamespeed when firing a certain weapon, then you reset it to default when he stops firing. I know that doesn't change a weapon property, but it does it. speed = false function changeSpeed(weapon, _, _, _, _, _, _) if speed == false then setGameSpeed(4) speed = true addEventHandler("onClientRender",root,checkFiring) end end addEventHandler("onClientPlayerWeaponFire", root, changeSpeed) function checkFiring() if getPedTask ( localPlayer, "secondary", "TASK_SECONDARY_ATTACK" ) ~= "TASK_SIMPLE_USE_GUN" then removeEventHandler("onClientRender",root,checkFiring) speed = false setGameSpeed(1) end end Some people want it to happen, some wish it would happen, others make it happen.
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