zombienation Posted December 23, 2011 Share Posted December 23, 2011 Hello, I woulx like to be able to have an info panel on f1 Just a screen where people can read whats to do on the server Is there somebody who is so kind to share this with me please? Or if possible, how can i make it possible for.players to see the info, on welcome screen or other When the download is still running? So people could read it while waiting for the downoad.. Thx Link to comment
Sparrow Posted December 23, 2011 Share Posted December 23, 2011 First of all, create the window gui, then bind it by: function onResourceStart () bindKey ("F1", "down", --the function to show the GUI, Ex: "showGUI"--) guiSetVisible (--The window variable name here--, false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart) Complete the rest by yourself Link to comment
CapY Posted December 24, 2011 Share Posted December 24, 2011 --Create the Window called : "My Window" local Wnd = guiCreateWindow ( 500, 500, 500, 500, "My Window", false ) function onResourceStart () local Window = guiGetVisible ( Wnd ) --We predefine a variable for Window if (Window) == true then -- If window is shown guiSetVisible ( Wnd, false ) --We hide it showCursor ( false ) --We hide it's cursor else --else we.. guiSetVisible ( Wnd, true ) --Show the window showCursor ( true ) --We show it's cursor end end addEventHandler("onClientResourceStart", root , onResourceStart) --We handle the function, when download ends. bindKey ( "f1", "down", onResourceStart ) --And we bind it with 'f1' key Complete the rest by yourself 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