No no no, you didn't get me.
I want that when I press the button( Already existing ) appear the window not when I start the resource. Like the 'Set Money' 'Set Armour' 'Set Health' 'Set Nick', etcetera. This code ( Making the window ) make the window when I start the resource.
open = 0
function box()
if open==0 then
open = 1
showCursor(true)
myWindow = guiCreateWindow(0.375, 0.375, 0.500, 0.500, "Map Test Help Commands - GUI Version", true)
but1 = guiCreateButton(0.0, 0.1, 0.19, 0.1, "Fix", true, myWindow)
but2 = guiCreateButton(0.0, 0.23, 0.19, 0.1, "Blow up", true, myWindow)
but3 = guiCreateButton(0.0, 0.36, 0.19, 0.1, "Water Color", true, myWindow)
elseif open==1 then
open = 0
destroyElement(myWindow)
end
end
open = 0
bindKey("l", "up", box)
w1 = guiCreateWindow(0.50, 0.50, 0.50, 0.500, "Map Test Help Commands - GUI Version", true)
w2 = guiCreateWindow(0.50, 0.50, 0.50, 0.500, "Map Test Help Commands - GUI Version", true)
w3 = guiCreateWindow(0.50, 0.50, 0.50, 0.50, "Map Test Help Commands - GUI Version", true)
addEventHandler("onClientGUIClick",getRootElement(),
function ()
if (source == but1) then
guiSetVisible(w1,true)
elseif (source == but2) then
guiSetVisible(w2,true)
elseif (source == but3) then
guiSetVisible(w3,true)
end
end)