Jump to content

help with effects


MAB

Recommended Posts

Posted

attempt to call global 'createEffect'

function start(player) 
         if ( hasObjectPermissionTo ( player, "function.kickPlayer", false ) ) then 
              showCursor(player,true,true) 
              addEventHandler("onPlayerClick",player,explosion) 
            end 
end 
addCommandHandler("ilovetoburn",start) 
  
function explosion (button,state,element,x,y,z) 
         if (button == "left" and state == "down") then 
               createExplosion (x,y,z,1) 
               createEffect ("teargas",x,y,z) 
        end 
    end 
  
function stop(player) 
         if ( hasObjectPermissionTo ( player, "function.kickPlayer", false ) ) then 
              showCursor(player,false,false) 
              removeEventHandler("onPlayerClick",player,explosion) 
            end 
end 
addCommandHandler("ihatetoburn",stop) 

You can find me here.

Posted

Use triggerClientEvent to root. Send the arguments from server to client. Thats it!

"El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más".

Att: -|TG|-Mister[Q]<.

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...