Newbie Posted April 27, 2014 Share Posted April 27, 2014 Here's dx text: dxDrawText("Your deadmaches are:", x/3.6, y/3.0, 636, 265, tocolor(255, 255, 255, 255), 0.60, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Your wins are:", x/3.6, y/2.7, 636, 293, tocolor(255, 255, 255, 255), 0.60, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Your deaths are:", x/3.6, y/2.45, 636, 321, tocolor(255, 255, 255, 255), 0.60, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Your hunters are:", x/3.6, y/2.25, 636, 348, tocolor(255, 255, 255, 255), 0.60, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Your cash are:", x/3.6, y/2.07, 636, 375, tocolor(255, 255, 255, 255), 0.60, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Your exp are:", x/3.6, y/1.925, 636, 402, tocolor(255, 255, 255, 255), 0.60, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Maps you bought:", x/3.6, y/1.80, 636, 429, tocolor(255, 255, 255, 255), 0.60, "bankgothic", "left", "top", false, false, true, false, false) Here's button: GUIEditor.button[1] = guiCreateButton(x/1.7, y/3.55, 56, 19, "", false) guiSetAlpha ( GUIEditor.button[1], 0 ) I cant understand how to do that when i click on button my dx's shows.. I triend onClientGuiClick - failed. Can anyone help ? Link to comment
Saml1er Posted April 27, 2014 Share Posted April 27, 2014 addEventHandler("onClientGUIClick",root, function (b,s) if b == "left" then if source == GUIEditor.button[1] then guiSetVisible (GUIEditor.button[1], not guiGetVisible(GUIEditor.button[1])) end end end ) Link to comment
Newbie Posted April 27, 2014 Author Share Posted April 27, 2014 no you didn't understood. I want to do if a player clicks on button, and then dxtext's appears (shows) Link to comment
Saml1er Posted April 28, 2014 Share Posted April 28, 2014 addEventHandler("onClientGUIClick",root, function (b,s) if b == "left" then if source == GUIEditor.button[1] then if not rendering then addEventHandler("onClientRender",root,FunctionName) rendering = true else removeEventHandler("onClientRender",root,FunctionName) rendering = nil end end 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