GerardWay Posted June 29, 2013 Share Posted June 29, 2013 Hey guys, can anyone help with this? The Help Panel doesn't show, and I'm pretty sure its because of Server.lua - Here are the files: client.lua GUIEditor = { button = {}, window = {}, staticimage = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(239, 37, 886, 690, "Admin Commands", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF21AEFF") GUIEditor.label[1] = guiCreateLabel(10, 102, 566, 114, "Staff Area Gate Commands", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 33, 174, 255) GUIEditor.label[2] = guiCreateLabel(73, 169, 291, 110, "Main Entrance - /mainstaffo ", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 43, 159, 27) GUIEditor.label[3] = guiCreateLabel(73, 154, 289, 141, "Main Entrance Closed - /mainstaffc", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[3], 43, 159, 27) GUIEditor.label[4] = guiCreateLabel(52, 206, 310, 63, "Entrance to Staff Area through Car Park - /cpo", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[4], 43, 159, 27) GUIEditor.label[5] = guiCreateLabel(52, 222, 359, 112, "Entrance to Staff Area through Car Park Closed - /cpc", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[5], 43, 159, 27) GUIEditor.button[1] = guiCreateButton(262, 579, 377, 101, "Close", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFD10000") GUIEditor.label[6] = guiCreateLabel(52, 251, 256, 112, "Car Park Entrance - /cpopen", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[6], 43, 159, 27) GUIEditor.label[7] = guiCreateLabel(52, 266, 242, 39, "Car Park Entrance Closed - /cpclosed", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[7], 43, 159, 27) GUIEditor.staticimage[1] = guiCreateStaticImage(374, 144, 391, 234, ":PLAGUEScriptEditor/images/examples/shruk.png", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.staticimage[1], "ImageColours", "tl:FFD10000 tr:FFD10000 bl:FFD10000 br:FFD10000") GUIEditor.label[8] = guiCreateLabel(0, 0, 488, 164, "Admin Team - Commands", false, GUIEditor.staticimage[1]) guiSetFont(GUIEditor.label[8], "default-bold-small") GUIEditor.label[9] = guiCreateLabel(389, 455, 376, 134, "Fly - /superman", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[9], 59, 18, 236) GUIEditor.label[10] = guiCreateLabel(389, 474, 147, 86, "Admin Skin - /staffskin", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[10], 59, 18, 236) GUIEditor.label[11] = guiCreateLabel(372, 392, 368, 67, "Misc Commands", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[11], "sa-header") guiLabelSetColor(GUIEditor.label[11], 0, 172, 209) end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then guiSetVisible(GUIEditor_window[1], false) showCursor(false) addEvent("setHelpVisible",true) addEventHandler("setHelpVisible",root, function () guiSetVisible( GUIEditor_window[1], true ) setTimer( function () showCursor( true ) end, 1000,1) end ) server.lua function trigger( ) triggerClientEvent ( source, "setHelpVisible", getRootElement()) end addCommandHandler ("adminhelp", trigger) And I also need to know how to make the panel only open to players in the ACL Groups Admin, Super Moderator, Moderator and RPC. Any help is appreciated! Link to comment
Castillo Posted June 29, 2013 Share Posted June 29, 2013 You didn't define 'source' at the server side. Should be: function trigger ( source ) Link to comment
iMr.3a[Z]eF Posted June 29, 2013 Share Posted June 29, 2013 And why triggering? try this GUIEditor = { button = {}, window = {}, staticimage = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(239, 37, 886, 690, "Admin Commands", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF21AEFF") GUIEditor.label[1] = guiCreateLabel(10, 102, 566, 114, "Staff Area Gate Commands", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 33, 174, 255) GUIEditor.label[2] = guiCreateLabel(73, 169, 291, 110, "Main Entrance - /mainstaffo ", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 43, 159, 27) GUIEditor.label[3] = guiCreateLabel(73, 154, 289, 141, "Main Entrance Closed - /mainstaffc", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[3], 43, 159, 27) GUIEditor.label[4] = guiCreateLabel(52, 206, 310, 63, "Entrance to Staff Area through Car Park - /cpo", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[4], 43, 159, 27) GUIEditor.label[5] = guiCreateLabel(52, 222, 359, 112, "Entrance to Staff Area through Car Park Closed - /cpc", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[5], 43, 159, 27) GUIEditor.button[1] = guiCreateButton(262, 579, 377, 101, "Close", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFD10000") GUIEditor.label[6] = guiCreateLabel(52, 251, 256, 112, "Car Park Entrance - /cpopen", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[6], 43, 159, 27) GUIEditor.label[7] = guiCreateLabel(52, 266, 242, 39, "Car Park Entrance Closed - /cpclosed", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[7], 43, 159, 27) GUIEditor.staticimage[1] = guiCreateStaticImage(374, 144, 391, 234, ":PLAGUEScriptEditor/images/examples/shruk.png", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.staticimage[1], "ImageColours", "tl:FFD10000 tr:FFD10000 bl:FFD10000 br:FFD10000") GUIEditor.label[8] = guiCreateLabel(0, 0, 488, 164, "Admin Team - Commands", false, GUIEditor.staticimage[1]) guiSetFont(GUIEditor.label[8], "default-bold-small") GUIEditor.label[9] = guiCreateLabel(389, 455, 376, 134, "Fly - /superman", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[9], 59, 18, 236) GUIEditor.label[10] = guiCreateLabel(389, 474, 147, 86, "Admin Skin - /staffskin", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[10], 59, 18, 236) GUIEditor.label[11] = guiCreateLabel(372, 392, 368, 67, "Misc Commands", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[11], "sa-header") guiLabelSetColor(GUIEditor.label[11], 0, 172, 209) end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then guiSetVisible(GUIEditor_window[1], false) showCursor(false) addCommandHandler( "adminhelp", function () guiSetVisible( GUIEditor_window[1], true ) setTimer( function () showCursor( true ) end, 1000,1) end ) Link to comment
GerardWay Posted June 29, 2013 Author Share Posted June 29, 2013 Tried both suggestions, neither worked Link to comment
iPrestege Posted June 30, 2013 Share Posted June 30, 2013 (edited) GUIEditor = { button = {}, window = {}, staticimage = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function ( ) GUIEditor.window[1] = guiCreateWindow(239, 37, 886, 690, "Admin Commands", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF21AEFF") GUIEditor.label[1] = guiCreateLabel(10, 102, 566, 114, "Staff Area Gate Commands", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 33, 174, 255) GUIEditor.label[2] = guiCreateLabel(73, 169, 291, 110, "Main Entrance - /mainstaffo ", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 43, 159, 27) GUIEditor.label[3] = guiCreateLabel(73, 154, 289, 141, "Main Entrance Closed - /mainstaffc", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[3], 43, 159, 27) GUIEditor.label[4] = guiCreateLabel(52, 206, 310, 63, "Entrance to Staff Area through Car Park - /cpo", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[4], 43, 159, 27) GUIEditor.label[5] = guiCreateLabel(52, 222, 359, 112, "Entrance to Staff Area through Car Park Closed - /cpc", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[5], 43, 159, 27) GUIEditor.button[1] = guiCreateButton(262, 579, 377, 101, "Close", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFD10000") GUIEditor.label[6] = guiCreateLabel(52, 251, 256, 112, "Car Park Entrance - /cpopen", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[6], 43, 159, 27) GUIEditor.label[7] = guiCreateLabel(52, 266, 242, 39, "Car Park Entrance Closed - /cpclosed", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[7], 43, 159, 27) GUIEditor.staticimage[1] = guiCreateStaticImage(374, 144, 391, 234, ":PLAGUEScriptEditor/images/examples/shruk.png", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.staticimage[1], "ImageColours", "tl:FFD10000 tr:FFD10000 bl:FFD10000 br:FFD10000") GUIEditor.label[8] = guiCreateLabel(0, 0, 488, 164, "Admin Team - Commands", false, GUIEditor.staticimage[1]) guiSetFont(GUIEditor.label[8], "default-bold-small") GUIEditor.label[9] = guiCreateLabel(389, 455, 376, 134, "Fly - /superman", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[9], 59, 18, 236) GUIEditor.label[10] = guiCreateLabel(389, 474, 147, 86, "Admin Skin - /staffskin", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[10], 59, 18, 236) GUIEditor.label[11] = guiCreateLabel(372, 392, 368, 67, "Misc Commands", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[11], "sa-header") guiLabelSetColor(GUIEditor.label[11], 0, 172, 209) addEventHandler("onClientGUIClick",GUIEditor.button[1],CloseGui) end ) function CloseGui ( ) guiSetVisible(GUIEditor.window[1], false) showCursor(false) end addCommandHandler("adminhelp", function ( ) guiSetVisible( GUIEditor.window[1], true ) setTimer ( showCursor,1000,1,true ) end ) Show the window returning for the local player . Edited June 30, 2013 by Guest Link to comment
GerardWay Posted June 30, 2013 Author Share Posted June 30, 2013 It says there's an unexpected symbol at line 2, iFahad 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