||BuLLeT|| Posted December 27, 2012 Posted December 27, 2012 Hello i need help here with my disc system, so i created new GUI copy/paste code to script as c.lua,and its not working, but i think server side have bugs somewhere because it isnt worked before too! s.lua function Respawn() Respawn = createMarker(1565.5197753906,-1634.7216796875,13.55480670929,"cylinder",0.2999, 248, 248, 255, 150 ) cph = createPickup (1565.5197753906,-1634.7216796875,13.55480670929, 3, 1277, 0 ) Respawn = createMarker(-2442.1293,753.10,35.17,"cylinder",0.2999, 248, 248, 255, 150 ) cpp = createPickup (-2442.1293,753.10,35.17, 3, 1277, 0 ) end addEventHandler ("onResourceStart",getResourceRootElement(getThisResource()),Respawn) blip = createBlip ( 1565.5197753906,-1634.7216796875,13.55480670929,35 ) blip = createBlip ( -2442.1293,753.10,35.17,35 ) function RespawnGUI(hitElement) if source == Respawn1 then triggerClientEvent (hitElement,"RespawnGUI",getRootElement()) end end addEventHandler ("onMarkerHit",getRootElement(),RespawnGUI) function RespawnGUI(hitElement) if source == Respawn then triggerClientEvent (hitElement,"RespawnGUI",getRootElement()) end end addEventHandler ("onMarkerHit",getRootElement(),RespawnGUI) function kill() setElementHealth(source,0) end addEvent("kill", true) addEventHandler("kill",getRootElement(),kill) c.lua --[[------------------------------------------------- Notes: > This code is using a custom font. This will only work as long as the location it is from always exists, and the resource it is part of is running. To ensure it does not break, it is highly encouraged to move custom fonts into your local resource and reference them there. --]]------------------------------------------------- GUIEditor = { tab = {}, button = {}, edit = {}, window = {}, gridlist = {}, label = {}, tabpanel = {}, } GUIEditor.window[1] = guiCreateWindow(240, 267, 632, 467, "Hawk|RPG Disc System", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 23, 613, 388, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Disc", GUIEditor.tabpanel[1]) GUIEditor.label[1] = guiCreateLabel(15, 36, 226, 59, "Address:", false, GUIEditor.tab[1]) local font_0 = guiCreateFont(":[Hawk]GuiEditor/fonts/PetitFormalScript.ttf") guiSetFont(GUIEditor.label[1], font_0) guiLabelSetColor(GUIEditor.label[1], 255, 254, 254) GUIEditor.label[2] = guiCreateLabel(15, 95, 226, 59, "Value:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[2], font_0) guiLabelSetColor(GUIEditor.label[2], 255, 254, 254) GUIEditor.label[3] = guiCreateLabel(15, 154, 226, 59, "Owner:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[3], font_0) guiLabelSetColor(GUIEditor.label[3], 255, 254, 254) GUIEditor.button[1] = guiCreateButton(21, 229, 129, 44, "Buy", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(21, 300, 129, 44, "Sell", false, GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Garage", GUIEditor.tabpanel[1]) GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 587, 197, false, GUIEditor.tab[2]) guiGridListAddColumn(GUIEditor.gridlist[1], "Names", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Health", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Fuel", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Cost", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Status", 0.2) GUIEditor.button[3] = guiCreateButton(28, 234, 175, 67, "Spawn Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[4] = guiCreateButton(226, 234, 175, 67, "Repair Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[5] = guiCreateButton(420, 234, 175, 67, "Park Vehicle", false, GUIEditor.tab[2]) GUIEditor.tab[3] = guiCreateTab("Weapons", GUIEditor.tabpanel[1]) GUIEditor.gridlist[2] = guiCreateGridList(26, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[2], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[2], "Ammo", 0.4) GUIEditor.gridlist[3] = guiCreateGridList(383, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[3], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[3], "Ammo", 0.4) GUIEditor.label[4] = guiCreateLabel(63, 48, 219, 42, "Your Weapons", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[4], font_0) GUIEditor.label[5] = guiCreateLabel(468, 48, 219, 42, "Storage", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[5], font_0) GUIEditor.button[6] = guiCreateButton(262, 118, 103, 55, "--->", false, GUIEditor.tab[3]) GUIEditor.button[7] = guiCreateButton(262, 228, 103, 55, "<---", false, GUIEditor.tab[3]) GUIEditor.edit[1] = guiCreateEdit(264, 180, 101, 43, " ammo ", false, GUIEditor.tab[3]) GUIEditor.button[9] = guiCreateButton(255, 10, 125, 61, "Done", false, GUIEditor.tab[3]) GUIEditor.button[10] = guiCreateButton(32, 419, 187, 39, "Start New Life", false, GUIEditor.window[1]) GUIEditor.button[11] = guiCreateButton(426, 418, 187, 39, "Close", false, GUIEditor.window[1]) function kill() triggerServerEvent("kill", localPlayer) guiSetVisible(GUIEditor_Window[1], false) guiSetVisible(GUIEditor_Label[1], false) guiSetVisible(GUIEditor_Label[2], false) guiSetVisible(GUIEditor_Label[3], false) guiSetVisible(GUIEditor_Label[4], false) guiSetVisible(GUIEditor_Label[5], false) guiSetVisible(GUIEditor_Label[6], false) guiSetVisible(GUIEditor_Label[7], false) guiSetVisible(GUIEditor_Label[8], false) guiSetVisible(GUIEditor_Label[9], false) guiSetVisible(GUIEditor_Label[10], false) guiSetVisible(GUIEditor_TabPanel[1], false) guiSetVisible(GUIEditor_Label[6], false) guiSetVisible(GUIEditor_Tab[2], false) guiSetVisible(GUIEditor_Tab[3], false) guiSetVisible(GUIEditor_Label[7], false) guiSetVisible(GUIEditor_Button[2], false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[5], kill, false) function hide() guiSetVisible(GUIEditor_Window[1], false) guiSetVisible(GUIEditor_Label[1], false) guiSetVisible(GUIEditor_Label[2], false) guiSetVisible(GUIEditor_Label[3], false) guiSetVisible(GUIEditor_Label[4], false) guiSetVisible(GUIEditor_Label[5], false) guiSetVisible(GUIEditor_Label[6], false) guiSetVisible(GUIEditor_Label[7], false) guiSetVisible(GUIEditor_Label[8], false) guiSetVisible(GUIEditor_Label[9], false) guiSetVisible(GUIEditor_Label[10], false) guiSetVisible(GUIEditor_TabPanel[1], false) guiSetVisible(GUIEditor_Label[6], false) guiSetVisible(GUIEditor_Tab[2], false) guiSetVisible(GUIEditor_Tab[3], false) guiSetVisible(GUIEditor_Label[7], false) guiSetVisible(GUIEditor_Button[2], false) showCursor ( false ) end addEventHandler( "onClientResourceStart", getRootElement( ), hide) addEventHandler ( "onClientGUIClick", GUIEditor_Button[4], hide, false ) end addEvent ("RespawnGUI",true) addEventHandler ("RespawnGUI",getResourceRootElement(getThisResource()),RespawnGUI) Anybody help? (I'm new in this)
manve1 Posted December 27, 2012 Posted December 27, 2012 You got 2 functions named as 'RespawnGUI' and 2 marker hits, use only 1, this will save time to write out code and have no bugs P.S. You are triggering to client side same event when a 'Respawn1' or 'Respawn' markers are hit
TAPL Posted December 27, 2012 Posted December 27, 2012 What about telling us what you're trying to do? and what the script currently does and what is the wrong thing with it?
||BuLLeT|| Posted December 27, 2012 Author Posted December 27, 2012 So its Disc system, it should show GUI when you go on it and it should kill player when he click button "Start New Life"
||BuLLeT|| Posted December 27, 2012 Author Posted December 27, 2012 You got 2 functions named as 'RespawnGUI' and 2 marker hits, use only 1, this will save time to write out code and have no bugsP.S. You are triggering to client side same event when a 'Respawn1' or 'Respawn' markers are hit can you show it in /lua pls?
manve1 Posted December 27, 2012 Posted December 27, 2012 SERVER: function Respawn-function1() Respawn = createMarker(1565.5197753906,-1634.7216796875,13.55480670929,"cylinder",0.2999, 248, 248, 255, 150 ) cph = createPickup (1565.5197753906,-1634.7216796875,13.55480670929, 3, 1277, 0 ) Respawn2 = createMarker(-2442.1293,753.10,35.17,"cylinder",0.2999, 248, 248, 255, 150 ) cpp = createPickup (-2442.1293,753.10,35.17, 3, 1277, 0 ) end addEventHandler ("onResourceStart",getResourceRootElement(getThisResource()),Respawn-function1) blip = createBlip ( 1565.5197753906,-1634.7216796875,13.55480670929,35 ) blip2 = createBlip ( -2442.1293,753.10,35.17,35 ) function RespawnGUI2(hitElement) if source == Respawn1 then triggerClientEvent (hitElement,"RespawnGUI",getRootElement()) elseif source == Respawn then triggerClientEvent (hitElement,"RespawnGUI",getRootElement()) end end addEventHandler ("onMarkerHit",getRootElement(),RespawnGUI) function kill2() setElementHealth(source,0) end addEvent("kill", true) addEventHandler("kill",getRootElement(),kill2) CLIENT: GUIEditor = { tab = {}, button = {}, edit = {}, window = {}, gridlist = {}, label = {}, tabpanel = {}, } GUIEditor.window[1] = guiCreateWindow(240, 267, 632, 467, "Hawk|RPG Disc System", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 23, 613, 388, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Disc", GUIEditor.tabpanel[1]) GUIEditor.label[1] = guiCreateLabel(15, 36, 226, 59, "Address:", false, GUIEditor.tab[1]) local font_0 = guiCreateFont(":[Hawk]GuiEditor/fonts/PetitFormalScript.ttf") guiSetFont(GUIEditor.label[1], font_0) guiLabelSetColor(GUIEditor.label[1], 255, 254, 254) GUIEditor.label[2] = guiCreateLabel(15, 95, 226, 59, "Value:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[2], font_0) guiLabelSetColor(GUIEditor.label[2], 255, 254, 254) GUIEditor.label[3] = guiCreateLabel(15, 154, 226, 59, "Owner:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[3], font_0) guiLabelSetColor(GUIEditor.label[3], 255, 254, 254) GUIEditor.button[1] = guiCreateButton(21, 229, 129, 44, "Buy", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(21, 300, 129, 44, "Sell", false, GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Garage", GUIEditor.tabpanel[1]) GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 587, 197, false, GUIEditor.tab[2]) guiGridListAddColumn(GUIEditor.gridlist[1], "Names", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Health", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Fuel", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Cost", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Status", 0.2) GUIEditor.button[3] = guiCreateButton(28, 234, 175, 67, "Spawn Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[4] = guiCreateButton(226, 234, 175, 67, "Repair Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[5] = guiCreateButton(420, 234, 175, 67, "Park Vehicle", false, GUIEditor.tab[2]) GUIEditor.tab[3] = guiCreateTab("Weapons", GUIEditor.tabpanel[1]) GUIEditor.gridlist[2] = guiCreateGridList(26, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[2], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[2], "Ammo", 0.4) GUIEditor.gridlist[3] = guiCreateGridList(383, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[3], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[3], "Ammo", 0.4) GUIEditor.label[4] = guiCreateLabel(63, 48, 219, 42, "Your Weapons", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[4], font_0) GUIEditor.label[5] = guiCreateLabel(468, 48, 219, 42, "Storage", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[5], font_0) GUIEditor.button[6] = guiCreateButton(262, 118, 103, 55, "--->", false, GUIEditor.tab[3]) GUIEditor.button[7] = guiCreateButton(262, 228, 103, 55, "<---", false, GUIEditor.tab[3]) GUIEditor.edit[1] = guiCreateEdit(264, 180, 101, 43, " ammo ", false, GUIEditor.tab[3]) GUIEditor.button[9] = guiCreateButton(255, 10, 125, 61, "Done", false, GUIEditor.tab[3]) GUIEditor.button[10] = guiCreateButton(32, 419, 187, 39, "Start New Life", false, GUIEditor.window[1]) GUIEditor.button[11] = guiCreateButton(426, 418, 187, 39, "Close", false, GUIEditor.window[1]) function kill3() triggerServerEvent("kill", localPlayer) guiSetVisible(GUIEditor_Window[1], false) guiSetVisible(GUIEditor_Label[1], false) guiSetVisible(GUIEditor_Label[2], false) guiSetVisible(GUIEditor_Label[3], false) guiSetVisible(GUIEditor_Label[4], false) guiSetVisible(GUIEditor_Label[5], false) guiSetVisible(GUIEditor_Label[6], false) guiSetVisible(GUIEditor_Label[7], false) guiSetVisible(GUIEditor_Label[8], false) guiSetVisible(GUIEditor_Label[9], false) guiSetVisible(GUIEditor_Label[10], false) guiSetVisible(GUIEditor_TabPanel[1], false) guiSetVisible(GUIEditor_Label[6], false) guiSetVisible(GUIEditor_Tab[2], false) guiSetVisible(GUIEditor_Tab[3], false) guiSetVisible(GUIEditor_Label[7], false) guiSetVisible(GUIEditor_Button[2], false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[5], kill3, false) function hide() guiSetVisible(GUIEditor_Window[1], false) guiSetVisible(GUIEditor_Label[1], false) guiSetVisible(GUIEditor_Label[2], false) guiSetVisible(GUIEditor_Label[3], false) guiSetVisible(GUIEditor_Label[4], false) guiSetVisible(GUIEditor_Label[5], false) guiSetVisible(GUIEditor_Label[6], false) guiSetVisible(GUIEditor_Label[7], false) guiSetVisible(GUIEditor_Label[8], false) guiSetVisible(GUIEditor_Label[9], false) guiSetVisible(GUIEditor_Label[10], false) guiSetVisible(GUIEditor_TabPanel[1], false) guiSetVisible(GUIEditor_Label[6], false) guiSetVisible(GUIEditor_Tab[2], false) guiSetVisible(GUIEditor_Tab[3], false) guiSetVisible(GUIEditor_Label[7], false) guiSetVisible(GUIEditor_Button[2], false) showCursor ( false ) end addEventHandler( "onClientResourceStart", getRootElement( ), hide) addEventHandler ( "onClientGUIClick", GUIEditor_Button[4], hide, false ) end addEvent ("RespawnGUI",true) addEventHandler ("RespawnGUI",getResourceRootElement(getThisResource()),RespawnGUI2) try this, DON'T make functions: createBlip on same name .... it over writes the first one, and it wont work P.S. I can't help you when the script is missing some of its part ... like one of the function ...
Castillo Posted December 27, 2012 Posted December 27, 2012 You can't use "-" in a function name: Respawn-function1() Should be: Respawnfunction1()
manve1 Posted December 27, 2012 Posted December 27, 2012 forgot, sorry ... i was in a rush .. as i got Adoub and his friend on my tail trying to steal my made scripts
||BuLLeT|| Posted December 27, 2012 Author Posted December 27, 2012 its not showing blip and its not showing even disc when i come to that place
Castillo Posted December 27, 2012 Posted December 27, 2012 Write: "/debugscript 3" in the chat and see if it has any error.
||BuLLeT|| Posted December 27, 2012 Author Posted December 27, 2012 ok, thanks and heres problem what to do?
Castillo Posted December 27, 2012 Posted December 27, 2012 That's an error on the client side, and pickup is server side, should be created still. Anyway, remove the 'end' at line 108 on the client side script.
||BuLLeT|| Posted December 27, 2012 Author Posted December 27, 2012 client works but server...(look debug script down there) if u know how to fix it, pls post how whole server file would need to look like in [lua ]
manve1 Posted December 27, 2012 Posted December 27, 2012 picture is to small to read the debug script .. (( well, for me it is ))
||BuLLeT|| Posted December 27, 2012 Author Posted December 27, 2012 here you go link to it http://postimage.org/image/5cjuh085p/ and http://postimage.org/image/7v5jhotvx/
manve1 Posted December 27, 2012 Posted December 27, 2012 these errors are on client side, not server side ..
||BuLLeT|| Posted December 27, 2012 Author Posted December 27, 2012 can you show in [lua] how client should be?
||BuLLeT|| Posted December 27, 2012 Author Posted December 27, 2012 function Respawnfunction1() Respawn = createMarker(1565.5197753906,-1634.7216796875,13.55480670929,"cylinder",0.2999, 248, 248, 255, 150 ) cph = createPickup (1565.5197753906,-1634.7216796875,13.55480670929, 3, 1277, 0 ) Respawn2 = createMarker(-2442.1293,753.10,35.17,"cylinder",0.2999, 248, 248, 255, 150 ) cpp = createPickup (-2442.1293,753.10,35.17, 3, 1277, 0 ) end addEventHandler ("onResourceStart",getResourceRootElement(getThisResource()),Respawn-function1) blip = createBlip ( 1565.5197753906,-1634.7216796875,13.55480670929,35 ) blip2 = createBlip ( -2442.1293,753.10,35.17,35 ) function RespawnGUI2(hitElement) if source == Respawn1 then triggerClientEvent (hitElement,"RespawnGUI",getRootElement()) elseif source == Respawn then triggerClientEvent (hitElement,"RespawnGUI",getRootElement()) end end addEventHandler ("onMarkerHit",getRootElement(),RespawnGUI) function kill2() setElementHealth(source,0) end addEvent("kill", true) addEventHandler("kill",getRootElement(),kill2)
Castillo Posted December 27, 2012 Posted December 27, 2012 Here: addEventHandler ("onResourceStart",getResourceRootElement(getThisResource()),Respawn-function1) You forgot to remove the "-". addEventHandler ( "onResourceStart", resourceRoot, Respawnfunction1 )
||BuLLeT|| Posted December 27, 2012 Author Posted December 27, 2012 good but problem is in GUI now, its showing when i start script GUIEditor = { tab = {}, button = {}, edit = {}, window = {}, gridlist = {}, label = {}, tabpanel = {}, } GUIEditor.window[1] = guiCreateWindow(240, 267, 632, 467, "Hawk|RPG Disc System", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 23, 613, 388, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Disc", GUIEditor.tabpanel[1]) GUIEditor.label[1] = guiCreateLabel(15, 36, 226, 59, "Address:", false, GUIEditor.tab[1]) local font_0 = guiCreateFont(":[Hawk]GuiEditor/fonts/PetitFormalScript.ttf") guiSetFont(GUIEditor.label[1], font_0) guiLabelSetColor(GUIEditor.label[1], 255, 254, 254) GUIEditor.label[2] = guiCreateLabel(15, 95, 226, 59, "Value:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[2], font_0) guiLabelSetColor(GUIEditor.label[2], 255, 254, 254) GUIEditor.label[3] = guiCreateLabel(15, 154, 226, 59, "Owner:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[3], font_0) guiLabelSetColor(GUIEditor.label[3], 255, 254, 254) GUIEditor.button[1] = guiCreateButton(21, 229, 129, 44, "Buy", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(21, 300, 129, 44, "Sell", false, GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Garage", GUIEditor.tabpanel[1]) GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 587, 197, false, GUIEditor.tab[2]) guiGridListAddColumn(GUIEditor.gridlist[1], "Names", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Health", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Fuel", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Cost", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Status", 0.2) GUIEditor.button[3] = guiCreateButton(28, 234, 175, 67, "Spawn Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[4] = guiCreateButton(226, 234, 175, 67, "Repair Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[5] = guiCreateButton(420, 234, 175, 67, "Park Vehicle", false, GUIEditor.tab[2]) GUIEditor.tab[3] = guiCreateTab("Weapons", GUIEditor.tabpanel[1]) GUIEditor.gridlist[2] = guiCreateGridList(26, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[2], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[2], "Ammo", 0.4) GUIEditor.gridlist[3] = guiCreateGridList(383, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[3], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[3], "Ammo", 0.4) GUIEditor.label[4] = guiCreateLabel(63, 48, 219, 42, "Your Weapons", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[4], font_0) GUIEditor.label[5] = guiCreateLabel(468, 48, 219, 42, "Storage", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[5], font_0) GUIEditor.button[6] = guiCreateButton(262, 118, 103, 55, "--->", false, GUIEditor.tab[3]) GUIEditor.button[7] = guiCreateButton(262, 228, 103, 55, "<---", false, GUIEditor.tab[3]) GUIEditor.edit[1] = guiCreateEdit(264, 180, 101, 43, " ammo ", false, GUIEditor.tab[3]) GUIEditor.button[9] = guiCreateButton(255, 10, 125, 61, "Done", false, GUIEditor.tab[3]) GUIEditor.button[10] = guiCreateButton(32, 419, 187, 39, "Start New Life", false, GUIEditor.window[1]) GUIEditor.button[11] = guiCreateButton(426, 418, 187, 39, "Close", false, GUIEditor.window[1]) function kill3() triggerServerEvent("kill", localPlayer) guiSetVisible(GUIEditor_Window[1], false) guiSetVisible(GUIEditor_Label[1], false) guiSetVisible(GUIEditor_Label[2], false) guiSetVisible(GUIEditor_Label[3], false) guiSetVisible(GUIEditor_Label[4], false) guiSetVisible(GUIEditor_Label[5], false) guiSetVisible(GUIEditor_Label[6], false) guiSetVisible(GUIEditor_Label[7], false) guiSetVisible(GUIEditor_Label[8], false) guiSetVisible(GUIEditor_Label[9], false) guiSetVisible(GUIEditor_Label[10], false) guiSetVisible(GUIEditor_TabPanel[1], false) guiSetVisible(GUIEditor_Label[6], false) guiSetVisible(GUIEditor_Tab[2], false) guiSetVisible(GUIEditor_Tab[3], false) guiSetVisible(GUIEditor_Label[7], false) guiSetVisible(GUIEditor_Button[2], false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[5], kill3, false) function hide() guiSetVisible(GUIEditor_Window[1], false) guiSetVisible(GUIEditor_Label[1], false) guiSetVisible(GUIEditor_Label[2], false) guiSetVisible(GUIEditor_Label[3], false) guiSetVisible(GUIEditor_Label[4], false) guiSetVisible(GUIEditor_Label[5], false) guiSetVisible(GUIEditor_Label[6], false) guiSetVisible(GUIEditor_Label[7], false) guiSetVisible(GUIEditor_Label[8], false) guiSetVisible(GUIEditor_Label[9], false) guiSetVisible(GUIEditor_Label[10], false) guiSetVisible(GUIEditor_TabPanel[1], false) guiSetVisible(GUIEditor_Label[6], false) guiSetVisible(GUIEditor_Tab[2], false) guiSetVisible(GUIEditor_Tab[3], false) guiSetVisible(GUIEditor_Label[7], false) guiSetVisible(GUIEditor_Button[2], false) showCursor ( false ) end addEventHandler( "onClientResourceStart", getRootElement( ), hide) addEventHandler ( "onClientGUIClick", GUIEditor_Button[4], hide, false ) addEvent ("RespawnGUI",true) addEventHandler ("RespawnGUI",getResourceRootElement(getThisResource()),RespawnGUI2)
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