Jump to content

help Windons


Recommended Posts

GUIEditor = {
    gridlist = {},
    button = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        mission = guiCreateWindow(596, 264, 204, 247, "Zombie Mission", false)
        guiWindowSetSizable(mission, true)
        GUIEditor.button[1] = guiCreateButton(10, 22, 184, 15, "\"MISSIONS\"", false, mission)
        GUIEditor.button[2] = guiCreateButton(-1, 154, 31, 33, "", false, GUIEditor.button[1])
        GUIEditor.button[3] = guiCreateButton(9, 214, 92, 18, "TAKE", false, mission)
        GUIEditor.button[4] = guiCreateButton(106, 214, 88, 18, "EXIT", false, mission)
        GUIEditor.gridlist[1] = guiCreateGridList(230, 206, 0, 15, false, mission)
        GUIEditor.gridlist[2] = guiCreateGridList(10, 39, 184, 168, false, mission)
        guiGridListAddColumn(GUIEditor.gridlist[2], "Mission", 0.9)
        for i = 1, 9 do
            guiGridListAddRow(GUIEditor.gridlist[2])
        end
        guiGridListSetItemText(GUIEditor.gridlist[2], 0, 1, "Kill 1 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 1, 1, "Kill 1 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 2, 1, "Kill 2 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 3, 1, "Kill 2 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 4, 1, "Kill 3 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 5, 1, "Kill 3 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 6, 1, "Kill 300 zombies", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 7, 1, "Kill 600 zombies", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 8, 1, "Kill 900 zombies", false, false)    
    end
)

addEventHandler("onClientRender", root,

guiSetVisible(mission,false)

bindKey ("U","down",function()
guiSetVisible(mission), not guiSetVisible(mission))
showCurson(guiGetVisible(mission[1]))
end
)

Could someone help me is having some errors ! please and "thank you"

 

Link to comment
42 minutes ago, kevincouto6 said:

GUIEditor = {
    gridlist = {},
    button = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        mission = guiCreateWindow(596, 264, 204, 247, "Zombie Mission", false)
        guiWindowSetSizable(mission, true)
        GUIEditor.button[1] = guiCreateButton(10, 22, 184, 15, "\"MISSIONS\"", false, mission)
        GUIEditor.button[2] = guiCreateButton(-1, 154, 31, 33, "", false, GUIEditor.button[1])
        GUIEditor.button[3] = guiCreateButton(9, 214, 92, 18, "TAKE", false, mission)
        GUIEditor.button[4] = guiCreateButton(106, 214, 88, 18, "EXIT", false, mission)
        GUIEditor.gridlist[1] = guiCreateGridList(230, 206, 0, 15, false, mission)
        GUIEditor.gridlist[2] = guiCreateGridList(10, 39, 184, 168, false, mission)
        guiGridListAddColumn(GUIEditor.gridlist[2], "Mission", 0.9)
        for i = 1, 9 do
            guiGridListAddRow(GUIEditor.gridlist[2])
        end
        guiGridListSetItemText(GUIEditor.gridlist[2], 0, 1, "Kill 1 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 1, 1, "Kill 1 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 2, 1, "Kill 2 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 3, 1, "Kill 2 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 4, 1, "Kill 3 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 5, 1, "Kill 3 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 6, 1, "Kill 300 zombies", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 7, 1, "Kill 600 zombies", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 8, 1, "Kill 900 zombies", false, false)    
    end
)

