Jump to content

problem


MAB

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...