Jacobob14 Posted February 23, 2014 Share Posted February 23, 2014 as I could do to make the panel visible with a command I'm new to the gui someone help me addEventHandler("onClientResourceStart", resourceRoot, function () buton1 = guiCreateButton(520, 192, 64, 28, "", false) buton2 = guiCreateButton(480, 383, 84, 40, "", false) buton2 = guiCreateButton(348, 383, 84, 40, "", false) buton2 = guiCreateButton(480, 433, 84, 40, "", false) buton2 = guiCreateButton(348, 433, 84, 40, "", false) buton2 = guiCreateEdit(328, 220, 250, 158, "", false) end ) addEventHandler("onClientRender", root, function () dxDrawRectangle(313, 166, 276, 343, tocolor(0, 0, 1, 122), false) dxDrawRectangle(313, 166, 276, 22, tocolor(0, 0, 209, 237), false) dxDrawText("HELP PALNEL", 344, 170, 598, 184, tocolor(255, 255, 255, 255), 0.40, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("helpmanager", 315, 489, 446, 503, tocolor(0, 60, 88, 237), 0.50, "bankgothic", "left", "top", false, false, true, false, false) end ) Link to comment
Moderators Citizen Posted February 23, 2014 Moderators Share Posted February 23, 2014 Like this ? addEventHandler("onClientResourceStart", resourceRoot, function () buton1 = guiCreateButton(520, 192, 64, 28, "", false) buton2 = guiCreateButton(480, 383, 84, 40, "", false) buton3 = guiCreateButton(348, 383, 84, 40, "", false) buton4 = guiCreateButton(480, 433, 84, 40, "", false) buton5 = guiCreateButton(348, 433, 84, 40, "", false) buton6 = guiCreateEdit(328, 220, 250, 158, "", false) guiSetVisible(buton1, false) guiSetVisible(buton2, false) guiSetVisible(buton3, false) guiSetVisible(buton4, false) guiSetVisible(buton5, false) guiSetVisible(buton6, false) end ) function drawPanel() dxDrawRectangle(313, 166, 276, 343, tocolor(0, 0, 1, 122), false) dxDrawRectangle(313, 166, 276, 22, tocolor(0, 0, 209, 237), false) dxDrawText("HELP PALNEL", 344, 170, 598, 184, tocolor(255, 255, 255, 255), 0.40, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("helpmanager", 315, 489, 446, 503, tocolor(0, 60, 88, 237), 0.50, "bankgothic", "left", "top", false, false, true, false, false) end function showPanel() guiSetVisible(buton1, true) guiSetVisible(buton2, true) guiSetVisible(buton3, true) guiSetVisible(buton4, true) guiSetVisible(buton5, true) guiSetVisible(buton6, true) addEventHandler("onClientRender", root, drawPanel) end addCommandHandler("panel", showPanel) Link to comment
Jacobob14 Posted February 23, 2014 Author Share Posted February 23, 2014 thank you very much wanted to do it with bind key but the problem is that pressing another f9 panel sigue visible function showPanel() guiSetVisible(buton1, true) guiSetVisible(buton2, true) guiSetVisible(buton3, true) guiSetVisible(buton4, true) guiSetVisible(buton5, true) guiSetVisible(buton6, true) addEventHandler("onClientRender", root, drawPanel) end bindKey ("F9", "down", showPanel) Link to comment
Moderators Citizen Posted February 23, 2014 Moderators Share Posted February 23, 2014 Are you serious ?? It's not a problem since it was coded this way ... It's really simple to do that, just use your brain seriously. You have to do a simple: if someVar == someValue then --show the gui (code I gave you) -- update someVar else --hide the gui (do the reverse of the code I gave you) -- update someVar end If you can't do it, then you will have to go back on the wiki to learn the basics (again ?) 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