addEventHandler("onClientRender", root,

guiSetVisible(mission,false)

bindKey ("U","down",function()
guiSetVisible(mission, not guiGetVisible(mission) )
showCursor( not isCursorShowing() )
end
)

Could someone help me is having some errors ! please and "thank you"

 

 

Link to comment
GUIEditor = {
    gridlist = {},
    button = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        mission = guiCreateWindow(596, 264, 204, 247, "Zombie Mission", false)
        guiWindowSetSizable(mission, true)
        GUIEditor.button[1] = guiCreateButton(10, 22, 184, 15, "\"MISSIONS\"", false, mission)
        GUIEditor.button[2] = guiCreateButton(-1, 154, 31, 33, "", false, GUIEditor.button[1])
        GUIEditor.button[3] = guiCreateButton(9, 214, 92, 18, "TAKE", false, mission)
        GUIEditor.button[4] = guiCreateButton(106, 214, 88, 18, "EXIT", false, mission)
        GUIEditor.gridlist[1] = guiCreateGridList(230, 206, 0, 15, false, mission)
        GUIEditor.gridlist[2] = guiCreateGridList(10, 39, 184, 168, false, mission)
        guiGridListAddColumn(GUIEditor.gridlist[2], "Mission", 0.9)
        for i = 1, 9 do
            guiGridListAddRow(GUIEditor.gridlist[2])
        end
        guiGridListSetItemText(GUIEditor.gridlist[2], 0, 1, "Kill 1 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 1, 1, "Kill 1 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 2, 1, "Kill 2 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 3, 1, "Kill 2 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 4, 1, "Kill 3 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 5, 1, "Kill 3 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 6, 1, "Kill 300 zombies", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 7, 1, "Kill 600 zombies", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 8, 1, "Kill 900 zombies", false, false)    
    end
)

addEventHandler("onClientRender", root,function() 

guiSetVisible(mission,false)

bindKey ("U","down",function()
guiSetVisible(mission), not guiSetVisible(mission))
showCurson(guiGetVisible(mission[1]))
end
)

 

Link to comment
56 minutes ago, Dimos7 said:

GUIEditor = {
    gridlist = {},
    button = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        mission = guiCreateWindow(596, 264, 204, 247, "Zombie Mission", false)
        guiWindowSetSizable(mission, true)
        GUIEditor.button[1] = guiCreateButton(10, 22, 184, 15, "\"MISSIONS\"", false, mission)
        GUIEditor.button[2] = guiCreateButton(-1, 154, 31, 33, "", false, GUIEditor.button[1])
        GUIEditor.button[3] = guiCreateButton(9, 214, 92, 18, "TAKE", false, mission)
        GUIEditor.button[4] = guiCreateButton(106, 214, 88, 18, "EXIT", false, mission)
        GUIEditor.gridlist[1] = guiCreateGridList(230, 206, 0, 15, false, mission)
        GUIEditor.gridlist[2] = guiCreateGridList(10, 39, 184, 168, false, mission)
        guiGridListAddColumn(GUIEditor.gridlist[2], "Mission", 0.9)
        for i = 1, 9 do
            guiGridListAddRow(GUIEditor.gridlist[2])
        end
        guiGridListSetItemText(GUIEditor.gridlist[2], 0, 1, "Kill 1 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 1, 1, "Kill 1 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 2, 1, "Kill 2 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 3, 1, "Kill 2 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 4, 1, "Kill 3 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 5, 1, "Kill 3 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 6, 1, "Kill 300 zombies", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 7, 1, "Kill 600 zombies", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 8, 1, "Kill 900 zombies", false, false)    
    end
)

addEventHandler("onClientRender", root,function() 



bindKey ("U","down",function()
local me = not guiGetVisible(mission)
		guiSetVisible(mission,me )
		showCursor( me )
end
)

 

 

Link to comment
GUIEditor = {
    gridlist = {},
    button = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        mission = guiCreateWindow(596, 264, 204, 247, "Zombie Mission", false)
		guiSetVisible(mission,false)	
        guiWindowSetSizable(mission, true)
        GUIEditor.button[1] = guiCreateButton(10, 22, 184, 15, "\"MISSIONS\"", false, mission)
        GUIEditor.button[2] = guiCreateButton(-1, 154, 31, 33, "", false, GUIEditor.button[1])
        GUIEditor.button[3] = guiCreateButton(9, 214, 92, 18, "TAKE", false, mission)
        GUIEditor.button[4] = guiCreateButton(106, 214, 88, 18, "EXIT", false, mission)
        GUIEditor.gridlist[1] = guiCreateGridList(230, 206, 0, 15, false, mission)
        GUIEditor.gridlist[2] = guiCreateGridList(10, 39, 184, 168, false, mission)
        guiGridListAddColumn(GUIEditor.gridlist[2], "Mission", 0.9)
        for i = 1, 9 do
            guiGridListAddRow(GUIEditor.gridlist[2])
        end
        guiGridListSetItemText(GUIEditor.gridlist[2], 0, 1, "Kill 1 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 1, 1, "Kill 1 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 2, 1, "Kill 2 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 3, 1, "Kill 2 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 4, 1, "Kill 3 boss RED", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 5, 1, "Kill 3 boss yellow", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 6, 1, "Kill 300 zombies", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 7, 1, "Kill 600 zombies", false, false)
        guiGridListSetItemText(GUIEditor.gridlist[2], 8, 1, "Kill 900 zombies", false, false)    
    end
)

bindKey ("U","down",function()
	guiSetVisible(mission, not guiGetVisible(mission))
	showCursor(guiGetVisible(mission))
end)

 

Link to comment

Some notes:

  • You are using onClientRender for no reason. I removed it.
  • You should set guiSetVisible after you create the window element instead.
  • You mistyped showCursor as showCurson.
  • You used not guiSetVisible, even though it should be not guiGetVisible.
  • You were using mission[1] in guiGetVisible, but what you're looking for is just mission, since it's not a table, it's a GUI window element.
  • You had an unnecessary GUI button (probably made by accident), so I removed it.
  • You had an unnecessary GUI gridlist (probably also made by accident), so I removed it.

I suggest using /debugscript 3 in the future to help you nail down these errors.

GUIEditor = {
	gridlist = {},
	button = {}
}

addEventHandler("onClientResourceStart", resourceRoot,
	function()
		mission = guiCreateWindow(596, 264, 204, 247, "Zombie Mission", false)
		guiWindowSetSizable(mission, true)
		guiSetVisible(mission, false)

		GUIEditor.button[1] = guiCreateButton(10, 22, 184, 15, "\"MISSIONS\"", false, mission)
		GUIEditor.button[2] = guiCreateButton(9, 214, 92, 18, "TAKE", false, mission)
		GUIEditor.button[3] = guiCreateButton(106, 214, 88, 18, "EXIT", false, mission)

		GUIEditor.gridlist[1] = guiCreateGridList(10, 39, 184, 168, false, mission)

		guiGridListAddColumn(GUIEditor.gridlist[1], "Mission", 0.9)

		for i = 1, 9 do
			guiGridListAddRow(GUIEditor.gridlist[1])
		end

		guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Kill 1 boss RED", false, false)
		guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Kill 1 boss yellow", false, false)
		guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Kill 2 boss RED", false, false)
		guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Kill 2 boss yellow", false, false)
		guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Kill 3 boss RED", false, false)
		guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Kill 3 boss yellow", false, false)
		guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Kill 300 zombies", false, false)
		guiGridListSetItemText(GUIEditor.gridlist[1], 7, 1, "Kill 600 zombies", false, false)
		guiGridListSetItemText(GUIEditor.gridlist[1], 8, 1, "Kill 900 zombies", false, false)    
	end
)

bindKey("U", "down", function()
	local visibility = not guiGetVisible(mission)
	guiSetVisible(mission, visibility)
	showCursor(visibility)
end)

 

Edited by myonlake
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...