StefanAlmighty Posted December 9, 2015 Share Posted December 9, 2015 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
John Smith Posted December 9, 2015 Share Posted December 9, 2015 Make sure that in meta client script is written a line earlier than server script (You are getting this error because your serverside script starts before the client one, because of how you've set up the meta file) Link to comment
Aristates Posted December 9, 2015 Share Posted December 9, 2015 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
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