Jump to content

Event does not exist?


Recommended Posts

Okay so I'm triggering a clientside event in my serverside script:

triggerClientEvent(source, "showGui", getRootElement()) 

It triggers this in the clientside script:

function showGui() 
    showCursor(true) 
    guiSetInputEnabled(true) 
    loadLoginPanel() 
end 
addEvent("showGui", true) 
addEventHandler("showGui", getRootElement(), showGui) 

I get this error in my debugscript:

ERROR: Server triggered clientside event showGui but event is not added clientside 

Any help is appreciated.

Link to comment
Okay so I'm triggering a clientside event in my serverside script:
triggerClientEvent(source, "showGui", getRootElement()) 

It triggers this in the clientside script:

function showGui() 
    showCursor(true) 
    guiSetInputEnabled(true) 
    loadLoginPanel() 
end 
addEvent("showGui", true) 
addEventHandler("showGui", getRootElement(), showGui) 

I get this error in my debugscript:

ERROR: Server triggered clientside event showGui but event is not added clientside 

Any help is appreciated.

  
addEventHandler("onClientResourceStart", root, 
function() 
triggerServerEvent("resourceStart", getLocalPlayer()) 
end 
) 
  
addEvent("showGui") 
addEventHandler("showGui", root, 
function(msg) 
    showCursor(true) 
    guiSetInputEnabled(true) 
    loadLoginPanel() 
outputChatBox(msg) 
end 
) 
  
--- # Server Side 
  
addEvent("resourceStart", true) 
addEventHandler("resourceStart", root, 
function(player, local) 
msg = getResourceName(local)..":This is my Code is Succes" 
triggerClientEvent(player, "showGui", msg, player) 
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...