Jump to content

Akranes123

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by Akranes123

  1. local blip = createBlip ( 89.8653, -269.70767, 1.278, 58 ) local jobped = createPed ( 202, 122.80000305176, -296.20001220703, 1.6000000238419, 90.0041198 ) local getjobmarker = createMarker ( 122.69999694824, -294.29998779297, 0.60000002384186, "cylinder", 3, 255, 255, 0, 85 ) local destinations = { { 1456, 2877.8999023438, 9.8000001907349 }; { 2850.1000976563, 1209.8000488281, 9.6999998092651 }; { 2827.1000976563, 1383.5, 9.8000001907349 }; { 2495.5, 2773.3000488281, 9.8000001907349 }; { -2130.6999511719, -80.099998474121, 34.299999237061 }; { -2643.6000976563, 1373, 5.9000000953674 }; { -2747.1000976563, -280, 6 }; { 2339.97876, 2036.61914, 10.42309 }; { 1069.39612, 1226.58252, 10.23718 }; } function unpackDestinations () return unpack ( destinations [ math.random ( #destinations ) ] ) end addEventHandler("onResourceStart",getjobmarker, function(p) if p == lp and not isPedInVehicle(lp) then guiSetVisible(getjobmarker,true) showCursor(true) end end) -- Trucker Job GUI -- sx,sy = guiGetScreenSize() lp = getLocalPlayer() mr = math.random(1,2) jobwindow = guiCreateWindow(360, 190, 333, 388, "Trucker Job", false) guiWindowSetSizable(jobwindow, false) guiSetAlpha(jobwindow, 1.00) memo = guiCreateMemo(9, 18, 314, 224, "Hola, para ser un camionero debes hacer clic en el botón de aceptar a continuación, cuando aceptas el trabajo, debes ir al camión ubicado en el radar, cuando llegues, recibirás dinero. Si quiere dejar este trabajo, primero debe tener el trabajo, luego volver al marcador del trabajo del camionero y hará clic en el botón Salir del trabajo. Buena suerte.", false, jobwindow) label1 = guiCreateLabel(4, 273, 329, 15, "________________________________________________________", false, jobwindow) label = guiCreateLabel(10, 246, 252, 17, "ToRnix~|nR", false, jobwindow) guiSetFont(label, "default-bold-small") takebutton = guiCreateButton(14, 315, 140, 42, "Accept", false, jobwindow) guiSetProperty(takebutton, "NormalTextColour", "FFAAAAAA") cancbutton = guiCreateButton(180, 315, 137, 42, "Close", false, jobwindow) guiSetProperty(cancbutton, "NormalTextColour", "FFAAAAAA") guiSetVisible (jobwindow,false) guiMemoSetReadOnly(memo,true) guiWindowSetMovable (jobwindow,true ) guiWindowSetSizable (jobwindow,false ) -- The Continue or Not Gui -- sx, sy = guiGetScreenSize() lp = getLocalPlayer() mr = math.random(1,2) destinationwindow = guiCreateWindow(327, 219, 339, 365, "Trucker Job", false) guiSetAlpha(destinationwindow, 1.00) destinationmemo = guiCreateMemo(9, 18, 320, 227, "Oye, entonces con este gui, puedes elegir si quieres continuar con el trabajo del camionero o no, es tu elección, :)", false, destinationwindow) label1 = guiCreateLabel(9, 250, 283, 25, "¿Quieres continuar con el trabajo de camionero ?", false, destinationwindow) guiSetFont(label1, "default-bold-small") label2 = guiCreateLabel(0, 275, 334, 21, "_____________________________________________________________________", false, destinationwindow) continue = guiCreateButton(17, 309, 138, 37, "Continue", false, destinationwindow) guiSetProperty(continue, "NormalTextColour", "FFAAAAAA") close = guiCreateButton(192, 308, 127, 38, "Close", false, destinationwindow) guiSetProperty(close, "NormalTextColour", "FFAAAAAA") guiMemoSetReadOnly(destinationmemo, true) guiWindowSetSizable(destinationwindow, false) guiWindowSetMovable(destinationwindow, true) guiSetVisible (destinationwindow, false) -- addEventHandler("onClientGUIClick",jobwindow, function(b,thePlayer) if b == "left" then if source == takebutton then outputChatBox ("Ahora eres camionero",255,255,0, true) outputChatBox ("Ahora vuelve al marcador para ir a trabajar",0,255,0, true) guiSetVisible(jobwindow,false) guiSetVisible(takebutton,false) triggerServerEvent ( "doSomething", lp) showCursor(false) -- onduty = guiCreateButton(14, 288, 303, 27, "Go On Duty", false, jobwindow) guiSetProperty(onduty, "NormalTextColour", "FFAAAAAA") -- quitbutton = guiCreateButton(14, 315, 140, 42, "Quit", false, jobwindow) guiSetProperty(quitbutton, "NormalTextColour", "FFAAAAAA") -- end end end ) addEventHandler("onClientGUIClick",jobwindow, function(b,thePlayer) if b == "left" then if source == cancbutton then guiSetVisible(jobwindow,false) showCursor(false) end end end) addEventHandler("onClientGUIClick",jobwindow, function(b,thePlayer) if b == "left" then if source == quitbutton then outputChatBox ("Ya no eres camionero",255,0,0, true) guiSetVisible(jobwindow,false) guiSetVisible(quitbutton,false) guiSetVisible(onduty,false) guiSetVisible(offduty,false) guiSetVisible(cancbutton,true) guiSetVisible(takebutton,true) triggerServerEvent ( "doSomethin", lp) showCursor(false) destroyElement ( truckerMarker ) destroyElement ( truckerBlip ) end end end) addEventHandler("onClientGUIClick",jobwindow, function(b,thePlayer) if b == "left" then if source == onduty then outputChatBox ("Ahora está de servicio, regrese en el marcador para irse de servicio",source,0,255,0, true) triggerServerEvent ( "HaveTruckerJob", lp) triggerServerEvent ( "sum", lp) guiSetVisible(jobwindow,false) guiSetVisible(quitbutton,true) guiSetVisible(takebutton,false) guiSetVisible(offduty,true) guiSetVisible(onduty,false) guiSetVisible(cancbutton,true) showCursor(false) -- offduty = guiCreateButton(14, 288, 303, 27, "Salir de servicio", false, jobwindow) guiSetProperty(offduty, "NormalTextColour", "FFAAAAAA") -- end end end) addEventHandler("onClientGUIClick",jobwindow, function(b,thePlayer) if b == "left" then if source == offduty then outputChatBox ("Ahora estás fuera de servicio, regresa en el marcador para ir a trabajar",source,255,0,0, true) guiSetVisible(jobwindow,false) guiSetVisible(quitbutton,true) guiSetVisible(takebutton,false) guiSetVisible(offduty,false) guiSetVisible(onduty,true) guiSetVisible(cancbutton,true) showCursor(false) destroyElement ( truckerMarker ) destroyElement ( truckerBlip ) end end end) addEventHandler("onClientMarkerHit",getjobmarker, function(p) if p == lp and not isPedInVehicle(lp) then guiSetVisible(jobwindow,true) showCursor(true) end end ) addEvent("HaveTruckerJob", true) function createDestinations () x, y, z = unpackDestinations () truckerMarker = createMarker ( x, y, z, "cylinder", 3, 255, 51, 102, 85, localPlayer ) truckerBlip = createBlipAttachedTo ( truckerMarker, 51,nil, nil, nil, nil, nil, nil, nil, localPlayer ) end addEventHandler ( "HaveTruckerJob", root, createDestinations ) addEventHandler ( "onClientMarkerHit", root, function ( hitElement ) if source == truckerMarker and localPlayer == hitElement then local vehicle = getPedOccupiedVehicle ( localPlayer ) if vehicle and getElementModel(vehicle) == 514 then triggerServerEvent ( "givePlayerPay", localPlayer ) destroyElement ( truckerMarker ) if isElement(truckerBlip) then -- very important destroyElement ( truckerBlip ) end guiSetVisible(destinationwindow,true) showCursor(true) triggerEvent ( "createTruckerEvent", localPlayer ) end end end) addEventHandler ( "onClientPedDamage", resourceRoot, function () cancelEvent () end ) function exitforcar ( ) if isElement(truckerBlip) then -- very important destroyElement ( truckerBlip ) end if isElement(truckerMarker) then destroyElement ( truckerMarker ) end end addEventHandler ( "onClientPlayerVehicleExit", root, exitforcar ) ------------------------------- function wastedd ( ) if isElement(truckerBlip) then -- very important destroyElement ( truckerBlip ) end if isElement(truckerMarker) then destroyElement ( truckerMarker ) end end addEventHandler ( "OnClientPlayerWasted", getRootElement(), wastedd ) -- Destination Functions -- addEventHandler("onClientGUIClick",destinationwindow, function(b,thePlayer) if b == "left" then if source == continue then x, y, z = unpackDestinations () truckerMarker = createMarker ( x, y, z, "cylinder", 3, 255, 51, 102, 85, localPlayer ) truckerBlip = createBlipAttachedTo ( truckerMarker, 51,nil, nil, nil, nil, nil, nil, nil, localPlayer ) guiSetVisible(destinationwindow,false) showCursor(false) elseif source == close then guiSetVisible(destinationwindow,false) showCursor(false) end end end)
  2. Hola a todos, tengo un problema con mi grupo de clanes .... Me hacerlo todo como debe ser y no dan las funciones que deben ser quiero que me ayude por favor client.lua GUIEditor = { gridlist = {}, label = {} } function Aesede() Panel = guiCreateWindow(565, 287, 518, 325, "Panel De Clan **KillZone**", false) guiWindowSetSizable(Panel, false) guiSetAlpha(Panel, 1.00) guiSetProperty(Panel, "CaptionColour", "FF670000") ListaDeJugadores = guiCreateGridList(9, 23, 202, 250, false, Panel) guiGridListAddColumn(ListaDeJugadores, "Players", 0.9) GUIEditor.label[1] = guiCreateLabel(267, 28, 264, 100, "*K.Z*", false, Panel) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 0, 121, 199) BusquedaRapido = guiCreateButton(9, 278, 202, 37, "Actualizar", false, Panel) guiSetFont(BusquedaRapido, "default-bold-small") guiSetProperty(BusquedaRapido, "NormalTextColour", "FF670000") ReclutarFAV = guiCreateButton(267, 103, 198, 35, "Invitar a *K.Z*", false, Panel) guiSetFont(ReclutarFAV, "default-bold-small") guiSetProperty(ReclutarFAV, "NormalTextColour", "FF670000") QuitarClan = guiCreateButton(268, 148, 197, 34, "Sacar de *K.Z*", false, Panel) guiSetFont(QuitarClan, "default-bold-small") guiSetProperty(QuitarClan, "NormalTextColour", "FF670000") SkinNormal1 = guiCreateButton(268, 192, 94, 36, "Skin 1 Player", false, Panel) guiSetFont(SkinNormal1, "default-bold-small") guiSetProperty(SkinNormal1, "NormalTextColour", "FF670000") SkinLiderChica = guiCreateButton(372, 192, 93, 36, "Skin Leader", false, Panel) guiSetFont(SkinLiderChica, "default-bold-small") guiSetProperty(SkinLiderChica, "NormalTextColour", "FF670000") SkinNormal3 = guiCreateButton(268, 238, 94, 34, "Skin 2 Player", false, Panel) guiSetFont(SkinNormal3, "default-bold-small") guiSetProperty(SkinNormal3, "NormalTextColour", "FF670000") SkinLiderChico = guiCreateButton(372, 238, 93, 34, "Skin 3 Player", false, Panel) guiSetFont(SkinLiderChico, "default-bold-small") guiSetProperty(SkinLiderChico, "NormalTextColour", "FF670000") Nombre = guiCreateLabel(217, 301, 194, 14, "Copyright © WoZ//~ZuKi|R", false, Panel) guiSetFont(Nombre, "default-bold-small") guiLabelSetColor(Nombre, 255, 0, 0) Salir = guiCreateButton(426, 294, 82, 21, "Cerrar", false, Panel) guiSetFont(Salir, "default-bold-small") guiSetProperty(Salir, "NormalTextColour", "FF670000") NombreSkinMiembros = guiCreateLabel(268, 274, 94, 13, "Skin Reclutados", false, Panel) guiSetFont(NombreSkinMiembros, "default-bold-small") guiLabelSetColor(NombreSkinMiembros, 0, 121, 199) SkinLideres = guiCreateLabel(372, 274, 93, 14, "Skin Leader", false, Panel) guiSetFont(SkinLideres, "default-bold-small") guiLabelSetColor(SkinLideres, 0, 121, 199) local players = getElementsByType("player") for k,v in ipairs(players) do local row = guiGridListAddRow(ListaDeJugadores) --grid1 is your grid... guiGridListSetItemText(ListaDeJugadores, row, 1,getPlayerName(v):gsub("#%x%x%x%x%x%x", ""), false, false) guiGridListSetItemColor(ListaDeJugadores, row, 1, getPlayerNametagColor(v)) guiSetFont(ListaDeJugadores, "default-bold-small") end showCursor (true) addEventHandler ("onClientGUIClick", SkinNormal1, Skin22, false) addEventHandler ("onClientGUIClick", SkinNormal3, Skin23, false) addEventHandler ("onClientGUIClick", SkinLiderChico, SkinLChicos, false) addEventHandler ("onClientGUIClick", SkinLiderChica, SkinLChicas, false) addEventHandler ("onClientGUIClick", QuitarClan, Echar, false) addEventHandler ("onClientGUIClick", Salir, Exit, false) addEventHandler ("onClientGUIClick", GUIEditor.gridlist[1], ColocarJugadores, false) addEventHandler ("onClientGUIClick", ReclutarFAV, Invitar, false) end addEvent( "onGreetingK", true ) addEventHandler( "onGreetingK", localPlayer, Aesede ) function Actualizar() guiGridListClear(ListaDeJugadores) for index, player in ipairs(getElementsByType("player")) do row = guiGridListAddRow(ListaDeJugadores) guiGridListSetItemText ( ListaDeJugadores, row, columna, (string.gsub ( getPlayerName(player), '#%x%x%x%x%x%x', '' ) or getPlayerName(player)), false, false) guiGridListSetItemData ( ListaDeJugadores, row, columna, getPlayerName(player)) end end addEventHandler("onClientPlayerJoin", getRootElement(), Actualizar) addEventHandler("onClientPlayerQuit", getRootElement(), Actualizar) addEventHandler("onClientPlayerChangeNick", getRootElement(), Actualizar) addEventHandler ("onClientResourceStart",getRootElement(), Actualizar) function pegarnick () if source == ListaDeJugadores then local nomeplayer = guiGridListGetItemData(ListaDeJugadores, guiGridListGetSelectedItem(ListaDeJugadores), 1) local jogadorx = getPlayerFromName(nomeplayer) thePlayer = jogadorx end end addEventHandler ("onClientResourceStart", getRootElement(), pegarnick) addEventHandler ("onClientGUIClick", ListaDeJugadores, pegarnick, false) addEventHandler("onClientPlayerJoin", getRootElement(), pegarnick) addEventHandler("onClientPlayerQuit", getRootElement(), pegarnick) addEventHandler("onClientPlayerChangeNick", getRootElement(), pegarnick) function Invitar() triggerServerEvent ( "LNZ", thePlayer() ) end addEventHandler ("onClientClick", root, Invitar) function Skin22() triggerServerEvent ( "onGreeting", thePlayer() ) end addEventHandler ("onClientClick", root, Skin22) function Skin23() triggerServerEvent ( "onGreetingC", thePlayer() ) end addEventHandler ("onClientClick", root, Skin23) function SkinLChicos() triggerServerEvent ( "onGreetingB", thePlayer() ) end addEventHandler ("onClientClick", root, SkinLChicos) function SkinLChicas() triggerServerEvent ( "onGreetingD", thePlayer() ) end addEventHandler ("onClientClick", root, SkinLChicas) function Echar() triggerServerEvent ( "EchaRDelTeam", thePlayer() ) showCursor (true) end function Exit () showCursor (false) guiSetVisible (Panel, not guiGetVisible ( Panel ) ) end server,lua Teame21 = createTeam("**KillZone**", 32, 32, 32) Team1 = createTeam("**Civiles**", 32, 32, 32) addCommandHandler ( "tbk", function ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "TBK" ) ) then triggerClientEvent ( thePlayer, "onGreetingK", thePlayer ) else end end ) function skinNormalChico (jogador) setPedSkin ( jogador, 39) end addEvent( "onGreeting", true) addEventHandler( "onGreeting", getRootElement(), skinNormalChico ) ------------------------------------------------------------------------ function skinNormalChica (jogador) setPedSkin ( jogador, 102) end addEvent( "onGreetingC", true) addEventHandler( "onGreetingC", getRootElement(), skinNormalChica ) ------------------------------------------------------------------------ function skinLiderChic0 (jogador) setPedSkin ( jogador, 306) end addEvent( "onGreetingB", true) addEventHandler( "onGreetingB", getRootElement(), skinLiderChic0 ) ------------------------------------------------------------------------- function skinLiderChica (jogador) setPedSkin ( jogador, 281) end addEvent( "onGreetingD", true) addEventHandler( "onGreetingD", getRootElement(), skinLiderChica ) ------------------------------------------------------------------------ function Invitar () local Teame21 = getTeamFromName ( "**KillZone**" ) if Teame21 then setPlayerTeam ( source, Teame21 ) else local Teame21 = getTeamFromName ( "**KillZone**" ) if Teame21 then cancelEvent() outputChatBox("Usted no tiene que usar esto otra vez!", thePlayer) end end end addEvent( "LNZ", true) addEventHandler( "LNZ", getRootElement(), Invitar ) ----------------------------------------------------------------------- ----------------- function Echar (plr) local Team1 = getTeamFromName("**Civiles**") if Team1 then setPlayerTeam(source, Team1) outputChatBox ( "#870303[CLAN]>Has Sido Invitado a el [CLAN]>**KillZone**", source, 0, 255, 0, true ) else cancelEvent() outputChatBox ( "#FF0000Te Han Expulsado de **KillZone**", source, 0, 245, 82, true ) end end addEvent( "EchaRDelTeam", true) addEventHandler( "EchaRDelTeam", getRootElement(), Echar ) -------------------------------------------------------------------------
  3. Hello everyone can help me in something this is my problem I have a police system I want to make it when they arrest it deactivate the commands of other scripts that I have activated for example / ls that deactivates when in jail, I would like to know how I could do it To remove this command or function
  4. marty000123 D: not working
  5. Hi everyone, I am doing a trucker job, which I have a problem in the panel, when I approach the market I leave the panel but not the cursor to accept the job would help me to see what the error ------------------- This is my code --- client.Lua marker = createMarker( 887.65673828125, -1209.0100097656, 15.9765625,"cylinder", 2, 248, 248, 14, 100) blip = createBlipAttachedTo ( marker, 56, 2, 255, 0, 0, 255, 0, 200 ) function abrir (hitPlayer) if hitPlayer == localPlayer then showCursor(false) ventanatrabajar = guiCreateWindow(445, 237, 530, 416, "Hola Bienvenido Al Job De Camionero De |ZA|~> Zombie Attack", false) guiWindowSetSizable(ventanatrabajar, false) guiSetVisible(ventanatrabajar,true) showCursor(false) guiSetAlpha(ventanatrabajar, 1) memopercha = guiCreateMemo(9, 22, 301, 226, "Este Trabajo Consiste en darle a trabajar o a la X para salir Y Vas al marker q se spawmeara y cojes el auto y vas donde se te indica :D\n\nZombies Attack New Actualizacion\n\n\n\nServer Prahh \n\n\n|ZA| Te Saluda", false, ventanatrabajar) GridList = guiCreateGridList(315, 24, 205, 224, false, ventanatrabajar) guiGridListAddColumn(GridList, "Skin", 0.9) guiGridListAddRow(GridList) guiGridListSetItemText(GridList, 0, 1, "Libre", false, false) botonaceptar = guiCreateButton(18, 283, 216, 85, "Trabajar", false, ventanatrabajar) guiSetFont(botonaceptar, "sa-header") guiSetProperty(botonaceptar, "NormalTextColour", "FF47FE00") botoncancelar = guiCreateButton(285, 283, 216, 85, "X", false, ventanatrabajar) guiSetFont(botoncancelar, "sa-header") guiSetProperty(botoncancelar, "NormalTextColour", "FFFD0000") showCursor(false) proximamente = guiCreateButton(183, 373, 152, 33, "Actualizando Proximamente", false, ventanatrabajar) guiSetFont(proximamente, "default-bold-small") guiSetProperty(proximamente, "NormalTextColour", "FFAAAAAA") labelpercha = guiCreateLabel(423, 253, 97, 20, "BY : Akranes", false, ventanatrabajar) addEventHandler("onClientGUIClick",botonaceptar,tomarjob,false) addEventHandler("onClientGUIClick",botoncancelar,function() guiSetVisible(ventanatrabajar,false) showCursor(false) showCursor(false) end,false) end end addEventHandler("onClientMarkerHit",marker,abrir) function tomarjob () guiSetVisible(ventanatrabajar,false) showCursor(false) setElementData(localPlayer,"Ocupacion","Camionero") triggerServerEvent("setteam",localPlayer) local markervehiculos = createMarker( 892.03631591797, -1221.4144287109, 15.9765625,"cylinder", 2, 0, 248, 0, 100) addEventHandler("onClientMarkerHit",markervehiculos,elegirvehiculo) end function elegirvehiculo (hitPlayer) if hitPlayer == localPlayer and (getElementData(hitPlayer,"Ocupacion") == "Camionero") then if isPedInVehicle(hitPlayer) == false then if guiGetVisible(ventanavehiculo) == false then ventanavehiculo = guiCreateWindow(521, 210, 353, 333, "Elegir vehiculo", false) guiWindowSetSizable(ventanavehiculo, false) gridlistelegir = guiCreateGridList(80, 43, 193, 179, false, ventanavehiculo) guiGridListAddColumn(gridlistelegir, "Vehiculo:", 0.9) for i = 1, 3 do guiGridListAddRow(gridlistelegir) end guiGridListSetItemText(gridlistelegir, 0, 1, "Tanker", false, false) guiGridListSetItemText(gridlistelegir, 1, 1, "Roadtrain", false, false) guiGridListSetItemText(gridlistelegir, 2, 1, "Linerunner", false, false) aceptarvehiculo = guiCreateButton(29, 261, 121, 45, "Aceptar", false, ventanavehiculo) cancelarvehiculo = guiCreateButton(195, 261, 121, 45, "Cancelar", false, ventanavehiculo) guiSetVisible(ventanavehiculo,true) showCursor(true) addEventHandler("onClientGUIClick",aceptarvehiculo,function () camion = guiGridListGetItemText ( gridlistelegir, guiGridListGetSelectedItem ( gridlistelegir ), 1 ) if camion == "Tanker" then triggerServerEvent("creartanker",localPlayer) guiSetVisible(ventanavehiculo,false) showCursor(false) llegadamarker1 =createMarker(-75.295272827148, -1124.0804443359, 1.078125,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada1 = createBlipAttachedTo(llegadamarker1,51) setElementData(localPlayer,"misioncamionero",1) addEventHandler("onClientMarkerHit",llegadamarker1,llegada1) outputChatBox("Ve hasta el icono de camion marcado en el mapa!",0,250,0) addEventHandler("onClientRender",getRootElement(),rendercamionero) elseif camion == "Roadtrain" then triggerServerEvent("crearroad",localPlayer) guiSetVisible(ventanavehiculo,false) showCursor(false) llegadamarker1 =createMarker(-75.295272827148, -1124.0804443359, 1.078125,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada1 = createBlipAttachedTo(llegadamarker1,51) setElementData(localPlayer,"misioncamionero",1) addEventHandler("onClientMarkerHit",llegadamarker1,llegada1) outputChatBox("Ve hasta el icono de camion marcado en el mapa!",0,250,0) addEventHandler("onClientRender",getRootElement(),rendercamionero) elseif camion == "Linerunner" then triggerServerEvent("crearline",localPlayer) guiSetVisible(ventanavehiculo,false) showCursor(false) llegadamarker1 =createMarker(-75.295272827148, -1124.0804443359, 1.078125,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada1 =createBlipAttachedTo(llegadamarker1,51) setElementData(localPlayer,"misioncamionero",1) addEventHandler("onClientMarkerHit",llegadamarker1,llegada1) outputChatBox("Ve hasta el icono de camion marcado en el mapa!",0,250,0) addEventHandler("onClientRender",getRootElement(),rendercamionero) end end, false) addEventHandler("onClientGUIClick",cancelarvehiculo,function () guiSetVisible(ventanavehiculo,false) showCursor(false) end,false) end end end end function llegada1 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker1) destroyElement(blipllegada1) llegadamarker2= createMarker( -1033.4045410156, -612.54766845703, 32.0078125,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada2 =createBlipAttachedTo(llegadamarker2,51) addEventHandler("onClientMarkerHit",llegadamarker2,llegada2) end end function llegada2 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker2) destroyElement(blipllegada2) llegadamarker3= createMarker( -2107.03515625, 207.4593963623, 35.245025634766,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada3 =createBlipAttachedTo(llegadamarker3,51) addEventHandler("onClientMarkerHit",llegadamarker3,llegada3) end end function llegada3 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker3) destroyElement(blipllegada3) llegadamarker4= createMarker( -1708.77734375, 952.78442382813, 24.7421875,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada4 =createBlipAttachedTo(llegadamarker4,51) addEventHandler("onClientMarkerHit",llegadamarker4,llegada4) end end function llegada4 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker4) destroyElement(blipllegada4) llegadamarker5= createMarker( -2260.9384765625, 2327.1472167969, 4.8125,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada5 =createBlipAttachedTo(llegadamarker5,51) addEventHandler("onClientMarkerHit",llegadamarker5,llegada5) end end function llegada5 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker5) destroyElement(blipllegada5) llegadamarker6= createMarker( -64.618476867676, 1200.3625488281, 18.646831512451,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada6 =createBlipAttachedTo(llegadamarker6,51) addEventHandler("onClientMarkerHit",llegadamarker6,llegada6) end end function llegada6 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker6) destroyElement(blipllegada6) llegadamarker7= createMarker( 281.90103149414, -214.63499450684, 1.4296875,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada7 =createBlipAttachedTo(llegadamarker7,51) addEventHandler("onClientMarkerHit",llegadamarker7,llegada7) end end function llegada7 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker7) destroyElement(blipllegada7) llegadamarker1 =createMarker(-75.295272827148, -1124.0804443359, 1.078125,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada1 =createBlipAttachedTo(llegadamarker1,51) addEventHandler("onClientMarkerHit",llegadamarker1,llegada1) outputChatBox("Completaste todo el recorrido, se te dio un plus de $20.000") triggerServerEvent("dardinero1",localPlayer) end end function llegaradestino () suerte = math.random(1,4) nivelcamionero = getElementData(localPlayer,"nivelcamionero") if suerte == 4 then plata = tonumber(5280 + tonumber(nivelcamionero)*10) triggerServerEvent("dardinero",localPlayer,plata) elseif suerte == 3 then plata = tonumber(4890 + tonumber(nivelcamionero)*10) triggerServerEvent("dardinero",localPlayer,plata) elseif suerte == 2 then plata = tonumber(5355 + tonumber(nivelcamionero)*10) triggerServerEvent("dardinero",localPlayer,plata) elseif suerte == 1 then plata = tonumber(5120 + tonumber(nivelcamionero)*10) triggerServerEvent("dardinero",localPlayer,plata) end triggerServerEvent("darnivel",localPlayer) outputChatBox("Entrega completada!, te pagaron $"..tostring(plata),0,250,0) end function cancelarMision() setElementData(source,"misioncamionero",0) removeEventHandler("onClientRender",getRootElement(),rendercamionero) if isElement(llegadamarker1) then destroyElement(llegadamarker1) destroyElement(blipllegada1) elseif isElement(llegadamarker2) then destroyElement(llegadamarker2) destroyElement(blipllegada2) elseif isElement(llegadamarker3) then destroyElement(llegadamarker3) destroyElement(blipllegada3) elseif isElement(llegadamarker4) then destroyElement(llegadamarker4) destroyElement(blipllegada4) elseif isElement(llegadamarker5) then destroyElement(llegadamarker5) destroyElement(blipllegada5) elseif isElement(llegadamarker6) then destroyElement(llegadamarker6) destroyElement(blipllegada6) elseif isElement(llegadamarker7) then destroyElement(llegadamarker7) destroyElement(blipllegada7) end end addEvent("cancel",true) addEventHandler("cancel",root,cancelarMision) function rendercamionero() if getElementData(localPlayer,"misioncamionero") == 1 then x1,y1 = getElementPosition(localPlayer) dxDrawText("|Trabajo de camionero|", 305, 682, 565, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) if (isElement(llegadamarker1)) then local distancia = getDistanceBetweenPoints2D ( x1, y1, -75.295272827148, -1124.0804443359 ) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) elseif (isElement(llegadamarker2)) then local x2,y2 = getElementPosition(llegadamarker2) local distancia = getDistanceBetweenPoints2D ( x1, y1, x2,y2) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) elseif (isElement(llegadamarker3)) then local x2,y2 = getElementPosition(llegadamarker3) local distancia = getDistanceBetweenPoints2D ( x1, y1, x2,y2 ) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) elseif (isElement(llegadamarker4)) then local x2,y2 = getElementPosition(llegadamarker4) local distancia = getDistanceBetweenPoints2D ( x1, y1, x2,y2 ) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) elseif (isElement(llegadamarker5)) then local x2,y2 = getElementPosition(llegadamarker5) local distancia = getDistanceBetweenPoints2D ( x1, y1, x2,y2 ) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) elseif (isElement(llegadamarker6)) then local x2,y2 = getElementPosition(llegadamarker6) local distancia = getDistanceBetweenPoints2D ( x1, y1, x2,y2 ) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) elseif (isElement(llegadamarker7)) then local x2,y2 = getElementPosition(llegadamarker7) local distancia = getDistanceBetweenPoints2D ( x1, y1, x2,y2 ) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) end dxDrawText("|Nivel:"..tostring(getElementData(localPlayer,"nivelcamionero")), 825, 682, 1085, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) end end fileDelete("c.lua")
  6. Hello, Greetings to all, Well I am doing a script that when from a computer from the Admin panel I automatically add it to an ACL group this is my code I get error does not add me to acl, please help function tag( thePlayer) local team = getPlayerTeam( thePlayer ) conta = getAccountName(getPlayerAccount(source)) if ( getTeamName( team ) == "**Militar**" ) then aclGroupAddObject (aclGetGroup("Militar"), "user."..conta) end end
  7. Hello everyone, he has been thinking a lot about making a script that when I get a team from a certain one when they remove it from the team that removes the tag .... please help me?
  8. Yes, I'm sure that's why I sent it like this
  9. Hola a todos me podrian ayudar en este script que estoy creando .... Quiero que Cuando le de un equipo a un Usuario por ejemplo Militar y a lo que le de Militar Automaticamente lo añada a un Grupo ACL .. Este es mi Script --------------------------------- Server.lua function tag( (playerSource,team, accountName) if ( getTeamName( team ) == "**Militar**" ) then aclGroupAddObject (aclGetGroup("Militar"), "user."..accountName)) else aclGroupRemoveObject (aclGetGroup("Militar"), "user."..accountName)) end
  10. Akranes123

    Name tag

    Hola a todos , he estado pensando mucho sobre en realizar un script de que cuando entre a un team le de un tal y cuando lo saquen del Team que le remueva el tag.... porfavor me ayudan ?
  11. Hola a todos tengo un problema , Tengo un resource la cual remplaza el cielo en modo de apocalipsis , el problema es que cuando estoy logueado todo asi sale pero cuando reconecto y estoy en el panel login se ve pero cuando logueo ya no se ve Se pone en el cielo normal Ayuda please ...
  12. Hello good morning or night for all, well I am new in scripts but I do not know anything I want to please help me with a script is to save team when the user dies or reconnect and log in your account stay in the team What was before leaving please help me i'm new
  13. Hola a todos quieren que me ayuden con algo Quiero que cuando un usuario se registre en el servidor lo envie a un team especificado no se como hacerle ya e intentado pero no me da me podrian ayudar con eso porfavor y tambien cuando muera que no se salga del team
  14. hi, I need help I want it when someone registers and logs into your account when logging into your account automatically passes it to a team such as Team * Civil * I want it when I register and log in to the team * Civil * Automatically ..... Please if you would be so kind to help me with a script like this or give me an idea
  15. Hola, buenas noticias para todos, espero que estés muy bien. Quiero que me ayude con esto estoy editando un marcador y cuando lo activo y entro en mi servidor con mi seudónimo por ejemplo, # FF0000Akranes el código se ve en el marcador Quiero que me ayude con ese pequeño error por favor, no sé cómo hacer que se vaya sin los códigos -- -- Update the scoreboard content -- local currentTick = getTickCount() if (currentTick - scoreboardTicks.lastUpdate > scoreboardTicks.updateInterval and (scoreboardToggled or scoreboardForced)) or forceScoreboardUpdate then forceScoreboardUpdate = false scoreboardContent = {} local index = 1 local sortTableIndex = 1 local sortTable = {} local players = getElementsByType( "player" ) for key, player in ipairs( players ) do if not getPlayerTeam( player ) or not (showTeams or (serverInfo.forceshowteams and not serverInfo.forcehideteams)) or serverInfo.forcehideteams then sortTable[sortTableIndex] = {} for key, column in ipairs( scoreboardColumns ) do local content if column.name == "name" then local playerName = getPlayerName( player ) if serverInfo.allowcolorcodes then if string.find( playerName, "#%x%x%x%x%x%x" ) then local colorCodes = {} while( string.find( playerName, "#%x%x%x%x%x%x" ) ) do local startPos, endPos = string.find( playerName, "#%x%x%x%x%x%x" ) if startPos then colorCode = string.sub( playerName, startPos, endPos ) table.insert( colorCodes, { { getColorFromString( colorCode ) }, startPos } ) playerName = string.gsub( playerName, "#%x%x%x%x%x%x", "", 1 ) end end content = { playerName, colorCodes } else content = playerName end else content = playerName end elseif column.name == "ping" then content = getPlayerPing( player ) else content = getElementData( player, column.name ) end content = iif( content and column.name ~= "name" and type( content ) ~= "table", tostring( content ), content ) if column.textFunction then if content and column.name == "name" and type( content ) == "table" then content[1] = column.textFunction( content[1], player ) else content = column.textFunction( content, player ) end end sortTable[sortTableIndex][column.name] = content sortTable[sortTableIndex]["__SCOREBOARDELEMENT__"] = player end sortTableIndex = sortTableIndex + 1 end end if sortBy.what ~= "__NONE__" then table.sort( sortTable, scoreboardSortFunction ) end for key, value in ipairs( sortTable ) do scoreboardContent[index] = value index = index + 1 end if (showTeams or (serverInfo.forceshowteams and not serverInfo.forcehideteams)) and not serverInfo.forcehideteams then -- And then the teams local teamSortTableIndex = 1 local teamSortTable = {} sortTableIndex = 1 sortTable = {} local teams = getElementsByType( "team" ) for key, team in ipairs( teams ) do -- Add teams to sorting table first teamSortTable[teamSortTableIndex] = {} for key, column in ipairs( scoreboardColumns ) do local content if column.name == "name" then local teamName = getTeamName( team ) local teamMemberCount = #getPlayersInTeam( team ) teamName = iif( teamName, tostring( teamName ), "-" ) teamMemberCount = iif( teamMemberCount, tostring( teamMemberCount ), "0" ) teamName = teamName .. " (" .. teamMemberCount .. " player" .. iif( teamMemberCount == "1", "", "s" ) .. ")" if serverInfo.allowcolorcodes then if string.find( teamName, "#%x%x%x%x%x%x" ) then local colorCodes = {} while( string.find( teamName, "#%x%x%x%x%x%x" ) ) do local startPos, endPos = string.find( teamName, "#%x%x%x%x%x%x" ) if startPos then colorCode = string.sub( teamName, startPos, endPos ) table.insert( colorCodes, { { getColorFromString( colorCode ) }, startPos } ) teamName = string.gsub( teamName, "#%x%x%x%x%x%x", "", 1 ) end end content = { teamName, colorCodes } else content = teamName end else content = teamName end else content = getElementData( team, column.name ) end content = iif( content and column.name ~= "name" and type( content ) ~= "table", tostring( content ), content ) if column.textFunction then if content and column.name == "name" and type( content ) == "table" then content[1] = column.textFunction( content[1], team ) else content = column.textFunction( content, team ) end end teamSortTable[teamSortTableIndex][column.name] = content teamSortTable[teamSortTableIndex]["__SCOREBOARDELEMENT__"] = team end teamSortTableIndex = teamSortTableIndex + 1 -- and then the players sortTableIndex = 1 sortTable[team] = {} local players = getPlayersInTeam( team ) for key, player in ipairs( players ) do sortTable[team][sortTableIndex] = {} for key, column in ipairs( scoreboardColumns ) do local content if column.name == "name" then local playerName = getPlayerName( player ) if serverInfo.allowcolorcodes then if string.find( playerName, "#%x%x%x%x%x%x" ) then local colorCodes = {} while( string.find( playerName, "#%x%x%x%x%x%x" ) ) do local startPos, endPos = string.find( playerName, "#%x%x%x%x%x%x" ) if startPos then colorCode = string.sub( playerName, startPos, endPos ) table.insert( colorCodes, { { getColorFromString( colorCode ) }, startPos } ) playerName = string.gsub( playerName, "#%x%x%x%x%x%x", "", 1 ) end end content = { playerName, colorCodes } else content = playerName end else content = playerName end elseif column.name == "ping" then content = getPlayerPing( player ) else content = getElementData( player, column.name ) end content = iif( content and column.name ~= "name" and type( content ) ~= "table", tostring( content ), content ) if column.textFunction then if content and column.name == "name" and type( content ) == "table" then content[1] = column.textFunction( content[1], player ) else content = column.textFunction( content, player ) end end sortTable[team][sortTableIndex][column.name] = content sortTable[team][sortTableIndex]["__SCOREBOARDELEMENT__"] = player end sortTableIndex = sortTableIndex + 1 end if sortBy.what ~= "__NONE__" then table.sort( sortTable[team], scoreboardSortFunction ) end end if sortBy.what ~= "__NONE__" then table.sort( teamSortTable, scoreboardSortFunction ) end for key, content in ipairs( teamSortTable ) do local team = content["__SCOREBOARDELEMENT__"] scoreboardContent[index] = content index = index + 1 for key, value in ipairs( sortTable[team] ) do scoreboardContent[index] = value index = index + 1 end end end scoreboardTicks.lastUpdate = currentTick end
×
×
  • Create New...