TorNix~|nR Posted August 9, 2016 Share Posted August 9, 2016 Hi everyone, I find a bug on my script, I disable the fire, and with 'tab action' you can kill, anyone can help me?, I try to use this, but it doesn't work toggleControl("action", false) Link to comment
Jinx099 Posted August 9, 2016 Share Posted August 9, 2016 toggleControl("fire", false) But about the tab i think it's mta bug coz you can shoot players when you have a weapon on hand by pressing tab Link to comment
DarkByte Posted August 9, 2016 Share Posted August 9, 2016 Check if player is aiming and enable fire and if not disable it. Link to comment
TorNix~|nR Posted August 9, 2016 Author Share Posted August 9, 2016 Thanks Jinx099 and Byte I use "aim_weapon" and it works fine Link to comment
Bonus Posted August 9, 2016 Share Posted August 9, 2016 I think it's because you activate "action" somewhere again. Cause if you deactivate "action" the player can't shoot. Maybe try this: -- client -- local _toggleAllControls = toggleAllControls function toggleAllControls ( ... ) local result = _toggleAllControls (... ) toggleControl ( "action", false ) return result end -- server -- local _toggleAllControls = toggleAllControls function toggleAllControls ( ... ) local result = _toggleAllControls (... ) local data = { ... } local player = data[1] if isElement ( player ) then toggleControl ( player, "action", false ) end return result end That way "action" can't get activated again by toggleAllControls. 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