Jump to content

Trigger Event problem


Wei

Recommended Posts

-- SERVER 
addEvent("SaddNotification", true) 
function SaddNotificationHandler( text, red, green, blue, player ) 
triggerClientEvent("CaddNotification", player, text, red, green, blue ) 
end 
addEventHandler("SaddNotification", root, SaddNotificationHandler) 
  

-- CLIENT 
addEvent("CaddNotification", true) 
  
function troller( text, red, green, blue ) 
addNotification( text, red, green, blue ) 
end 
addEventHandler("CaddNotification", root, troller ) 

ERROR: Server triggered clientside event but event is not added client side.

Link to comment
-- SERVER 
addEvent("SaddNotification", true) 
function SaddNotificationHandler( text, red, green, blue, player ) 
    triggerClientEvent("CaddNotification", root, text, red, green, blue ) 
end 
addEventHandler("SaddNotification", root, SaddNotificationHandler) 
  

Link to comment

-- SERVER 
addEvent("SaddNotification", true) 
addEventHandler("SaddNotification", root,  
function SaddNotificationHandler( text, red, green, blue,player) 
triggerClientEvent(player,"CaddNotification",text,player,red, green, blue ) 
      end 
) 
  
-- CLIENT 
addEvent("CaddNotification",true) 
 addEventHandler("CaddNotification", root,  
function ( text, red, green, blue ) 
addNotification( text, red, green, blue ) 
end 
) 
  
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...