Bean666 Posted January 16, 2015 Share Posted January 16, 2015 hi , when i step on the marker the gui doesnt show up but i have set it already in the script is there any problem in this script? code: local marker1 = createMarker( -1152.5478515625, -955.203125, 129.21875, "Cylinder", 1.5, 0, 255, 0, 255) GUIEditor = { button = {}, window = {}, label = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(368, 139, 581, 472, "Weapon Shop", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 63, 562, 399, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Weapons", GUIEditor.tabpanel[1]) GUIEditor.button[1] = guiCreateButton(18, 42, 102, 44, "M4", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(184, 42, 102, 44, "AK47", false, GUIEditor.tab[1]) GUIEditor.button[3] = guiCreateButton(353, 42, 102, 44, "MP5", false, GUIEditor.tab[1]) GUIEditor.button[4] = guiCreateButton(353, 129, 102, 44, "Uzi", false, GUIEditor.tab[1]) GUIEditor.button[5] = guiCreateButton(184, 129, 102, 44, "Shotgun", false, GUIEditor.tab[1]) GUIEditor.button[6] = guiCreateButton(18, 129, 102, 44, "Spaz12", false, GUIEditor.tab[1]) GUIEditor.button[7] = guiCreateButton(18, 209, 102, 44, "Tec9", false, GUIEditor.tab[1]) GUIEditor.button[8] = guiCreateButton(184, 209, 102, 44, "Sniper", false, GUIEditor.tab[1]) GUIEditor.button[9] = guiCreateButton(353, 209, 102, 44, "Deagle", false, GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Refill Health", GUIEditor.tabpanel[1]) GUIEditor.button[10] = guiCreateButton(164, 147, 227, 65, "Refill Health", false, GUIEditor.tab[2]) GUIEditor.button[11] = guiCreateButton(486, 44, 80, 34, "Close", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(148, 20, 242, 43, "Weapon Shop", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 35, 139, 219) GUIEditor.label[2] = guiCreateLabel(400, 20, 147, 16, "Weapon Shop By Shaman", false, GUIEditor.window[1]) addEventHandler("onClientMarkerHit", marker1, function(player) if (player == localPlayer) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end) addEventHandler("onClientGUIClick",GUIEditor.button[11],function() if ( source == GUIEditor.button[11]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[1],function() if ( source == GUIEditor.button[1]) then showCursor(true) triggerServerEvent ("giveweaponm4",getLocalPlayer(),giveweaponm4) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[2],function() if ( source == GUIEditor.button[2]) then showCursor(true) triggerServerEvent ("giveweaponak47",getLocalPlayer(),giveweaponak47) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[3],function() if ( source == GUIEditor.button[3]) then showCursor(true) triggerServerEvent ("givelol",getLocalPlayer(),givelol) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[4],function() if ( source == GUIEditor.button[4]) then showCursor(true) triggerServerEvent ("giveweaponuzi",getLocalPlayer(),giveweaponuzi) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[5],function() if ( source == GUIEditor.button[5]) then showCursor(true) triggerServerEvent ("giveweaponshot",getLocalPlayer(),giveweaponshot) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[6],function() if ( source == GUIEditor.button[6]) then showCursor(true) triggerServerEvent ("giveweaponspaz",getLocalPlayer(),giveweaponspaz) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[7],function() if ( source == GUIEditor.button[7]) then showCursor(true) triggerServerEvent ("giveweapontec",getLocalPlayer(),giveweapontec) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[8],function() if ( source == GUIEditor.button[8]) then showCursor(true) triggerServerEvent ("giveweaponsniper",getLocalPlayer(),giveweaponsniper) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[9],function() if ( source == GUIEditor.button[9]) then showCursor(true) triggerServerEvent ("giveweapondeagle",getLocalPlayer(),giveweapondeagle) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[10],function() if ( source == GUIEditor.button[10]) then showCursor(true) triggerServerEvent ("givehp",getLocalPlayer(),givehp) end end ) Link to comment
Bean666 Posted January 16, 2015 Author Share Posted January 16, 2015 i used debugscript 3 and it shown this. Link to comment
TAPL Posted January 16, 2015 Share Posted January 16, 2015 This is your table: GUIEditor = { button = {}, window = {}, label = {}, memo = {} } You don't have tabpanel nor tab defined. GUIEditor = { button = {}, window = {}, label = {}, memo = {}, tabpanel = {}, tab = {} } Beside that you passed undefined variable in the triggers. And also you should have used the event onClientGUIClick one time and use if source == button then and elseif... 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