enzopaul4 Posted October 23, 2016 Share Posted October 23, 2016 (edited) GUIEditor = { staticimage = {}, edit = {}, button = {}, window = {}, scrollbar = {}, gridlist = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(0.18, 0.19, 0.48, 0.56, "Romania Wasted Roleplay - Panou de donatii", true) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0EF098") GUIEditor.staticimage[1] = guiCreateStaticImage(467, 41, 71, 96, ":hud/images/achievement/achievement.png", false, GUIEditor.window[1]) GUIEditor.scrollbar[1] = guiCreateScrollBar(9, 23, 15, 455, false, false, GUIEditor.window[1]) GUIEditor.gridlist[1] = guiCreateGridList(0.05, 0.06, 0.78, 0.91, true, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Nume bonus", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Pret(€)", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Categorie", 0.3) for i = 1, 9 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "1000000$ Ingame", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 3, "Bani in joc", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Admin 1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "10", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 3, "Grade", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Casa de Donator Mica + gate", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 2, "5", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 3, "Bonus Donator", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Chat de donator", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 2, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 3, "Abilitati Donator", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Helper", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 4, 2, "5", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 4, 3, "Grade", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Infernus", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 5, 2, "5", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 5, 3, "Vehicule", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Moderator", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 6, 2, "15", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 6, 3, "Grade", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 7, 1, "NitroX10", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 7, 2, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 7, 3, "Abilitati vehicule", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 8, 1, "Nume de donator", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 8, 2, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 8, 3, "Abilitati Donator", false, false) GUIEditor.button[1] = guiCreateButton(466, 406, 72, 56, "Inchide", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "clear-normal") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.edit[1] = guiCreateEdit(0.05, 0.86, 0.76, 0.08, "Donatile se fac numai la Paul_Dima sau Alex Wizz", true, GUIEditor.window[1]) end ) local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root, function() dxDrawText("Donatile se fac numai la Paul Dima sau Alex Wizz", (screenW * 0.4366) + 1, (screenH * 0.0775) + 1, (screenW * 0.6589) + 1, (screenH * 0.1748) + 1, tocolor(17, 210, 53, 255), 1.00, "beckett", "center", "bottom", false, true, false, false, false) dxDrawText("Donatile se fac numai la Paul Dima sau Alex Wizz", screenW * 0.4366, screenH * 0.0775, screenW * 0.6589, screenH * 0.1748, tocolor(253, 0, 0, 255), 1.00, "beckett", "center", "bottom", false, true, false, false, false) dxDrawImage(screenW * 0.6675, screenH * 0.1921, screenW * 0.3238, screenH * 0.5475, ":TAB/icon.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end ) bindKey ( "F5", "down", function ( ) local state = ( not guiGetVisible ( newgui.wind[1] ) ) guiSetVisible ( newgui.wind[1], state ) showCursor ( state ) end ) If i start the resource the gui is appearing but if i press F5 it isn't working... I try like 2 hours to make these to work , but i can't and i need help.. Please..Thank you Edited October 23, 2016 by enzopaul4 Link to comment
Simple0x47 Posted October 23, 2016 Share Posted October 23, 2016 If you're trying to toggle the visible then make this: function toggleThatWindow() if ( guiGetVisible( newgui.wind[1] ) ) then guiSetVisible( newgui.wind[1], false ) else guiSetVisible( newgui.wind[1], true ) end end bindKey( "F5", "down", toggleThatWindow) Link to comment
enzopaul4 Posted October 23, 2016 Author Share Posted October 23, 2016 yeah thank you , but it is not all so (ps newgui.wind is not what i have i change it with "GUIEditor.gridlist" but only a part from the gui is hiding. How can i make to hide all? Link to comment
iPrestege Posted October 23, 2016 Share Posted October 23, 2016 @Simple01 @enzopaul4 newgui.wind[1] doesn't exists it's a nil element so this will not work just replace it with GUIEditor.window[1] because that is your window and your code @enzopaul4 should work just replace the gui element with you window gui and hide your window with 'guiSetVisible' . Link to comment
enzopaul4 Posted October 23, 2016 Author Share Posted October 23, 2016 yeah , i see , thank you very much @FaHaD and @Simple01 function() dxDrawText("Donatile se fac numai la Paul Dima sau Alex Wizz", (screenW * 0.4366) + 1, (screenH * 0.0775) + 1, (screenW * 0.6589) + 1, (screenH * 0.1748) + 1, tocolor(17, 210, 53, 255), 1.00, "beckett", "center", "bottom", false, true, false, false, false) dxDrawText("Donatile se fac numai la Paul Dima sau Alex Wizz", screenW * 0.4366, screenH * 0.0775, screenW * 0.6589, screenH * 0.1748, tocolor(253, 0, 0, 255), 1.00, "beckett", "center", "bottom", false, true, false, false, false) dxDrawImage(screenW * 0.6675, screenH * 0.1921, screenW * 0.3238, screenH * 0.5475, ":TAB/icon.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end ) how to hide these text?? Link to comment
iPrestege Posted October 23, 2016 Share Posted October 23, 2016 Don't add the event handler or if you want to remove it and show it with the gui stats use a variables. 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