-.Paradox.- Posted November 30, 2013 Posted November 30, 2013 Hello, i made a shop panel, but i got an error, i can't find where is the error in my script, here is the code thanks ERROR: panel\client.lua:8: atempt to call global 'guiCreateWindow' (a nil value) GUIEditor = { gridlist = {}, window = {}, button = {} } GUIEditor.window[2] = guiCreateWindow(527, 227, 409, 336, "Shop ", true) guiWindowSetSizable(GUIEditor.window[2], false) guiSetAlpha(GUIEditor.window[2], 1.00) GUIEditor.gridlist[1] = guiCreateGridList(12, 27, 276, 299, false, GUIEditor.window[2]) guiGridListAddColumn(GUIEditor.gridlist[1], "Shop", 0.4) guiGridListAddColumn(GUIEditor.gridlist[1], "$", 0.4) for i = 1, 8 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Health", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "$1000", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Armor", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "$1000", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Repair Vehicle", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 2, "$1000", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Jetpack", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 2, "$7600", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Parachute", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 4, 2, "$500", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Night Vision Googles", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 5, 2, "$750", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Infrared Googles", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 6, 2, "$750", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 7, 1, "Camera", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 7, 2, "$2000", false, false) GUIEditor.button[1] = guiCreateButton(295, 253, 104, 63, "Close", false, GUIEditor.window[2]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF") GUIEditor.button[2] = guiCreateButton(295, 174, 103, 63, "Buy", false, GUIEditor.window[2]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF") guiSetVisible(GUIEditor.window[2], false) showCursor(false) function enableShop() if guiGetVisible(GUIEditor.window[2]) == false then guiSetVisible(GUIEditor.window[2], true) showCursor(true) else guiSetVisible(GUIEditor.window[2], false) showCursor(false) end end addCommandHandler("shops", enableShop) function closeButton() guiSetVisible(GUIEditor.window[2], false) showCursor(false) end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], closeButton, false ) addEventHandler("onClientGUIClick", guiRoot, function() if source == GUIEditor.button[2] then local row = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if row == 0 then triggerServerEvent("setMyHealth", localPlayer) elseif row == 1 then triggerServerEvent("setMyArmor", localPlayer) elseif row == 2 then triggerServerEvent("repairMyCar", localPlayer) elseif row == 3 then triggerServerEvent("giveMeJetpack", localPlayer) elseif row == 4 then triggerServerEvent("giveMeParachute", localPlayer) elseif row == 5 then triggerServerEvent("giveMeNight", localPlayer) elseif row == 6 then triggerServerEvent("giveMeInfrared", localPlayer) elseif row == 7 then triggerServerEvent("giveMeCamera", localPlayer) end end end) If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
-.Paradox.- Posted November 30, 2013 Author Posted November 30, 2013 Ah yeah thanks i forgot to add to client side If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
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