xSet Posted April 5, 2018 Share Posted April 5, 2018 (edited) GUIEditor = { tab = {}, tabpanel = {}, edit = {}, button = {}, window = {}, label = {}, radiobutton = {} } addEventHandler("onClientResourceStart", resourceRoot, function () GUIEditor.window[1] = guiCreateWindow(190, 76, 645, 642, "Vehicle Spawn by xSet", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 20, 626, 613, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Vehicles", GUIEditor.tabpanel[1]) GUIEditor.button[1] = guiCreateButton(40, 55, 101, 91, "Patriot", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(260, 55, 101, 91, "Boat", false, GUIEditor.tab[1]) GUIEditor.button[3] = guiCreateButton(150, 55, 101, 91, "Bobcat", false, GUIEditor.tab[1]) GUIEditor.button[4] = guiCreateButton(260, 155, 101, 91, "Coach", false, GUIEditor.tab[1]) GUIEditor.button[5] = guiCreateButton(150, 155, 101, 91, "Bike", false, GUIEditor.tab[1]) GUIEditor.button[6] = guiCreateButton(40, 155, 101, 91, "Sanchez", false, GUIEditor.tab[1]) GUIEditor.button[7] = guiCreateButton(40, 255, 101, 91, "Barracks", false, GUIEditor.tab[1]) GUIEditor.button[8] = guiCreateButton(150, 255, 101, 91, "Maverick", false, GUIEditor.tab[1]) GUIEditor.button[9] = guiCreateButton(260, 255, 101, 91, "Police Maverick", false, GUIEditor.tab[1]) GUIEditor.button[10] = guiCreateButton(370, 55, 101, 91, "Quad Bike", false, GUIEditor.tab[1]) GUIEditor.button[11] = guiCreateButton(370, 155, 101, 91, "Camper", false, GUIEditor.tab[1]) GUIEditor.button[12] = guiCreateButton(370, 255, 101, 91, "LSPD", false, GUIEditor.tab[1]) GUIEditor.button[13] = guiCreateButton(480, 255, 101, 91, "Trator", false, GUIEditor.tab[1]) GUIEditor.button[14] = guiCreateButton(480, 155, 101, 91, "Regina", false, GUIEditor.tab[1]) GUIEditor.button[15] = guiCreateButton(480, 55, 101, 91, "Dodo", false, GUIEditor.tab[1]) GUIEditor.button[16] = guiCreateButton(40, 355, 101, 91, "Clover", false, GUIEditor.tab[1]) GUIEditor.button[17] = guiCreateButton(480, 355, 101, 91, "Mesa", false, GUIEditor.tab[1]) GUIEditor.button[18] = guiCreateButton(40, 475, 541, 91, "Spawn Vehicle", false, GUIEditor.tab[1]) GUIEditor.edit[1] = guiCreateEdit(220, 435, 41, 20, "30", false, GUIEditor.tab[1]) GUIEditor.edit[2] = guiCreateEdit(430, 435, 41, 20, "1", false, GUIEditor.tab[1]) GUIEditor.edit[3] = guiCreateEdit(290, 435, 41, 20, "4", false, GUIEditor.tab[1]) GUIEditor.edit[4] = guiCreateEdit(150, 435, 41, 20, "16", false, GUIEditor.tab[1]) GUIEditor.edit[5] = guiCreateEdit(360, 435, 41, 20, "1", false, GUIEditor.tab[1]) GUIEditor.edit[6] = guiCreateEdit(160, 385, 161, 20, "Quad Bike", false, GUIEditor.tab[1]) GUIEditor.edit[7] = guiCreateEdit(280, 385, 41, 20, "471", false, GUIEditor.tab[1]) GUIEditor.radiobutton[1] = guiCreateRadioButton(335, 375, 161, 20, "Permanent Spawn", false, GUIEditor.tab[1]) GUIEditor.radiobutton[2] = guiCreateRadioButton(335, 395, 161, 20, "Temporary Spawn", false, GUIEditor.tab[1]) guiRadioButtonSetSelected(GUIEditor.radiobutton[2], true) GUIEditor.label[1] = guiCreateLabel(259, 354, 150, 21, "Vehicle Information:", false, GUIEditor.tab[1]) GUIEditor.label[2] = guiCreateLabel(155, 415, 41, 16, "Slots:", false, GUIEditor.tab[1]) GUIEditor.label[3] = guiCreateLabel(228, 415, 31, 16, "Fuel:", false, GUIEditor.tab[1]) GUIEditor.label[4] = guiCreateLabel(292, 415, 41, 16, "Tires", false, GUIEditor.tab[1]) GUIEditor.label[5] = guiCreateLabel(360, 415, 51, 16, "Engines:", false, GUIEditor.tab[1]) GUIEditor.label[6] = guiCreateLabel(432, 415, 51, 16, "Tanks:", false, GUIEditor.tab[1]) GUIEditor.label[7] = guiCreateLabel(241, 24, 261, 21, "Select a Vehicle To Spawn :", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[7], "clear-normal") GUIEditor.tab[2] = guiCreateTab("Editados", GUIEditor.tabpanel[1]) GUIEditor.button[19] = guiCreateButton(40, 55, 101, 91, "Leviathan", false, GUIEditor.tab[2]) GUIEditor.button[20] = guiCreateButton(150, 55, 101, 91, "Rustler", false, GUIEditor.tab[2]) GUIEditor.button[21] = guiCreateButton(260, 55, 101, 91, "Maverick", false, GUIEditor.tab[2]) GUIEditor.button[22] = guiCreateButton(370, 55, 101, 91, "Police Maverick", false, GUIEditor.tab[2]) GUIEditor.button[23] = guiCreateButton(480, 55, 101, 91, "Raindance", false, GUIEditor.tab[2]) GUIEditor.button[24] = guiCreateButton(40, 155, 101, 91, "Shamal", false, GUIEditor.tab[2]) GUIEditor.button[25] = guiCreateButton(150, 155, 101, 91, "News Maverick", false, GUIEditor.tab[2]) GUIEditor.button[26] = guiCreateButton(260, 155, 101, 91, "Phoenix", false, GUIEditor.tab[2]) GUIEditor.button[27] = guiCreateButton(480, 255, 101, 91, "Bobcat", false, GUIEditor.tab[2]) GUIEditor.button[28] = guiCreateButton(150, 255, 101, 91, "Ambulance", false, GUIEditor.tab[2]) GUIEditor.button[29] = guiCreateButton(40, 255, 101, 91, "Super GT", false, GUIEditor.tab[2]) GUIEditor.button[30] = guiCreateButton(370, 255, 101, 91, "Bravura", false, GUIEditor.tab[2]) GUIEditor.button[31] = guiCreateButton(260, 255, 101, 91, "Sabre", false, GUIEditor.tab[2]) GUIEditor.button[32] = guiCreateButton(370, 155, 101, 91, "FBI Truck", false, GUIEditor.tab[2]) GUIEditor.button[33] = guiCreateButton(480, 155, 101, 91, "Infernus", false, GUIEditor.tab[2]) GUIEditor.button[34] = guiCreateButton(40, 355, 101, 91, "Barracks", false, GUIEditor.tab[2]) GUIEditor.button[35] = guiCreateButton(480, 355, 101, 91, "Hotring Racer", false, GUIEditor.tab[2]) GUIEditor.button[36] = guiCreateButton(40, 475, 541, 91, "Spawn Vehicle", false, GUIEditor.tab[2]) GUIEditor.edit[8] = guiCreateEdit(220, 435, 41, 20, "100", false, GUIEditor.tab[2]) GUIEditor.edit[9] = guiCreateEdit(430, 435, 41, 20, "1", false, GUIEditor.tab[2]) GUIEditor.edit[10] = guiCreateEdit(290, 435, 41, 20, "4", false, GUIEditor.tab[2]) GUIEditor.edit[11] = guiCreateEdit(150, 435, 41, 20, "100", false, GUIEditor.tab[2]) GUIEditor.edit[12] = guiCreateEdit(360, 435, 41, 20, "1", false, GUIEditor.tab[2]) GUIEditor.edit[13] = guiCreateEdit(160, 385, 161, 20, "Phoenix", false, GUIEditor.tab[2]) GUIEditor.edit[14] = guiCreateEdit(280, 385, 41, 20, "603", false, GUIEditor.tab[2]) GUIEditor.radiobutton[3] = guiCreateRadioButton(335, 375, 161, 20, "Permanent Spawn", false, GUIEditor.tab[2]) guiRadioButtonSetSelected(GUIEditor.radiobutton[3], true) GUIEditor.radiobutton[4] = guiCreateRadioButton(335, 395, 161, 20, "Temporary Spawn", false, GUIEditor.tab[2]) GUIEditor.label[8] = guiCreateLabel(259, 355, 150, 21, "Vehicle Information:", false, GUIEditor.tab[2]) GUIEditor.label[9] = guiCreateLabel(155, 415, 41, 16, "Slots:", false, GUIEditor.tab[2]) GUIEditor.label[10] = guiCreateLabel(228, 415, 31, 16, "Fuel:", false, GUIEditor.tab[2]) GUIEditor.label[11] = guiCreateLabel(292, 415, 41, 16, "Tires", false, GUIEditor.tab[2]) GUIEditor.label[12] = guiCreateLabel(360, 415, 51, 16, "Engines:", false, GUIEditor.tab[2]) GUIEditor.label[13] = guiCreateLabel(432, 415, 51, 16, "Tanks:", false, GUIEditor.tab[2]) GUIEditor.label[14] = guiCreateLabel(229, 24, 261, 21, "Select a Vehicle To Spawn :", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[14], "clear-normal") GUIEditor.tab[3] = guiCreateTab("Editados", GUIEditor.tabpanel[1]) GUIEditor.button[37] = guiCreateButton(40, 55, 101, 91, "PCJ600", false, GUIEditor.tab[3]) GUIEditor.button[38] = guiCreateButton(150, 55, 101, 91, "Freeway", false, GUIEditor.tab[3]) GUIEditor.button[39] = guiCreateButton(260, 55, 101, 91, "Sanchez", false, GUIEditor.tab[3]) GUIEditor.button[40] = guiCreateButton(370, 55, 101, 91, "Patriot", false, GUIEditor.tab[3]) GUIEditor.button[41] = guiCreateButton(480, 55, 101, 91, "Quad", false, GUIEditor.tab[3]) GUIEditor.button[42] = guiCreateButton(40, 155, 101, 91, "Camper", false, GUIEditor.tab[3]) GUIEditor.button[43] = guiCreateButton(150, 155, 101, 91, "Mesa", false, GUIEditor.tab[3]) GUIEditor.button[44] = guiCreateButton(260, 155, 101, 91, "Bike", false, GUIEditor.tab[3]) GUIEditor.button[45] = guiCreateButton(370, 155, 101, 91, "HPV1000", false, GUIEditor.tab[3]) GUIEditor.button[46] = guiCreateButton(480, 155, 101, 91, "FBI Rancher", false, GUIEditor.tab[3]) GUIEditor.button[47] = guiCreateButton(40, 255, 101, 91, "Police", false, GUIEditor.tab[3]) GUIEditor.button[48] = guiCreateButton(150, 255, 101, 91, "Tank", false, GUIEditor.tab[3]) GUIEditor.button[49] = guiCreateButton(260, 255, 101, 91, "Landstalker", false, GUIEditor.tab[3]) GUIEditor.button[50] = guiCreateButton(370, 255, 101, 91, "Alpha", false, GUIEditor.tab[3]) GUIEditor.button[51] = guiCreateButton(480, 255, 101, 91, "Buffalo", false, GUIEditor.tab[3]) GUIEditor.button[52] = guiCreateButton(40, 355, 101, 91, "NRG-500", false, GUIEditor.tab[3]) GUIEditor.button[53] = guiCreateButton(480, 355, 101, 91, "Bullet", false, GUIEditor.tab[3]) GUIEditor.button[54] = guiCreateButton(40, 475, 541, 91, "Spawn Vehicle", false, GUIEditor.tab[3]) GUIEditor.edit[15] = guiCreateEdit(220, 435, 41, 20, "100", false, GUIEditor.tab[3]) GUIEditor.edit[16] = guiCreateEdit(430, 435, 41, 20, "1", false, GUIEditor.tab[3]) GUIEditor.edit[17] = guiCreateEdit(290, 435, 41, 20, "2", false, GUIEditor.tab[3]) GUIEditor.edit[18] = guiCreateEdit(150, 435, 41, 20, "100", false, GUIEditor.tab[3]) GUIEditor.edit[19] = guiCreateEdit(360, 435, 41, 20, "1", false, GUIEditor.tab[3]) GUIEditor.edit[20] = guiCreateEdit(160, 385, 161, 20, "HPV1000", false, GUIEditor.tab[3]) GUIEditor.edit[21] = guiCreateEdit(280, 385, 41, 20, "523", false, GUIEditor.tab[3]) GUIEditor.radiobutton[5] = guiCreateRadioButton(335, 375, 161, 20, "Permanent Spawn", false, GUIEditor.tab[3]) GUIEditor.radiobutton[6] = guiCreateRadioButton(335, 395, 161, 20, "Temporary Spawn", false, GUIEditor.tab[3]) guiRadioButtonSetSelected(GUIEditor.radiobutton[6], true) GUIEditor.label[15] = guiCreateLabel(259, 355, 150, 21, "Vehicle Information:", false, GUIEditor.tab[3]) GUIEditor.label[16] = guiCreateLabel(155, 415, 41, 16, "Slots:", false, GUIEditor.tab[3]) GUIEditor.label[17] = guiCreateLabel(228, 415, 31, 16, "Fuel:", false, GUIEditor.tab[3]) GUIEditor.label[18] = guiCreateLabel(292, 415, 41, 16, "Tires:", false, GUIEditor.tab[3]) GUIEditor.label[19] = guiCreateLabel(360, 415, 51, 16, "Engines:", false, GUIEditor.tab[3]) GUIEditor.label[20] = guiCreateLabel(432, 415, 51, 16, "Tanks:", false, GUIEditor.tab[3]) GUIEditor.label[21] = guiCreateLabel(229, 24, 261, 21, "Select a Vehicle To Spawn :", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[21], "clear-normal") end end Hello guys! I have 2 problems with the gui you see. 1:I dont know how to make it so when i press lets say F4 it pops up and 2: How can i make so when i press lets say GuiEditor.button[1] it spawns a patriot. If there is any good scripter that could help me with a example it would be awesome, i dont understand nothing from wiki i read it like 5 times EDIT: How can i make spawn permanent when i press GUIEditor.radiobutton[3] to spawn the car permanent and when i press GUIEditor.radiobutton[4] to spawn the car temporary Thank you! Edited April 5, 2018 by xSet Link to comment
Dimos7 Posted April 5, 2018 Share Posted April 5, 2018 (edited) bindKey guiGridListGetSelectedItem createVehicle setTimer destroyElement That is the function you need Edited April 5, 2018 by Dimos7 Link to comment
xSet Posted April 5, 2018 Author Share Posted April 5, 2018 Can you use them in a example please? It would be very helpfull Link to comment
Dimos7 Posted April 5, 2018 Share Posted April 5, 2018 --- Client Side GUIEditor = { tab = {}, tabpanel = {}, edit = {}, button = {}, window = {}, label = {}, radiobutton = {} } GUIEditor.window[1] = guiCreateWindow(190, 76, 645, 642, "Vehicle Spawn by xSet", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 20, 626, 613, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Vehicles", GUIEditor.tabpanel[1]) GUIEditor.button[1] = guiCreateButton(40, 55, 101, 91, "Patriot", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(260, 55, 101, 91, "Boat", false, GUIEditor.tab[1]) GUIEditor.button[3] = guiCreateButton(150, 55, 101, 91, "Bobcat", false, GUIEditor.tab[1]) GUIEditor.button[4] = guiCreateButton(260, 155, 101, 91, "Coach", false, GUIEditor.tab[1]) GUIEditor.button[5] = guiCreateButton(150, 155, 101, 91, "Bike", false, GUIEditor.tab[1]) GUIEditor.button[6] = guiCreateButton(40, 155, 101, 91, "Sanchez", false, GUIEditor.tab[1]) GUIEditor.button[7] = guiCreateButton(40, 255, 101, 91, "Barracks", false, GUIEditor.tab[1]) GUIEditor.button[8] = guiCreateButton(150, 255, 101, 91, "Maverick", false, GUIEditor.tab[1]) GUIEditor.button[9] = guiCreateButton(260, 255, 101, 91, "Police Maverick", false, GUIEditor.tab[1]) GUIEditor.button[10] = guiCreateButton(370, 55, 101, 91, "Quad Bike", false, GUIEditor.tab[1]) GUIEditor.button[11] = guiCreateButton(370, 155, 101, 91, "Camper", false, GUIEditor.tab[1]) GUIEditor.button[12] = guiCreateButton(370, 255, 101, 91, "LSPD", false, GUIEditor.tab[1]) GUIEditor.button[13] = guiCreateButton(480, 255, 101, 91, "Trator", false, GUIEditor.tab[1]) GUIEditor.button[14] = guiCreateButton(480, 155, 101, 91, "Regina", false, GUIEditor.tab[1]) GUIEditor.button[15] = guiCreateButton(480, 55, 101, 91, "Dodo", false, GUIEditor.tab[1]) GUIEditor.button[16] = guiCreateButton(40, 355, 101, 91, "Clover", false, GUIEditor.tab[1]) GUIEditor.button[17] = guiCreateButton(480, 355, 101, 91, "Mesa", false, GUIEditor.tab[1]) GUIEditor.button[18] = guiCreateButton(40, 475, 541, 91, "Spawn Vehicle", false, GUIEditor.tab[1]) GUIEditor.edit[1] = guiCreateEdit(220, 435, 41, 20, "30", false, GUIEditor.tab[1]) GUIEditor.edit[2] = guiCreateEdit(430, 435, 41, 20, "1", false, GUIEditor.tab[1]) GUIEditor.edit[3] = guiCreateEdit(290, 435, 41, 20, "4", false, GUIEditor.tab[1]) GUIEditor.edit[4] = guiCreateEdit(150, 435, 41, 20, "16", false, GUIEditor.tab[1]) GUIEditor.edit[5] = guiCreateEdit(360, 435, 41, 20, "1", false, GUIEditor.tab[1]) GUIEditor.edit[6] = guiCreateEdit(160, 385, 161, 20, "Quad Bike", false, GUIEditor.tab[1]) GUIEditor.edit[7] = guiCreateEdit(280, 385, 41, 20, "471", false, GUIEditor.tab[1]) GUIEditor.radiobutton[1] = guiCreateRadioButton(335, 375, 161, 20, "Permanent Spawn", false, GUIEditor.tab[1]) GUIEditor.radiobutton[2] = guiCreateRadioButton(335, 395, 161, 20, "Temporary Spawn", false, GUIEditor.tab[1]) guiRadioButtonSetSelected(GUIEditor.radiobutton[2], true) GUIEditor.label[1] = guiCreateLabel(259, 354, 150, 21, "Vehicle Information:", false, GUIEditor.tab[1]) GUIEditor.label[2] = guiCreateLabel(155, 415, 41, 16, "Slots:", false, GUIEditor.tab[1]) GUIEditor.label[3] = guiCreateLabel(228, 415, 31, 16, "Fuel:", false, GUIEditor.tab[1]) GUIEditor.label[4] = guiCreateLabel(292, 415, 41, 16, "Tires", false, GUIEditor.tab[1]) GUIEditor.label[5] = guiCreateLabel(360, 415, 51, 16, "Engines:", false, GUIEditor.tab[1]) GUIEditor.label[6] = guiCreateLabel(432, 415, 51, 16, "Tanks:", false, GUIEditor.tab[1]) GUIEditor.label[7] = guiCreateLabel(241, 24, 261, 21, "Select a Vehicle To Spawn :", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[7], "clear-normal") GUIEditor.tab[2] = guiCreateTab("Editados", GUIEditor.tabpanel[1]) GUIEditor.button[19] = guiCreateButton(40, 55, 101, 91, "Leviathan", false, GUIEditor.tab[2]) GUIEditor.button[20] = guiCreateButton(150, 55, 101, 91, "Rustler", false, GUIEditor.tab[2]) GUIEditor.button[21] = guiCreateButton(260, 55, 101, 91, "Maverick", false, GUIEditor.tab[2]) GUIEditor.button[22] = guiCreateButton(370, 55, 101, 91, "Police Maverick", false, GUIEditor.tab[2]) GUIEditor.button[23] = guiCreateButton(480, 55, 101, 91, "Raindance", false, GUIEditor.tab[2]) GUIEditor.button[24] = guiCreateButton(40, 155, 101, 91, "Shamal", false, GUIEditor.tab[2]) GUIEditor.button[25] = guiCreateButton(150, 155, 101, 91, "News Maverick", false, GUIEditor.tab[2]) GUIEditor.button[26] = guiCreateButton(260, 155, 101, 91, "Phoenix", false, GUIEditor.tab[2]) GUIEditor.button[27] = guiCreateButton(480, 255, 101, 91, "Bobcat", false, GUIEditor.tab[2]) GUIEditor.button[28] = guiCreateButton(150, 255, 101, 91, "Ambulance", false, GUIEditor.tab[2]) GUIEditor.button[29] = guiCreateButton(40, 255, 101, 91, "Super GT", false, GUIEditor.tab[2]) GUIEditor.button[30] = guiCreateButton(370, 255, 101, 91, "Bravura", false, GUIEditor.tab[2]) GUIEditor.button[31] = guiCreateButton(260, 255, 101, 91, "Sabre", false, GUIEditor.tab[2]) GUIEditor.button[32] = guiCreateButton(370, 155, 101, 91, "FBI Truck", false, GUIEditor.tab[2]) GUIEditor.button[33] = guiCreateButton(480, 155, 101, 91, "Infernus", false, GUIEditor.tab[2]) GUIEditor.button[34] = guiCreateButton(40, 355, 101, 91, "Barracks", false, GUIEditor.tab[2]) GUIEditor.button[35] = guiCreateButton(480, 355, 101, 91, "Hotring Racer", false, GUIEditor.tab[2]) GUIEditor.button[36] = guiCreateButton(40, 475, 541, 91, "Spawn Vehicle", false, GUIEditor.tab[2]) GUIEditor.edit[8] = guiCreateEdit(220, 435, 41, 20, "100", false, GUIEditor.tab[2]) GUIEditor.edit[9] = guiCreateEdit(430, 435, 41, 20, "1", false, GUIEditor.tab[2]) GUIEditor.edit[10] = guiCreateEdit(290, 435, 41, 20, "4", false, GUIEditor.tab[2]) GUIEditor.edit[11] = guiCreateEdit(150, 435, 41, 20, "100", false, GUIEditor.tab[2]) GUIEditor.edit[12] = guiCreateEdit(360, 435, 41, 20, "1", false, GUIEditor.tab[2]) GUIEditor.edit[13] = guiCreateEdit(160, 385, 161, 20, "Phoenix", false, GUIEditor.tab[2]) GUIEditor.edit[14] = guiCreateEdit(280, 385, 41, 20, "603", false, GUIEditor.tab[2]) GUIEditor.radiobutton[3] = guiCreateRadioButton(335, 375, 161, 20, "Permanent Spawn", false, GUIEditor.tab[2]) guiRadioButtonSetSelected(GUIEditor.radiobutton[3], true) GUIEditor.radiobutton[4] = guiCreateRadioButton(335, 395, 161, 20, "Temporary Spawn", false, GUIEditor.tab[2]) GUIEditor.label[8] = guiCreateLabel(259, 355, 150, 21, "Vehicle Information:", false, GUIEditor.tab[2]) GUIEditor.label[9] = guiCreateLabel(155, 415, 41, 16, "Slots:", false, GUIEditor.tab[2]) GUIEditor.label[10] = guiCreateLabel(228, 415, 31, 16, "Fuel:", false, GUIEditor.tab[2]) GUIEditor.label[11] = guiCreateLabel(292, 415, 41, 16, "Tires", false, GUIEditor.tab[2]) GUIEditor.label[12] = guiCreateLabel(360, 415, 51, 16, "Engines:", false, GUIEditor.tab[2]) GUIEditor.label[13] = guiCreateLabel(432, 415, 51, 16, "Tanks:", false, GUIEditor.tab[2]) GUIEditor.label[14] = guiCreateLabel(229, 24, 261, 21, "Select a Vehicle To Spawn :", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[14], "clear-normal") GUIEditor.tab[3] = guiCreateTab("Editados", GUIEditor.tabpanel[1]) GUIEditor.button[37] = guiCreateButton(40, 55, 101, 91, "PCJ600", false, GUIEditor.tab[3]) GUIEditor.button[38] = guiCreateButton(150, 55, 101, 91, "Freeway", false, GUIEditor.tab[3]) GUIEditor.button[39] = guiCreateButton(260, 55, 101, 91, "Sanchez", false, GUIEditor.tab[3]) GUIEditor.button[40] = guiCreateButton(370, 55, 101, 91, "Patriot", false, GUIEditor.tab[3]) GUIEditor.button[41] = guiCreateButton(480, 55, 101, 91, "Quad", false, GUIEditor.tab[3]) GUIEditor.button[42] = guiCreateButton(40, 155, 101, 91, "Camper", false, GUIEditor.tab[3]) GUIEditor.button[43] = guiCreateButton(150, 155, 101, 91, "Mesa", false, GUIEditor.tab[3]) GUIEditor.button[44] = guiCreateButton(260, 155, 101, 91, "Bike", false, GUIEditor.tab[3]) GUIEditor.button[45] = guiCreateButton(370, 155, 101, 91, "HPV1000", false, GUIEditor.tab[3]) GUIEditor.button[46] = guiCreateButton(480, 155, 101, 91, "FBI Rancher", false, GUIEditor.tab[3]) GUIEditor.button[47] = guiCreateButton(40, 255, 101, 91, "Police", false, GUIEditor.tab[3]) GUIEditor.button[48] = guiCreateButton(150, 255, 101, 91, "Tank", false, GUIEditor.tab[3]) GUIEditor.button[49] = guiCreateButton(260, 255, 101, 91, "Landstalker", false, GUIEditor.tab[3]) GUIEditor.button[50] = guiCreateButton(370, 255, 101, 91, "Alpha", false, GUIEditor.tab[3]) GUIEditor.button[51] = guiCreateButton(480, 255, 101, 91, "Buffalo", false, GUIEditor.tab[3]) GUIEditor.button[52] = guiCreateButton(40, 355, 101, 91, "NRG-500", false, GUIEditor.tab[3]) GUIEditor.button[53] = guiCreateButton(480, 355, 101, 91, "Bullet", false, GUIEditor.tab[3]) GUIEditor.button[54] = guiCreateButton(40, 475, 541, 91, "Spawn Vehicle", false, GUIEditor.tab[3]) GUIEditor.edit[15] = guiCreateEdit(220, 435, 41, 20, "100", false, GUIEditor.tab[3]) GUIEditor.edit[16] = guiCreateEdit(430, 435, 41, 20, "1", false, GUIEditor.tab[3]) GUIEditor.edit[17] = guiCreateEdit(290, 435, 41, 20, "2", false, GUIEditor.tab[3]) GUIEditor.edit[18] = guiCreateEdit(150, 435, 41, 20, "100", false, GUIEditor.tab[3]) GUIEditor.edit[19] = guiCreateEdit(360, 435, 41, 20, "1", false, GUIEditor.tab[3]) GUIEditor.edit[20] = guiCreateEdit(160, 385, 161, 20, "HPV1000", false, GUIEditor.tab[3]) GUIEditor.edit[21] = guiCreateEdit(280, 385, 41, 20, "523", false, GUIEditor.tab[3]) GUIEditor.radiobutton[5] = guiCreateRadioButton(335, 375, 161, 20, "Permanent Spawn", false, GUIEditor.tab[3]) GUIEditor.radiobutton[6] = guiCreateRadioButton(335, 395, 161, 20, "Temporary Spawn", false, GUIEditor.tab[3]) guiRadioButtonSetSelected(GUIEditor.radiobutton[6], true) GUIEditor.label[15] = guiCreateLabel(259, 355, 150, 21, "Vehicle Information:", false, GUIEditor.tab[3]) GUIEditor.label[16] = guiCreateLabel(155, 415, 41, 16, "Slots:", false, GUIEditor.tab[3]) GUIEditor.label[17] = guiCreateLabel(228, 415, 31, 16, "Fuel:", false, GUIEditor.tab[3]) GUIEditor.label[18] = guiCreateLabel(292, 415, 41, 16, "Tires:", false, GUIEditor.tab[3]) GUIEditor.label[19] = guiCreateLabel(360, 415, 51, 16, "Engines:", false, GUIEditor.tab[3]) GUIEditor.label[20] = guiCreateLabel(432, 415, 51, 16, "Tanks:", false, GUIEditor.tab[3]) GUIEditor.label[21] = guiCreateLabel(229, 24, 261, 21, "Select a Vehicle To Spawn :", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[21], "clear-normal") function guiOpen() guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) end bindKey("F4", "down", guiOpen) addEventHandler("onClientGUIClick", root, function(button, state) if source == GUIEditor.button[1] and button == "left" and state == "up" then if guiRadioButtonGetSelected(GUIEditor.radiobutton[1]) then triggerServerEvent("makePremVehicle", localPlayer, "Patriot") elseif guiRadioButtonGetSelected(GUIEditor.radiobutton[2]) then triggerServerEvent("makeTempVehicle", localPlayer, "Patriot") end end end) -- Server Side function makePermVehicle(thePlayer,vehicleName) local x, y, z = getElementPosition(thePlayer) local r = getPedRotation(thePlayer) y = y + 5 r= r + 90 vehicle = createVehicle(getVehicleModelFromName(vehicleName), x, y, z, 0, 0 , r) end addEvent("makePermVehicle", true) addEventHandler("makePermVehicle", root, makePermVehicle) function makeTempVehicle(thePlayer,vehicleName) local x, y, z = getElementPosition(thePlayer) local r = getPedRotation(thePlayer) y = y + 5 r= r + 90 vehicle = createVehicle(getVehicleModelFromName(vehicleName), x, y, z, 0, 0 , r) setTimer(function() destoryElement(vehicle) end, 5000, 1) end addEvent("makeTempVehicle", true) addEventHandler("makeTempVehicle", root, makeTempVehicle) Link to comment
xSet Posted April 5, 2018 Author Share Posted April 5, 2018 (edited) Quote [2018-04-05 17:33:42] WARNING: [baseLV]\car_spawn_server.lua:12: Bad argument @ 'getElementPosition' [Expected element at argument 1, got string 'Patriot'] [2018-04-05 17:33:42] WARNING: [baseLV]\car_spawn_server.lua:13: Bad argument @ 'getPedRotation' [Expected ped at argument 1, got string 'Patriot'] [2018-04-05 17:33:42] ERROR: [baseLV]\car_spawn_server.lua:14: attempt to perform arithmetic on local 'y' (a nil value) [2018-04-05 17:33:48] WARNING: [baseLV]\car_spawn_server.lua:12: Bad argument @ 'getElementPosition' [Expected element at argument 1, got string 'Patriot'] [2018-04-05 17:33:48] WARNING: [baseLV]\car_spawn_server.lua:13: Bad argument @ 'getPedRotation' [Expected ped at argument 1, got string 'Patriot'] [2018-04-05 17:33:48] ERROR: [baseLV]\car_spawn_server.lua:14: attempt to perform arithmetic on local 'y' (a nil value) Any ideea? i can't understand how to get it fixed EDIT: Ignore the [baseLV] thing Edited April 5, 2018 by xSet 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