Jump to content

help with gui


Recommended Posts

	GUIEditor = {
    button = {},
    window = {},
    memo = {}
}
	addEventHandler("onClientResourceStart", resourceRoot,
	function()
        GUIEditor.window[1] = guiCreateWindow(597, 313, 734, 299, "Desert Clan Warfare - Choose a Team!", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
	        GUIEditor.memo[1] = guiCreateMemo(256, 60, 219, 41, "What team would you like to join?", false, GUIEditor.window[1])
        GUIEditor.button[1] = guiCreateButton(25, 163, 231, 55, "Ghost Mercenaries", false, GUIEditor.window[1])
        GUIEditor.button[2] = guiCreateButton(264, 161, 217, 57, "Special Military Unit", false, GUIEditor.window[1])
        GUIEditor.button[3] = guiCreateButton(489, 163, 227, 55, "People's Protection Power", false, GUIEditor.window[1])    
    end)
	function spawn()
setTimer(
function()
guiSetVisible(GUIEditor.window[1], true) 
showCursor(true)
end, 1000, 1)
end 
addEvent("spawnpanel", true)
addEventHandler("spawnpanel", localPlayer, spawn)

Alright so how do I make it that it doesn't show when the resource starts, but when the ''spawnpanel'' event gets triggered?

Edited by marty000123
Link to comment
GUIEditor = {
    button = {},
    window = {},
    memo = {}
}
	addEventHandler("onClientResourceStart", resourceRoot,
	function()
        GUIEditor.window[1] = guiCreateWindow(597, 313, 734, 299, "Desert Clan Warfare - Choose a Team!", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
	        GUIEditor.memo[1] = guiCreateMemo(256, 60, 219, 41, "What team would you like to join?", false, GUIEditor.window[1])
        GUIEditor.button[1] = guiCreateButton(25, 163, 231, 55, "Ghost Mercenaries", false, GUIEditor.window[1])
        GUIEditor.button[2] = guiCreateButton(264, 161, 217, 57, "Special Military Unit", false, GUIEditor.window[1])
        GUIEditor.button[3] = guiCreateButton(489, 163, 227, 55, "People's Protection Power", false, GUIEditor.window[1])  
    guiSetVisible(GUIEditor.window[1], false) 
    end)

	function spawn()
setTimer(
function()
guiSetVisible(GUIEditor.window[1], true) 
showCursor(true)
end, 1000, 1)
end 
addEvent("spawnpanel", true)
addEventHandler("spawnpanel", localPlayer, spawn)

 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...