MAB Posted July 29, 2015 Share Posted July 29, 2015 not working... no debug messages.. no explosion or effect happens... showCursor works but idk about the events function start() showCursor(true) addEventHandler("onClientClick",localPlayer,explosion) end addCommandHandler("ilovetoburn",start) function explosion (button,state,a,b,x,y,z) if (button == "left" and state == "down") then createExplosion (x,y,z,1,true,-2,true) createEffect ("teargas",x,y,z) end end function stop() showCursor(false) removeEventHandler("onClientClick",localPlayer,explosion) end addCommandHandler("ihatetoburn",stop) Link to comment
MisterQuestions Posted July 30, 2015 Share Posted July 30, 2015 Change localPlayer to root. Link to comment
MAB Posted July 30, 2015 Author Share Posted July 30, 2015 u want that function to happen to all players? Link to comment
Buffalo Posted July 30, 2015 Share Posted July 30, 2015 Root not necessarily means it will happen for all players. Read event wiki to understand whats source element of the event. addEventHandler("onClientClick",root,explosion) In this case this will be added for the one you trigger "ilovetoburn" event for. 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