DarkByte Posted September 18, 2015 Posted September 18, 2015 Hi. Can someone help me with a script? Its like when player not aiming and press mouse1 button or left button from mouse he is shooting. But i wanna make it only when aiming to shoot
DarkByte Posted September 18, 2015 Author Posted September 18, 2015 Im still learning please make a example
JR10 Posted September 18, 2015 Posted September 18, 2015 addEventHandler('onClientPlayerWeaponFire', localPlayer, function() if (not getControlState('aim_weapon')) then cancelEvent() end end)
HUNGRY:3 Posted September 18, 2015 Posted September 18, 2015 Not working lol it works but jr forgot lua tag addEventHandler('onClientPlayerWeaponFire', localPlayer, function() if (not getControlState('aim_weapon')) then cancelEvent() end end(
DarkByte Posted September 18, 2015 Author Posted September 18, 2015 Not working lol it works but jr forgot lua tag addEventHandler('onClientPlayerWeaponFire', localPlayer, function() if (not getControlState('aim_weapon')) then cancelEvent() end end( addEventHandler('onClientPlayerWeaponFire', localPlayer, function() if (not getControlState('aim_weapon')) then cancelEvent() end end) Still not working
JR10 Posted September 18, 2015 Posted September 18, 2015 Had a syntax error. addEventHandler('onClientPlayerWeaponFire', localPlayer, function() if (not getControlState('aim_weapon')) then cancelEvent() end end) You check use /debugscript 3 to check for errors yourself.
Moderators IIYAMA Posted September 18, 2015 Moderators Posted September 18, 2015 This event is called when a player fires a weapon. onClientPlayerWeaponFire is triggers after the bullet has been fired, that's why there is no info on the wiki about cancelEvent. And if it did, these parameters wouldn't make any sense:(hitX, hitY, hitZ, hitElement)
DarkByte Posted September 19, 2015 Author Posted September 19, 2015 Still not working +No errors in debug
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