kevincouto6 Posted May 6, 2018 Share Posted May 6, 2018 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
LilDawage Posted May 6, 2018 Share Posted May 6, 2018 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
kevincouto6 Posted May 6, 2018 Author Share Posted May 6, 2018 13 minutes ago, LilDawage said: Thanks, but it's not working yet, could anyone help me? Link to comment
Dimos7 Posted May 6, 2018 Share Posted May 6, 2018 Can you post the errors or warnings here Link to comment
kevincouto6 Posted May 6, 2018 Author Share Posted May 6, 2018 22 minutes ago, Dimos7 said: Can you post the errors or warnings here Recourse starts normally but I can not open windows Link to comment
Dimos7 Posted May 6, 2018 Share Posted May 6, 2018 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
LilDawage Posted May 6, 2018 Share Posted May 6, 2018 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
kevincouto6 Posted May 6, 2018 Author Share Posted May 6, 2018 Hello everyone, the script is loading on the server but does not open, and no error appears Link to comment
Mahlukat Posted May 7, 2018 Share Posted May 7, 2018 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
Storm-Hanma Posted May 9, 2018 Share Posted May 9, 2018 Did you run debugscript 3? If not type /debugscript3 and tell me the errors Link to comment
myonlake Posted May 9, 2018 Share Posted May 9, 2018 (edited) 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 May 9, 2018 by myonlake 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