alekseu788 Posted October 28, 2015 Author Share Posted October 28, 2015 Not working command! Link to comment
ozulus Posted October 28, 2015 Share Posted October 28, 2015 You are wrong, use this. It will work. addCommandHandler("salon",viewGui) Link to comment
alekseu788 Posted October 28, 2015 Author Share Posted October 28, 2015 Thanks for the reply! Link to comment
alekseu788 Posted October 28, 2015 Author Share Posted October 28, 2015 Help please error again! What to do? [05:01:22] ERROR: 7avtosalon\server.lua:17: attempt to call global 'guiSetVisible' (a nil value) Link to comment
Aristates Posted October 28, 2015 Share Posted October 28, 2015 take a screen shot. Code guiSetVisible(GUI.window[1], false) Link to comment
alekseu788 Posted October 29, 2015 Author Share Posted October 29, 2015 What kind of screenshot? Link to comment
alekseu788 Posted October 29, 2015 Author Share Posted October 29, 2015 GUI = { window = {}, button = {}, edit = {} } function gui() GUI.window[1] = guiCreateWindow(6, 340, 160, 105, "Автосалон",false) GUI.button[1] = guiCreateButton(6, 40, 160, 100, "Купить",false,GUI.window[1]) GUI.edit[1] = guiCreateEdit(6.45, 60, 160, 100, "10000",false,GUI.window[1]) GUI.button[2] = guiCreateButton(6, 20, 160, 100, "Продать",false,GUI.window[1]) guiSetVisible(GUI.window[1], false) end addEventHandler("onClientResourceStart", resourceRoot, gui) function viewGui() guiSetVisible(GUI.window[1], false, not guiSetVisible(GUI.window[1])) showCursor(not isCursorShowing()) end addCommandHandler ("salon", viewGui) Link to comment
Tekken Posted October 29, 2015 Share Posted October 29, 2015 Try this: local GUI = { window = {}, button = {}, edit = {} }; local guiv = false; addEventHandler("onClientResourceStart", resourceRoot, function() GUI.window[1] = guiCreateWindow(6, 340, 160, 105, "Автосалон",false) GUI.button[1] = guiCreateButton(6, 40, 160, 100, "Купить",false,GUI.window[1]) GUI.edit[1] = guiCreateEdit(6.45, 60, 160, 100, "10000",false,GUI.window[1]) GUI.button[2] = guiCreateButton(6, 20, 160, 100, "Продать",false,GUI.window[1]) guiSetVisible(GUI.window[1], false) end); addCommandHandler("salon", function() if (guiv == false) then guiSetVisible(GUI.window[1], true); showCursor(true); guiv = true; else guiSetVisible(GUI.window[1], false); showCursor(false); guiv = false; end end); Link to comment
ozulus Posted October 29, 2015 Share Posted October 29, 2015 Help please error again! What to do?[05:01:22] ERROR: 7avtosalon\server.lua:17: attempt to call global 'guiSetVisible' (a nil value) Use this code in client side not server side. Link to comment
alekseu788 Posted October 29, 2015 Author Share Posted October 29, 2015 Thanks for the reply! Link to comment
alekseu788 Posted October 29, 2015 Author Share Posted October 29, 2015 Help please error again! What to do? [2015-10-29 17:02:40] Resource '7avtosalon' changed, reloading and starting [2015-10-29 17:02:40] Starting 7avtosalon [2015-10-29 17:02:40] startResource: Resource '7avtosalon' started [2015-10-29 17:02:40] ADMIN: Resource '7avtosalon' started by TOPBASS [2015-10-29 17:02:45] ERROR: 7avtosalon\server.lua:14: attempt to call global 'guiSetVisible' (a nil value) [2015-10-29 17:06:08] Resources: 222 loaded, 0 failed [2015-10-29 17:06:15] ADMIN: Resource '7avtosalon' restarted by TOPBASS [2015-10-29 17:06:15] Stopping 7avtosalon [2015-10-29 17:06:15] Resource '7avtosalon' changed, reloading and starting [2015-10-29 17:06:15] Starting 7avtosalon [2015-10-29 17:06:15] 7avtosalon restarted successfully [2015-10-29 17:06:23] ERROR: 7avtosalon\client.lua:14: attempt to call global 'guiSetVisible' (a nil value) Link to comment
alekseu788 Posted October 29, 2015 Author Share Posted October 29, 2015 Look at <meta> <info author="TOPBASS" version="1.5" name="Avtosalon by.TOPBASS" type="script" /> <script src="client.lua" /> </meta> Link to comment
HUNGRY:3 Posted October 29, 2015 Share Posted October 29, 2015 "TOPBASS" version="1.5" name="Avtosalon by.TOPBASS" type="script" /> Link to comment
alekseu788 Posted October 30, 2015 Author Share Posted October 30, 2015 How to add open command ? GUIEditor = { button = {}, window = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function () GUIEditor.window[1] = guiCreateWindow(214, 230, 600, 458, "*Взять оружие*", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.button[1] = guiCreateButton(22, 390, 191, 50, "Взять Glock 19", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "clear-normal") GUIEditor.button[2] = guiCreateButton(391, 390, 191, 50, "Взять KRISS Vector", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "clear-normal") GUIEditor.staticimage[1] = guiCreateStaticImage(39, 38, 520, 332, "Png/logo2.png", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(563, -78523, 15, 768, "", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(253, 406, 99, 24, "Закрыть", false, GUIEditor.window[1]) end Link to comment
BluntZ Posted October 30, 2015 Share Posted October 30, 2015 You can add it in client side Link to comment
aka Blue Posted October 31, 2015 Share Posted October 31, 2015 Try this: GUIEditor = { button = {}, window = {}, staticimage = {} } addCommandHandler ( "openpanel", function () GUIEditor.window[1] = guiCreateWindow(214, 230, 600, 458, "*Взять оружие*", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.button[1] = guiCreateButton(22, 390, 191, 50, "Взять Glock 19", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "clear-normal") GUIEditor.button[2] = guiCreateButton(391, 390, 191, 50, "Взять KRISS Vector", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "clear-normal") GUIEditor.staticimage[1] = guiCreateStaticImage(39, 38, 520, 332, "Png/logo2.png", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(563, -78523, 15, 768, "", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(253, 406, 99, 24, "Закрыть", false, GUIEditor.window[1]) end ) 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