Tails Posted August 10, 2012 Posted August 10, 2012 Hi there, I'm trying to make a window that should popup whenever a player joins the server. It works if I use the commandHandler but it just won't show using the EventHandler. Would appreciate it if you could help me with this. function infoGui () local sWidth,sHeight = guiGetScreenSize() infoGuiWindow = guiCreateWindow ( sWidth-600, sHeight-400, sWidth-400, sHeight-300, "Server Rules", false ) guiCreateLabel(0.05, 0.1, 0.94, 0.2, "1:", true, infoGuiWindow) closeButton = guiCreateButton(0.5, 0.5, 0.25, 0.1, "Close", true, infoGuiWindow) showCursor ( true ) end addEventHandler("onPlayerJoin", getRootElement(), infoGui) addCommandHandler("z", infoGui)
Castillo Posted August 10, 2012 Posted August 10, 2012 The event: onPlayerJoin is server side, you should use: onClientResourceStart.
HunT Posted August 10, 2012 Posted August 10, 2012 Better. addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),infoGui) Good Luck Fake Tails
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