Jump to content

iFoReX

Members
  • Posts

    1,708
  • Joined

  • Last visited

Everything posted by iFoReX

  1. this line : function guiClick ( button, state, absoluteX, absoluteY ) if (source == GUIEditor_Button[1]) then triggerServerEvent ("carSpawn", getLocalPlayer()) end end
  2. : GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(11,92,229,464,"Mi panel de Spawn",false) GUIEditor_Button[1] = guiCreateButton(9,29,209,43,"Spawnear Vehiculo -1",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,75,208,41,"Spawnear Vehiculo -2",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,118,208,41,"Spawnear Vehiculo -3",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(9,162,208,41,"Spawnear Vehiculo -4",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(9,251,208,41,"Spawnear Vehiculo -5",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(9,206,208,41,"Spawnear Vehiculo -6",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(10,296,206,41,"Spawnear Vehiculo -7",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(10,340,206,41,"Spawnear Vehiculo -8",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(12,396,205,56,"GUI Creada por ElMota",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Window[2] = guiCreateWindow(11,340,219,216,"GUI Shop Panel",false) GUIEditor_Button[9] = guiCreateButton(18,70,168,32,"Comprar Vehiculo",false,GUIEditor_Window[2]) GUIEditor_Button[10] = guiCreateButton(18,109,168,32,"Vender Vehiculo",false,GUIEditor_Window[2]) GUIEditor_Button[12] = guiCreateButton(22,26,75,39,"Cancelar",false,GUIEditor_Window[2]) GUIEditor_Window[3] = guiCreateWindow(544,249,240,326,"Vehiculos",false) GUIEditor_Grid[1] = guiCreateGridList(9,24,222,293,false,GUIEditor_Window[3]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Autos",0.5) guiGridListAddColumn(GUIEditor_Grid[1],"Precio $",0.3) local cars = {{400,60000},{404,28000},{489,65000},{505,65000},{479,45000},{442,45000},{458,45000},{602,50000},{496,42500},{401,41000},{518,60000},{527,75000},{589,75000},{419,45000},{533,75000},{526,50000},{474,55000},{545,50000},{517,45000},{410,41000},{600,50000},{436,41000},{580,50000},{439,75000},{549,75000},{491,45000},{445,45000},{507,45000},{585,45000},{587,75000},{466,55000},{492,50000},{546,45000},{551,45000},{516,45000},{467,45000},{426,47500},{547,45000},{405,55000},{409,75000},{550,45000},{566,45000},{540,45000},{421,50000},{529,45000},{402,12000},{542,65000},{603,12000},{475,75000},{562,120000},{565,95000},{559,120000},{561,50000},{560,120000},{558,100000},{429,120000},{541,120000},{415,120000},{480,95000},{434,100000},{494,120000},{502,120000},{503,120000},{411,120000},{506,120000},{451,120000},{555,95000},{477,95000},{499,25000},{498,25000},{578,50000},{486,70000},{455,75000},{588,50000},{403,75000},{414,50000},{443,75000},{515,75000},{514,75000},{531,12000},{456,45000},{422,45000},{482,95000},{530,12000},{418,45000},{572,12000},{582,50000},{413,5000},{440,50000},{543,65000},{583,12000},{478,35000},{554,50000},{536,75000},{575,75000},{534,75000},{567,75000},{535,75000},{576,75000},{412,75000},{568,75000},{457,12000},{483,45000},{508,40000},{571,10000},{500,55000},{444,120000},{556,120000},{557,120000},{471,20000},{495,100000},{539,75000},{481,25050},{509,2500},{581,45000},{462,12000},{521,60000},{463,50000},{522,75000},{448,12000},{468,45000},{586,45000},{485,12000},{431,60000},{438,45000},{437,60000},{574,12000},{420,45000},{525,75000},{408,50000},{428,65000}} for i,v in ipairs (cars) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, carName, false, true) guiGridListSetItemText (GUIEditor_Grid[1], row, 2, tostring(v[2]), false, true) end GUIEditor_Window[4] = guiCreateWindow(252,171,409,187,"Verificacion",false) GUIEditor_Label[2] = guiCreateLabel(10,29,391,25,"Porfavor elije aqui un slot para tu vehiculo",false,GUIEditor_Window[4]) guiLabelSetColor(GUIEditor_Label[2],255,255,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Button[13] = guiCreateButton(10,59,100,37,"Acepto",false,GUIEditor_Window[4]) GUIEditor_Button[14] = guiCreateButton(112,65,100,31,"Cancelar",false,GUIEditor_Window[4]) GUIEditor_Button[15] = guiCreateButton(10,128,43,46,"Slot-1",false,GUIEditor_Window[4]) GUIEditor_Button[16] = guiCreateButton(57,129,43,46,"Slot-2",false,GUIEditor_Window[4]) GUIEditor_Button[17] = guiCreateButton(103,129,43,46,"Slot-3",false,GUIEditor_Window[4]) GUIEditor_Button[18] = guiCreateButton(148,129,43,46,"Slot-4",false,GUIEditor_Window[4]) GUIEditor_Button[19] = guiCreateButton(193,129,43,46,"Slot-5",false,GUIEditor_Window[4]) GUIEditor_Button[20] = guiCreateButton(238,129,43,46,"Slot-6",false,GUIEditor_Window[4]) GUIEditor_Button[21] = guiCreateButton(283,129,43,46,"Slot-7",false,GUIEditor_Window[4]) GUIEditor_Button[22] = guiCreateButton(328,129,43,46,"Slot-8",false,GUIEditor_Window[4]) GUIEditor_Window[5] = guiCreateWindow(214,193,324,151,"GUI Sistema de Colores RGB",false) GUIEditor_Edit[1] = guiCreateEdit(24,53,51,28,"",false,GUIEditor_Window[5]) guiEditSetMaxLength(GUIEditor_Edit[1],3) GUIEditor_Label[3] = guiCreateLabel(43,32,8,16,"R",false,GUIEditor_Window[5]) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(140,53,51,28,"",false,GUIEditor_Window[5]) guiEditSetMaxLength(GUIEditor_Edit[2],3) GUIEditor_Label[4] = guiCreateLabel(159,32,8,16,"G",false,GUIEditor_Window[5]) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(256,53,51,28,"",false,GUIEditor_Window[5]) GUIEditor_Label[5] = guiCreateLabel(276,32,8,16,"B",false,GUIEditor_Window[5]) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[23] = guiCreateButton(217,97,98,45,"Aceptar",false,GUIEditor_Window[5]) guiSetVisible(GUIEditor_Window[1], false) guiSetVisible(GUIEditor_Window[2], false) guiSetVisible(GUIEditor_Window[3], false) guiSetVisible(GUIEditor_Window[4], false) guiSetVisible(GUIEditor_Window[5], false) showCursor(false) function VerLaGUI() guiSetVisible( "GUIEditor_Window[1]", true ) showCursor(true) end bindKey("F2", "down", VerLaGUI) ----------------------------------------------------- --Los Markers y Blips---- local marker = createMarker(2131.91846, -1149.65430, 23.4, "cylinder", 1.5, 255, 0, 0 ) local marker2 = createMarker(1671.21094, 1814.30457, 10.82031, "cylinder", 1.5, 255, 0, 0 ) createBlipAttachedTo(marker,55,2,0,255,0,0,0,200) createBlipAttachedTo(marker2,55,2,0,255,0,0,0,200) ----------------------------------------------------- ----------------------------------------------------- --LasFunciones---- function VerLaGUI() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end bindKey("F2", "down", VerLaGUI) addEventHandler("onClientGUIClick", root, function() if ( source == GUIEditor_Button[12] ) then guiSetVisible(GUIEditor_Window[2], false) guiSetVisible(GUIEditor_Window[3], false) guiSetVisible(GUIEditor_Window[5], false) showCursor(false) setCameraTarget(localPlayer,localPlayer) local x, y, z = getElementPosition ( localPlayer ) -- Get the position of the local player. setElementPosition ( localPlayer, x, y, z + 5 ) -- Set the position of the local player + 5 on the Z value. elseif ( source == GUIEditor_Button[9] ) then guiSetVisible(GUIEditor_Window[5], true) showCursor(true) elseif ( source == GUIEditor_Button[23] ) then guiSetVisible(GUIEditor_Window[5], false) showCursor(true) end end ) function markerHit (hitPlayer) if ( hitPlayer == localPlayer ) then guiSetVisible (GUIEditor_Window[2], true) guiSetVisible (GUIEditor_Window[3], true) showCursor (true) triggerServerEvent("lacamara", localPlayer, hitPlayer) end end addEventHandler ("onClientMarkerHit", marker, markerHit) addEventHandler ("onClientMarkerHit", marker2, markerHit) -----ElAuto---- local tCars = { } function Prototype( ) local uRow, uCol = guiGridListGetSelectedItem ( source ) if ( uRow and uCol and uRow ~= -1 and uCol ~= -1 ) then local id = 0 if ( #tCars >= 1 ) then destroyElement ( tCars [ #tCars ] ) end local id = id +1 local sName = guiGridListGetItemText ( GUIEditor_Grid[1], uRow, uCol ) tCars [ id ] = createVehicle ( getVehicleModelFromName ( sName ), -1953.80127, 264.75961, 35.46875 ) if ( tCars [ id ] ) then setVehicleColor ( tCars [ id ], tonumber ( guiGetText ( GUIEditor_Edit[1] ) ), tonumber ( guiGetText ( GUIEditor_Edit[2] ) ), tonumber ( guiGetText ( GUIEditor_Edit[3] ) ) ) end end end addEventHandler ( 'onClientGUIClick', GUIEditor_Grid[1],Prototype ) rot = setTimer(rotate,5000,1) function rotate() x,y,z = getElementRotation(tCars[id]) setElementRotation(tCars[id],x+1,y,z) resetTimer(rot) end addEventHandler ( 'onClientGUIClick', GUIEditor_Grid[1],rotate ) function onClientGUIClick (button, state, absoluteX, absoluteYe) if (source == GUIEditor_Button[15]) then guiSetVisible (GUIEditor_Window[4], false) showCursor (false) if (guiGridListGetSelectedItem (GUIEditor_Grid[1])) then local carName = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 1) local carID = getVehicleModelFromName (carName) local carCost = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 2) triggerServerEvent ("carShopCarBuy", getLocalPlayer(), carID, carCost, carName) end addEventHandler ("onClientGUIClick", getRootElement(), onClientGUIClick) addEvent ("carSpawn", true) function guiClick ( button, state, absoluteX, absoluteY ) if (source == GUIEditor_Button[1]) then triggerServerEvent ("carSpawn", getLocalPlayer()) end end addEventHandler ("onClientGUIClick", getRootElement(), guiClick) addEventHandler ("onClientGUIClick", getRootElement(), guiClick)
  3. doesnt work the debugging :
  4. is here = function guiClick ( button, state, absoluteX, absoluteY ) if (source == GUIEditor_Button[1]) then triggerServerEvent ("carSpawn", getLocalPlayer()) end addEventHandler ("onClientGUIClick", getRootElement(), guiClick)
  5. what is bad ? 1.lua ( Client-Side ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(11,92,229,464,"Mi panel de Spawn",false) GUIEditor_Button[1] = guiCreateButton(9,29,209,43,"Spawnear Vehiculo -1",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,75,208,41,"Spawnear Vehiculo -2",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,118,208,41,"Spawnear Vehiculo -3",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(9,162,208,41,"Spawnear Vehiculo -4",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(9,251,208,41,"Spawnear Vehiculo -5",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(9,206,208,41,"Spawnear Vehiculo -6",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(10,296,206,41,"Spawnear Vehiculo -7",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(10,340,206,41,"Spawnear Vehiculo -8",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(12,396,205,56,"GUI Creada por ElMota",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Window[2] = guiCreateWindow(11,340,219,216,"GUI Shop Panel",false) GUIEditor_Button[9] = guiCreateButton(18,70,168,32,"Comprar Vehiculo",false,GUIEditor_Window[2]) GUIEditor_Button[10] = guiCreateButton(18,109,168,32,"Vender Vehiculo",false,GUIEditor_Window[2]) GUIEditor_Button[12] = guiCreateButton(22,26,75,39,"Cancelar",false,GUIEditor_Window[2]) GUIEditor_Window[3] = guiCreateWindow(544,249,240,326,"Vehiculos",false) GUIEditor_Grid[1] = guiCreateGridList(9,24,222,293,false,GUIEditor_Window[3]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Autos",0.5) guiGridListAddColumn(GUIEditor_Grid[1],"Precio $",0.3) local cars = {{400,60000},{404,28000},{489,65000},{505,65000},{479,45000},{442,45000},{458,45000},{602,50000},{496,42500},{401,41000},{518,60000},{527,75000},{589,75000},{419,45000},{533,75000},{526,50000},{474,55000},{545,50000},{517,45000},{410,41000},{600,50000},{436,41000},{580,50000},{439,75000},{549,75000},{491,45000},{445,45000},{507,45000},{585,45000},{587,75000},{466,55000},{492,50000},{546,45000},{551,45000},{516,45000},{467,45000},{426,47500},{547,45000},{405,55000},{409,75000},{550,45000},{566,45000},{540,45000},{421,50000},{529,45000},{402,12000},{542,65000},{603,12000},{475,75000},{562,120000},{565,95000},{559,120000},{561,50000},{560,120000},{558,100000},{429,120000},{541,120000},{415,120000},{480,95000},{434,100000},{494,120000},{502,120000},{503,120000},{411,120000},{506,120000},{451,120000},{555,95000},{477,95000},{499,25000},{498,25000},{578,50000},{486,70000},{455,75000},{588,50000},{403,75000},{414,50000},{443,75000},{515,75000},{514,75000},{531,12000},{456,45000},{422,45000},{482,95000},{530,12000},{418,45000},{572,12000},{582,50000},{413,5000},{440,50000},{543,65000},{583,12000},{478,35000},{554,50000},{536,75000},{575,75000},{534,75000},{567,75000},{535,75000},{576,75000},{412,75000},{568,75000},{457,12000},{483,45000},{508,40000},{571,10000},{500,55000},{444,120000},{556,120000},{557,120000},{471,20000},{495,100000},{539,75000},{481,25050},{509,2500},{581,45000},{462,12000},{521,60000},{463,50000},{522,75000},{448,12000},{468,45000},{586,45000},{485,12000},{431,60000},{438,45000},{437,60000},{574,12000},{420,45000},{525,75000},{408,50000},{428,65000}} for i,v in ipairs (cars) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, carName, false, true) guiGridListSetItemText (GUIEditor_Grid[1], row, 2, tostring(v[2]), false, true) end GUIEditor_Window[4] = guiCreateWindow(252,171,409,187,"Verificacion",false) GUIEditor_Label[2] = guiCreateLabel(10,29,391,25,"Porfavor elije aqui un slot para tu vehiculo",false,GUIEditor_Window[4]) guiLabelSetColor(GUIEditor_Label[2],255,255,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Button[13] = guiCreateButton(10,59,100,37,"Acepto",false,GUIEditor_Window[4]) GUIEditor_Button[14] = guiCreateButton(112,65,100,31,"Cancelar",false,GUIEditor_Window[4]) GUIEditor_Button[15] = guiCreateButton(10,128,43,46,"Slot-1",false,GUIEditor_Window[4]) GUIEditor_Button[16] = guiCreateButton(57,129,43,46,"Slot-2",false,GUIEditor_Window[4]) GUIEditor_Button[17] = guiCreateButton(103,129,43,46,"Slot-3",false,GUIEditor_Window[4]) GUIEditor_Button[18] = guiCreateButton(148,129,43,46,"Slot-4",false,GUIEditor_Window[4]) GUIEditor_Button[19] = guiCreateButton(193,129,43,46,"Slot-5",false,GUIEditor_Window[4]) GUIEditor_Button[20] = guiCreateButton(238,129,43,46,"Slot-6",false,GUIEditor_Window[4]) GUIEditor_Button[21] = guiCreateButton(283,129,43,46,"Slot-7",false,GUIEditor_Window[4]) GUIEditor_Button[22] = guiCreateButton(328,129,43,46,"Slot-8",false,GUIEditor_Window[4]) GUIEditor_Window[5] = guiCreateWindow(214,193,324,151,"GUI Sistema de Colores RGB",false) GUIEditor_Edit[1] = guiCreateEdit(24,53,51,28,"",false,GUIEditor_Window[5]) guiEditSetMaxLength(GUIEditor_Edit[1],3) GUIEditor_Label[3] = guiCreateLabel(43,32,8,16,"R",false,GUIEditor_Window[5]) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(140,53,51,28,"",false,GUIEditor_Window[5]) guiEditSetMaxLength(GUIEditor_Edit[2],3) GUIEditor_Label[4] = guiCreateLabel(159,32,8,16,"G",false,GUIEditor_Window[5]) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(256,53,51,28,"",false,GUIEditor_Window[5]) GUIEditor_Label[5] = guiCreateLabel(276,32,8,16,"B",false,GUIEditor_Window[5]) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[23] = guiCreateButton(217,97,98,45,"Aceptar",false,GUIEditor_Window[5]) guiSetVisible(GUIEditor_Window[1], false) guiSetVisible(GUIEditor_Window[2], false) guiSetVisible(GUIEditor_Window[3], false) guiSetVisible(GUIEditor_Window[4], false) guiSetVisible(GUIEditor_Window[5], false) showCursor(false) function VerLaGUI() guiSetVisible( "GUIEditor_Window[1]", true ) showCursor(true) end bindKey("F2", "down", VerLaGUI) ----------------------------------------------------- --Los Markers y Blips---- local marker = createMarker(2131.91846, -1149.65430, 23.4, "cylinder", 1.5, 255, 0, 0 ) local marker2 = createMarker(1671.21094, 1814.30457, 10.82031, "cylinder", 1.5, 255, 0, 0 ) createBlipAttachedTo(marker,55,2,0,255,0,0,0,200) createBlipAttachedTo(marker2,55,2,0,255,0,0,0,200) ----------------------------------------------------- ----------------------------------------------------- --LasFunciones---- function VerLaGUI() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end bindKey("F2", "down", VerLaGUI) addEventHandler("onClientGUIClick", root, function() if ( source == GUIEditor_Button[12] ) then guiSetVisible(GUIEditor_Window[2], false) guiSetVisible(GUIEditor_Window[3], false) guiSetVisible(GUIEditor_Window[5], false) showCursor(false) setCameraTarget(localPlayer,localPlayer) local x, y, z = getElementPosition ( localPlayer ) -- Get the position of the local player. setElementPosition ( localPlayer, x, y, z + 5 ) -- Set the position of the local player + 5 on the Z value. elseif ( source == GUIEditor_Button[9] ) then guiSetVisible(GUIEditor_Window[5], true) showCursor(true) elseif ( source == GUIEditor_Button[23] ) then guiSetVisible(GUIEditor_Window[5], false) showCursor(true) end end ) function markerHit (hitPlayer) if ( hitPlayer == localPlayer ) then guiSetVisible (GUIEditor_Window[2], true) guiSetVisible (GUIEditor_Window[3], true) showCursor (true) triggerServerEvent("lacamara", localPlayer, hitPlayer) end end addEventHandler ("onClientMarkerHit", marker, markerHit) addEventHandler ("onClientMarkerHit", marker2, markerHit) -----ElAuto---- local tCars = { } function Prototype( ) local uRow, uCol = guiGridListGetSelectedItem ( source ) if ( uRow and uCol and uRow ~= -1 and uCol ~= -1 ) then local id = 0 if ( #tCars >= 1 ) then destroyElement ( tCars [ #tCars ] ) end local id = id +1 local sName = guiGridListGetItemText ( GUIEditor_Grid[1], uRow, uCol ) tCars [ id ] = createVehicle ( getVehicleModelFromName ( sName ), -1953.80127, 264.75961, 35.46875 ) if ( tCars [ id ] ) then setVehicleColor ( tCars [ id ], tonumber ( guiGetText ( GUIEditor_Edit[1] ) ), tonumber ( guiGetText ( GUIEditor_Edit[2] ) ), tonumber ( guiGetText ( GUIEditor_Edit[3] ) ) ) end end end addEventHandler ( 'onClientGUIClick', GUIEditor_Grid[1],Prototype ) rot = setTimer(rotate,5000,1) function rotate() x,y,z = getElementRotation(tCars[id]) setElementRotation(tCars[id],x+1,y,z) resetTimer(rot) end addEventHandler ( 'onClientGUIClick', GUIEditor_Grid[1],rotate ) function onClientGUIClick (button, state, absoluteX, absoluteYe) if (source == GUIEditor_Button[15]) then guiSetVisible (GUIEditor_Window[4], false) showCursor (false) if (guiGridListGetSelectedItem (GUIEditor_Grid[1])) then local carName = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 1) local carID = getVehicleModelFromName (carName) local carCost = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 2) triggerServerEvent ("carShopCarBuy", getLocalPlayer(), carID, carCost, carName) end addEventHandler ("onClientGUIClick", getRootElement(), onClientGUIClick) addEvent ("carSpawn", true) function guiClick ( button, state, absoluteX, absoluteY ) if (source == GUIEditor_Button[1]) then triggerServerEvent ("carSpawn", getLocalPlayer()) end addEventHandler ("onClientGUIClick", getRootElement(), guiClick) 1_sv.lua ( server-side ) function camara( hitPlayer ) local lacamaraM = setCameraMatrix(source, -1958.57849, 278.94150, 37, -1953.80127, 264.75961, 35.46875) fadeCamera(source, true, 5) setElementRotation(lacamaraM, 90, 0, 0) end addEvent("lacamara", true) addEventHandler("lacamara", root, camara) addEvent ("carShopCarBuy", true) addEventHandler ("carShopCarBuy", getRootElement(), function(id, cost, name) if (getPlayerMoney (source) >= tonumber(cost)) then outputChatBox ("Tu compraste un " .. name, source, 0, 255, 0, false) outputChatBox ("ID: " .. id, source, 0, 255, 0, false) outputChatBox ("Costo: " .. cost, source, 0, 255, 0, false) takePlayerMoney (source, tonumber (cost)) setAccountData (getPlayerAccount (source), "funmodev2-car", tonumber(id)) setAccountData (getPlayerAccount (source), "funmodev2-paintjob", 3) setAccountData (getPlayerAccount (source), "funmodev2-carupg", 0) else outputChatBox ("You are too poor!", source, 255, 0, 0, false) end end) save.lua ( server-side ) node = xmlLoadFile ("users.xml") function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "funmodev2-money") if (accountData) then local playerMoney = getAccountData (theCurrentAccount, "funmodev2-money") local playerSkin = getAccountData (theCurrentAccount, "funmodev2-skin") local playerX = getAccountData (theCurrentAccount, "funmodev2-x") local playerY = getAccountData (theCurrentAccount, "funmodev2-y") local playerZ = getAccountData (theCurrentAccount, "funmodev2-z") local playerInt = getAccountData (theCurrentAccount, "funmodev2-int") local playerDim = getAccountData (theCurrentAccount, "funmodev2-dim") local playerWanted = getAccountData (theCurrentAccount, "funmodev2-wantedlevel") local playerWeaponID = getAccountData (theCurrentAccount, "funmodev2-weaponID") local playerWeaponAmmo = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo") spawnPlayer (source, playerX, playerY, playerZ +1, 0, playerSkin, playerInt, playerDim, spawnTeam) setTimer (setPlayerTeam, 500, 1, source, spawnTeam) setPlayerMoney (source, playerMoney) setTimer (setPlayerWantedLevel, 500, 1, source, playerWanted) setTimer (giveWeapon, 500, 1, source, playerWeaponID, playerWeaponAmmo, true) setCameraTarget (source, source) fadeCamera(source, true, 2.0) else spawnPlayer (source, 2000.55, 1526.25, 14.6171875, 0, math.random (0, 288), 0, 0, spawnTeam) setTimer (setPlayerTeam, 500, 1, source, spawnTeam) setPlayerMoney (source, 5000) setCameraTarget (source, source) fadeCamera(source, true, 2.0) end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then local x,y,z = getElementPosition (source) setAccountData (account, "funmodev2-money", tostring (getPlayerMoney (source))) setAccountData (account, "funmodev2-skin", tostring (getPedSkin (source))) setAccountData (account, "funmodev2-x", x) setAccountData (account, "funmodev2-y", y) setAccountData (account, "funmodev2-z", z) setAccountData (account, "funmodev2-int", getElementInterior (source)) setAccountData (account, "funmodev2-dim", getElementDimension (source)) setAccountData (account, "funmodev2-wantedlevel", getPlayerWantedLevel (source)) setAccountData (account, "funmodev2-wantedID", getPlayerWeapon (source)) setAccountData (account, "funmodev2-wantedAmmo", getPlayerTotalAmmo (source)) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit) function onWasted(totalAmmo, killer, killerWeapon, bodypart, stealth) if not( isGuestAccount (getPlayerAccount(source)) ) then local theWeapon = getPlayerWeapon (source) local weaponAmmo = getPlayerTotalAmmo (source) fadeCamera (source, false) setTimer (spawnPlayer, 1000, 1, source, 1607.35, 1816.54, 10.82, 0, getPedSkin (source), 0, 0, spawnTeam) setTimer (setPlayerTeam, 1500, 1, source, spawnTeam) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true) end end addEventHandler ("onPlayerWasted", getRootElement(), onWasted) ------------------------------------ --SpawnearVehiculo------------------ addEvent ("carSpawn", true) function carSpawn () if not (isGuestAccount (getPlayerAccount (source))) and not (isPedInVehicle(source)) then if (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) and (getElementType(getElementData (source, "hisCar")) == "vehicle") then setElementVelocity (getElementData (source, "hisCar"), 0,0,0) local x,y,z = getElementPosition (source) setVehicleRotation (getElementData (source, "hisCar"), 0, 0, 0) setElementPosition (getElementData (source, "hisCar"), x+2,y,z +1) outputChatBox ("Auto spawneado.", source, 255, 0, 0) elseif not (getElementData (source, "hisCar")) then local accountData = getAccountData (getPlayerAccount (source), "funmodev2-car") if (accountData) then carID = getAccountData (getPlayerAccount (source), "funmodev2-car") x,y,z = getElementPosition (source) vehicle = createVehicle (carID, x +2, y, z +1) setElementID (vehicle, getAccountName (getPlayerAccount(source))) setElementData (source, "hisCar", vehicle) outputChatBox ("Car spawned.", source, 255, 0, 0) if (getAccountData (getPlayerAccount(source), "funmodev2-carupg")) then local upgrades = nil local upgrades = {} local upgrades = getAccountData (getPlayerAccount(source), "funmodev2-carupg") for i,v in ipairs (upgrades) do addVehicleUpgrade (vehicle, v) end end if (getAccountData (getPlayerAccount(source), "funmodev2-paintjob")) then local paintjob = getAccountData (getPlayerAccount(source), "funmodev2-paintjob") setVehiclePaintjob (vehicle, paintjob) end if (getAccountData (getPlayerAccount(source), "funmodev2-carcolor1")) and (getAccountData (getPlayerAccount(source), "funmodev2-carcolor2")) then local c1 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor1") local c2 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor2") setVehicleColor (vehicle, c1,c2,0,0) end else outputChatBox ("tu no tienes tu auto.", source, 255, 0, 0) end else outputChatBox ("tu ya estas en tu auto!", source, 255, 0, 0) end end end addEventHandler ("carSpawn", getRootElement(), carSpawn) ? I have a error in a "(" but I dont know what is ? is in 1.lua
  6. ? function doubleClickedName( ) local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor_Grid[1] ) local playerName = guiGridListGetItemText( GUIEditor_Grid[1], selectedRow, selectedCol ) GUIEditor_Label[2] = guiCreateLabel(9,57,298,31,"PM a : playerName",false,GUIEditor_Window[2]) end addEventHandler( "onClientGUIDoubleClick", GUIEditor_Grid[1], doubleClickedName, false );
  7. Pa no crear otro topic me ayudarian a Obtener el nombre de un player ? GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(152,157,149,368,"Jugadores",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(8,38,70,15,"ChatPrivado",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,0,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Grid[1] = guiCreateGridList(9,69,131,290,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) local column =guiGridListAddColumn(GUIEditor_Grid[1],"Jugadores",0.-- s8) --> GUIEditor_Window[2] = guiCreateWindow(300,156,317,370,"Chat",false) guiWindowSetMovable(GUIEditor_Window[2],false) guiWindowSetSizable(GUIEditor_Window[2],false) guiLabelSetColor(GUIEditor_Label[2],255,255,0) guiSetFont(GUIEditor_Label[2],"sa-header") GUIEditor_Memo[1] = guiCreateMemo(10,99,298,215,"",false,GUIEditor_Window[2]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Edit[1] = guiCreateEdit(11,318,224,43,"",false,GUIEditor_Window[2]) GUIEditor_Button[1] = guiCreateButton(236,320,72,39,"Enviar",false,GUIEditor_Window[2]) if ( column ) then for id, playeritem in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, getPlayerName( playeritem ), false, false ) end end function doubleClickedName( ) local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor_Grid[1] ) local playerName = guiGridListGetItemText( GUIEditor_Grid[1], selectedRow, selectedCol ) GUIEditor_Label[2] = guiCreateLabel(9,57,298,31,"PM a : GetPlayerName",false,GUIEditor_Window[2]) end addEventHandler( "onClientGUIDoubleClick", GUIEditor_Grid[1], doubleClickedName, false ); bindKey ( "F7", "down", function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end ) ------------------------------------------------- ---poner invisible las GUIs--- guiSetVisible(GUIEditor_Window[1], false) guiSetVisible(GUIEditor_Window[2], false) -------------------------------------------------
  8. no se mucho pero creo que seria if ( name == ElMota[Gold]x~ ) then ?? name = getPlayerName function test() if ( name == ElMota[Gold]x~ ) then guiSetVisible( GUIEditor_Window[1], true ) showCursor(true) if ( name == nil ) then guiSetVisible( GUIEditor_Window[1], false ) showCursor(false) end end ) bindKey("F6", "down", test)
  9. dont work = ... rot = setTimer(rotate,5000,1) function rotate() x,y,z = getElementRotation(tCars[id]) setElementRotation(tCars[id],x+1,y,z) resetTimer(rot) end addEventHandler ( 'onClientGUIClick', GUIEditor_Grid[1],rotate )
  10. name = getPlayerName function test() if name is == ElMota[Gold]x~ then guiSetVisible( GUIEditor_Window[1], true ) showCursor(true) end end ) bindKey("F6", "down", test) algo asi ? lo ago de prueba ._.
  11. maauuro yo uso el guieditor es re bueno para los nuevos en esto de las GUIs
  12. Como podria aser una GUI para que solo el que tenga mi nombre osea yo pueda abrirla ?
  13. dont work man the player appear underground
  14. Solid I want when the car is in rotation I can view slow
  15. how I can put for the vehicle move slow ?
  16. what is bad ? setTimer(5000,1,setElementRotation ( tCars [ id ], 60, 0, 0 ))
  17. tienes que hacer el vehiculo en server-side, creo osino lo ases en un archivo .map , a mi me pasaba el mismo problema porq avia echo el vehiculo en client-side
  18. How I can put a setelementrotation to my vehicle in my script ? GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(11,92,229,464,"Mi panel de Spawn",false) GUIEditor_Button[1] = guiCreateButton(9,29,209,43,"Spawnear Vehiculo -1",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,75,208,41,"Spawnear Vehiculo -2",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,118,208,41,"Spawnear Vehiculo -3",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(9,162,208,41,"Spawnear Vehiculo -4",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(9,251,208,41,"Spawnear Vehiculo -5",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(9,206,208,41,"Spawnear Vehiculo -6",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(10,296,206,41,"Spawnear Vehiculo -7",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(10,340,206,41,"Spawnear Vehiculo -8",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(12,396,205,56,"GUI Creada por ElMota",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Window[2] = guiCreateWindow(11,340,219,216,"GUI Shop Panel",false) GUIEditor_Button[9] = guiCreateButton(18,70,168,32,"Comprar Vehiculo",false,GUIEditor_Window[2]) GUIEditor_Button[10] = guiCreateButton(18,109,168,32,"Vender Vehiculo",false,GUIEditor_Window[2]) GUIEditor_Button[12] = guiCreateButton(22,26,75,39,"Cancelar",false,GUIEditor_Window[2]) GUIEditor_Window[3] = guiCreateWindow(544,249,240,326,"Vehiculos",false) GUIEditor_Grid[1] = guiCreateGridList(9,24,222,293,false,GUIEditor_Window[3]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Autos",0.5) guiGridListAddColumn(GUIEditor_Grid[1],"Precio $",0.3) local cars = {{400,60000},{404,28000},{489,65000},{505,65000},{479,45000},{442,45000},{458,45000},{602,50000},{496,42500},{401,41000},{518,60000},{527,75000},{589,75000},{419,45000},{533,75000},{526,50000},{474,55000},{545,50000},{517,45000},{410,41000},{600,50000},{436,41000},{580,50000},{439,75000},{549,75000},{491,45000},{445,45000},{507,45000},{585,45000},{587,75000},{466,55000},{492,50000},{546,45000},{551,45000},{516,45000},{467,45000},{426,47500},{547,45000},{405,55000},{409,75000},{550,45000},{566,45000},{540,45000},{421,50000},{529,45000},{402,12000},{542,65000},{603,12000},{475,75000},{562,120000},{565,95000},{559,120000},{561,50000},{560,120000},{558,100000},{429,120000},{541,120000},{415,120000},{480,95000},{434,100000},{494,120000},{502,120000},{503,120000},{411,120000},{506,120000},{451,120000},{555,95000},{477,95000},{499,25000},{498,25000},{578,50000},{486,70000},{455,75000},{588,50000},{403,75000},{414,50000},{443,75000},{515,75000},{514,75000},{531,12000},{456,45000},{422,45000},{482,95000},{530,12000},{418,45000},{572,12000},{582,50000},{413,5000},{440,50000},{543,65000},{583,12000},{478,35000},{554,50000},{536,75000},{575,75000},{534,75000},{567,75000},{535,75000},{576,75000},{412,75000},{568,75000},{457,12000},{483,45000},{508,40000},{571,10000},{500,55000},{444,120000},{556,120000},{557,120000},{471,20000},{495,100000},{539,75000},{481,25050},{509,2500},{581,45000},{462,12000},{521,60000},{463,50000},{522,75000},{448,12000},{468,45000},{586,45000},{485,12000},{431,60000},{438,45000},{437,60000},{574,12000},{420,45000},{525,75000},{408,50000},{428,65000}} for i,v in ipairs (cars) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, carName, false, true) guiGridListSetItemText (GUIEditor_Grid[1], row, 2, tostring(v[2]), false, true) end GUIEditor_Window[4] = guiCreateWindow(252,171,409,187,"Verificacion",false) GUIEditor_Label[2] = guiCreateLabel(10,29,391,25,"Porfavor elije aqui un slot para tu vehiculo",false,GUIEditor_Window[4]) guiLabelSetColor(GUIEditor_Label[2],255,255,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Button[13] = guiCreateButton(10,59,100,37,"Acepto",false,GUIEditor_Window[4]) GUIEditor_Button[14] = guiCreateButton(112,65,100,31,"Cancelar",false,GUIEditor_Window[4]) GUIEditor_Button[15] = guiCreateButton(10,128,43,46,"Slot-1",false,GUIEditor_Window[4]) GUIEditor_Button[16] = guiCreateButton(57,129,43,46,"Slot-2",false,GUIEditor_Window[4]) GUIEditor_Button[17] = guiCreateButton(103,129,43,46,"Slot-3",false,GUIEditor_Window[4]) GUIEditor_Button[18] = guiCreateButton(148,129,43,46,"Slot-4",false,GUIEditor_Window[4]) GUIEditor_Button[19] = guiCreateButton(193,129,43,46,"Slot-5",false,GUIEditor_Window[4]) GUIEditor_Button[20] = guiCreateButton(238,129,43,46,"Slot-6",false,GUIEditor_Window[4]) GUIEditor_Button[21] = guiCreateButton(283,129,43,46,"Slot-7",false,GUIEditor_Window[4]) GUIEditor_Button[22] = guiCreateButton(328,129,43,46,"Slot-8",false,GUIEditor_Window[4]) GUIEditor_Window[5] = guiCreateWindow(214,193,324,151,"GUI Sistema de Colores RGB",false) GUIEditor_Edit[1] = guiCreateEdit(24,53,51,28,"",false,GUIEditor_Window[5]) guiEditSetMaxLength(GUIEditor_Edit[1],3) GUIEditor_Label[3] = guiCreateLabel(43,32,8,16,"R",false,GUIEditor_Window[5]) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(140,53,51,28,"",false,GUIEditor_Window[5]) guiEditSetMaxLength(GUIEditor_Edit[2],3) GUIEditor_Label[4] = guiCreateLabel(159,32,8,16,"G",false,GUIEditor_Window[5]) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(256,53,51,28,"",false,GUIEditor_Window[5]) GUIEditor_Label[5] = guiCreateLabel(276,32,8,16,"B",false,GUIEditor_Window[5]) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[23] = guiCreateButton(217,97,98,45,"Aceptar",false,GUIEditor_Window[5]) guiSetVisible(GUIEditor_Window[1], false) guiSetVisible(GUIEditor_Window[2], false) guiSetVisible(GUIEditor_Window[3], false) guiSetVisible(GUIEditor_Window[4], false) guiSetVisible(GUIEditor_Window[5], false) showCursor(false) function VerLaGUI() guiSetVisible( "GUIEditor_Window[1]", true ) showCursor(true) end bindKey("F2", "down", VerLaGUI) ----------------------------------------------------- --Los Markers y Blips---- local marker = createMarker(2131.91846, -1149.65430, 23.4, "cylinder", 1.5, 255, 0, 0 ) local marker2 = createMarker(1671.21094, 1814.30457, 10.82031, "cylinder", 1.5, 255, 0, 0 ) createBlipAttachedTo(marker,55,2,0,255,0,0,0,200) createBlipAttachedTo(marker2,55,2,0,255,0,0,0,200) ----------------------------------------------------- ----------------------------------------------------- --LasFunciones---- function VerLaGUI() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end bindKey("F2", "down", VerLaGUI) addEventHandler("onClientGUIClick", root, function() if ( source == GUIEditor_Button[12] ) then guiSetVisible(GUIEditor_Window[2], false) guiSetVisible(GUIEditor_Window[3], false) guiSetVisible(GUIEditor_Window[5], false) showCursor(false) setCameraTarget(localPlayer,localPlayer) setElementPosition(localPlayer) elseif ( source == GUIEditor_Button[9] ) then guiSetVisible(GUIEditor_Window[5], true) showCursor(true) elseif ( source == GUIEditor_Button[23] ) then guiSetVisible(GUIEditor_Window[5], false) guiSetVisible(GUIEditor_Window[4], false) showCursor(true) elseif ( source == GUIEditor_Button[15] ) then slot1 = guiCreateButton(9,29,209,43,"Spawnear Vehiculo getVehicleName ( theVehicle )",false,GUIEditor_Window[1]) guiSetVisible( GUIEditor_Button[1], false ) end end ) function markerHit (hitPlayer) if ( hitPlayer == localPlayer ) then guiSetVisible (GUIEditor_Window[2], true) guiSetVisible (GUIEditor_Window[3], true) showCursor (true) triggerServerEvent("lacamara", localPlayer, hitPlayer) end end addEventHandler ("onClientMarkerHit", marker, markerHit) addEventHandler ("onClientMarkerHit", marker2, markerHit) -----ElAuto---- local tCars = { } function Prototype( ) local uRow, uCol = guiGridListGetSelectedItem ( source ) if ( uRow and uCol and uRow ~= -1 and uCol ~= -1 ) then local id = 0 if #tCars >= 1 then destroyElement ( tCars [ #tCars ] ) end local id = id +1 local sName = guiGridListGetItemText ( GUIEditor_Grid[1], uRow, uCol ) tCars [ id ] = createVehicle ( getVehicleModelFromName ( sName ), -1953.80127, 264.75961, 35.46875 ) if ( tCars [ id ] ) then setVehicleColor ( tCars [ id ], tonumber ( guiGetText ( GUIEditor_Edit[1] ) ), tonumber ( guiGetText ( GUIEditor_Edit[2] ) ), tonumber ( guiGetText ( GUIEditor_Edit[3] ) ) ) end end end addEventHandler ( 'onClientGUIClick', GUIEditor_Grid[1],Prototype )
  19. creo que podes aserlo con createProjectile attachElements
  20. I want get the position of marker and when I press the button Cancelar the player appear "z + 5" the position of marker
  21. draken how I can appear near of marker ?
  22. I put it in cmd http://serverelmota.com.nu/ and said cant find after see it now can help me please ? I do other marker to the vehicles and Idont know how put the player outside of marker : GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(11,92,229,464,"Mi panel de Spawn",false) GUIEditor_Button[1] = guiCreateButton(9,29,209,43,"Spawnear Vehiculo -1",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,75,208,41,"Spawnear Vehiculo -2",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,118,208,41,"Spawnear Vehiculo -3",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(9,162,208,41,"Spawnear Vehiculo -4",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(9,251,208,41,"Spawnear Vehiculo -5",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(9,206,208,41,"Spawnear Vehiculo -6",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(10,296,206,41,"Spawnear Vehiculo -7",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(10,340,206,41,"Spawnear Vehiculo -8",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(12,396,205,56,"GUI Creada por ElMota",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Window[2] = guiCreateWindow(11,340,219,216,"GUI Shop Panel",false) GUIEditor_Button[9] = guiCreateButton(18,70,168,32,"Comprar Vehiculo",false,GUIEditor_Window[2]) GUIEditor_Button[10] = guiCreateButton(18,109,168,32,"Vender Vehiculo",false,GUIEditor_Window[2]) GUIEditor_Button[12] = guiCreateButton(22,26,75,39,"Cancelar",false,GUIEditor_Window[2]) GUIEditor_Window[3] = guiCreateWindow(544,249,240,326,"Vehiculos",false) GUIEditor_Grid[1] = guiCreateGridList(9,24,222,293,false,GUIEditor_Window[3]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Autos",0.5) guiGridListAddColumn(GUIEditor_Grid[1],"Precio $",0.3) local cars = {{400,60000},{404,28000},{489,65000},{505,65000},{479,45000},{442,45000},{458,45000},{602,50000},{496,42500},{401,41000},{518,60000},{527,75000},{589,75000},{419,45000},{533,75000},{526,50000},{474,55000},{545,50000},{517,45000},{410,41000},{600,50000},{436,41000},{580,50000},{439,75000},{549,75000},{491,45000},{445,45000},{507,45000},{585,45000},{587,75000},{466,55000},{492,50000},{546,45000},{551,45000},{516,45000},{467,45000},{426,47500},{547,45000},{405,55000},{409,75000},{550,45000},{566,45000},{540,45000},{421,50000},{529,45000},{402,12000},{542,65000},{603,12000},{475,75000},{562,120000},{565,95000},{559,120000},{561,50000},{560,120000},{558,100000},{429,120000},{541,120000},{415,120000},{480,95000},{434,100000},{494,120000},{502,120000},{503,120000},{411,120000},{506,120000},{451,120000},{555,95000},{477,95000},{499,25000},{498,25000},{578,50000},{486,70000},{455,75000},{588,50000},{403,75000},{414,50000},{443,75000},{515,75000},{514,75000},{531,12000},{456,45000},{422,45000},{482,95000},{530,12000},{418,45000},{572,12000},{582,50000},{413,5000},{440,50000},{543,65000},{583,12000},{478,35000},{554,50000},{536,75000},{575,75000},{534,75000},{567,75000},{535,75000},{576,75000},{412,75000},{568,75000},{457,12000},{483,45000},{508,40000},{571,10000},{500,55000},{444,120000},{556,120000},{557,120000},{471,20000},{495,100000},{539,75000},{481,25050},{509,2500},{581,45000},{462,12000},{521,60000},{463,50000},{522,75000},{448,12000},{468,45000},{586,45000},{485,12000},{431,60000},{438,45000},{437,60000},{574,12000},{420,45000},{525,75000},{408,50000},{428,65000}} for i,v in ipairs (cars) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, carName, false, true) guiGridListSetItemText (GUIEditor_Grid[1], row, 2, tostring(v[2]), false, true) end GUIEditor_Window[4] = guiCreateWindow(252,171,409,187,"Verificacion",false) GUIEditor_Label[2] = guiCreateLabel(10,29,391,25,"Porfavor elije aqui un slot para tu vehiculo",false,GUIEditor_Window[4]) guiLabelSetColor(GUIEditor_Label[2],255,255,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Button[13] = guiCreateButton(10,59,100,37,"Acepto",false,GUIEditor_Window[4]) GUIEditor_Button[14] = guiCreateButton(112,65,100,31,"Cancelar",false,GUIEditor_Window[4]) GUIEditor_Button[15] = guiCreateButton(10,128,43,46,"Slot-1",false,GUIEditor_Window[4]) GUIEditor_Button[16] = guiCreateButton(57,129,43,46,"Slot-2",false,GUIEditor_Window[4]) GUIEditor_Button[17] = guiCreateButton(103,129,43,46,"Slot-3",false,GUIEditor_Window[4]) GUIEditor_Button[18] = guiCreateButton(148,129,43,46,"Slot-4",false,GUIEditor_Window[4]) GUIEditor_Button[19] = guiCreateButton(193,129,43,46,"Slot-5",false,GUIEditor_Window[4]) GUIEditor_Button[20] = guiCreateButton(238,129,43,46,"Slot-6",false,GUIEditor_Window[4]) GUIEditor_Button[21] = guiCreateButton(283,129,43,46,"Slot-7",false,GUIEditor_Window[4]) GUIEditor_Button[22] = guiCreateButton(328,129,43,46,"Slot-8",false,GUIEditor_Window[4]) GUIEditor_Window[5] = guiCreateWindow(214,193,324,151,"GUI Sistema de Colores RGB",false) GUIEditor_Edit[1] = guiCreateEdit(24,53,51,28,"",false,GUIEditor_Window[5]) guiEditSetMaxLength(GUIEditor_Edit[1],3) GUIEditor_Label[3] = guiCreateLabel(43,32,8,16,"R",false,GUIEditor_Window[5]) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(140,53,51,28,"",false,GUIEditor_Window[5]) guiEditSetMaxLength(GUIEditor_Edit[2],3) GUIEditor_Label[4] = guiCreateLabel(159,32,8,16,"G",false,GUIEditor_Window[5]) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(256,53,51,28,"",false,GUIEditor_Window[5]) GUIEditor_Label[5] = guiCreateLabel(276,32,8,16,"B",false,GUIEditor_Window[5]) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[23] = guiCreateButton(217,97,98,45,"Aceptar",false,GUIEditor_Window[5]) guiSetVisible(GUIEditor_Window[1], false) guiSetVisible(GUIEditor_Window[2], false) guiSetVisible(GUIEditor_Window[3], false) guiSetVisible(GUIEditor_Window[4], false) guiSetVisible(GUIEditor_Window[5], false) showCursor(false) function VerLaGUI() guiSetVisible( "GUIEditor_Window[1]", true ) showCursor(true) end bindKey("F2", "down", VerLaGUI) ----------------------------------------------------- --Los Markers y Blips---- local marker = createMarker(2131.91846, -1149.65430, 23.4, "cylinder", 1.5, 255, 0, 0 ) local marker2 = createMarker(1671.21094, 1814.30457, 10.82031, "cylinder", 1.5, 255, 0, 0 ) createBlipAttachedTo(marker,55,2,0,255,0,0,0,200) createBlipAttachedTo(marker2,55,2,0,255,0,0,0,200) ----------------------------------------------------- ----------------------------------------------------- --LasFunciones---- function VerLaGUI() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end bindKey("F2", "down", VerLaGUI) addEventHandler("onClientGUIClick", root, function() if ( source == GUIEditor_Button[12] ) then guiSetVisible(GUIEditor_Window[2], false) guiSetVisible(GUIEditor_Window[3], false) guiSetVisible(GUIEditor_Window[5], false) showCursor(false) setCameraTarget(localPlayer,localPlayer) setElementPosition(localPlayer) elseif ( source == GUIEditor_Button[9] ) then guiSetVisible(GUIEditor_Window[5], true) showCursor(true) elseif ( source == GUIEditor_Button[23] ) then guiSetVisible(GUIEditor_Window[5], false) showCursor(true) end end ) function markerHit (hitPlayer) if ( hitPlayer == localPlayer ) then guiSetVisible (GUIEditor_Window[2], true) guiSetVisible (GUIEditor_Window[3], true) showCursor (true) triggerServerEvent("lacamara", localPlayer, hitPlayer) end end addEventHandler ("onClientMarkerHit", marker, markerHit) addEventHandler ("onClientMarkerHit", marker2, markerHit) -----ElAuto---- local tCars = { } function Prototype( ) local uRow, uCol = guiGridListGetSelectedItem ( source ) if ( uRow and uCol and uRow ~= -1 and uCol ~= -1 ) then local id = 0 if #tCars >= 1 then destroyElement ( tCars [ #tCars ] ) end local id = id +1 local sName = guiGridListGetItemText ( GUIEditor_Grid[1], uRow, uCol ) tCars [ id ] = createVehicle ( getVehicleModelFromName ( sName ), -1953.80127, 264.75961, 35.46875 ) if ( tCars [ id ] ) then setVehicleColor ( tCars [ id ], tonumber ( guiGetText ( GUIEditor_Edit[1] ) ), tonumber ( guiGetText ( GUIEditor_Edit[2] ) ), tonumber ( guiGetText ( GUIEditor_Edit[3] ) ) ) end end end addEventHandler ( 'onClientGUIClick', GUIEditor_Grid[1],Prototype )
  23. cmd = we cant find the host websiteURL , please try again
×
×
  • Create New...