Jump to content

Alfredo

Members
  • Posts

    15
  • Joined

  • Last visited

About Alfredo

  • Birthday 21/11/2001

Details

  • Gang
    Alfredo
  • Location
    España

Recent Profile Visitors

955 profile views

Alfredo's Achievements

Square

Square (6/54)

5

Reputation

  1. Take a look to this wiki function dbExec: https://wiki.multitheftauto.com/wiki/DbExec
  2. Here is another one... you need just add the cmd to "cmdAntiSPAM" table like the example: local cmdAntiSPAM = { -- {cmd,usageLimit,time,dataName}, {"say",5,3000,"CMD_SAY"}, {"help",1,3000,"CMD_HELP"}, } function preventCommandSpam(command) for i,v in ipairs(cmdAntiSPAM) do if v[1] == command then local data = getElementData(source,v[4]) if data then local spam = data+1 if spam >= v[2] then cancelEvent() outputChatBox ("You need to wait before using this command again!", source, 255, 0, 0, false) else setElementData(source,v[4],spam) end else setElementData(source,v[4],0) setTimer(removeSPAMData,v[3],1,source,v[4]) end end end end addEventHandler("onPlayerCommand", getRootElement(), preventCommandSpam) function removeSPAMData(player,data) if isElement(player) then removeElementData(player,data) end end I hope this can help you.
  3. Un resource para registrar una cuenta necesita permisos de administrador. ¿Comprobaste que esto esté en orden? Recuerda no dar permisos de administrador a no ser que confies al 100%
  4. ¿El vehículo spawnea y el blip aparece en el mapa pero ambos no se adjuntan? Debería ir bien si usas la función correcta... De todos modos te dejo unos cambios para la función crearCamion, agrégalo y me dices que tal: function crearCamion() if ( camion_creado==false ) then --Si el camión no está creado, lo creamos local x,y,z = unpack (tabla_coordenadas_camion[math.random(1,5)]) --Elegimos un indice al azar local vehiculo = createVehicle( 428, x, y, z, 0, 0, 0, "Blind") if vehiculo then local blipCamion = createBlipAttachedTo(vehiculo, 20, 2, 255, 0, 0, 255, 32767, 30000) if blipCamion then setElementDimension(vehiculo, 0) setElementInterior(vehiculo, 0) setVehicleColor(vehiculo, 255, 255, 255, 0, 0, 0) setVehicleDamageProof ( vehiculo, true ) --Lo hacemos indestructible setVehicleFuelTankExplodable ( vehiculo, false ) setVehicleHandling(vehiculo, "maxVelocity", 25) --Maxima velocidad del vehiculo camion_creado = true areaCamion=createColCircle ( x, y, 70 ) attachElements(areaCamion, vehiculo) tabla_camion_blindado[1]=vehiculo tabla_blip_camion[1]=blipCamion entrega_flag_army=math.random(1,9) repeat entrega_flag_terro=math.random(1,9) until(entrega_flag_army~=entrega_flag_terro) --Si ambos son diferentes, se sale del ciclo outputChatBox("#ff0000**************************************", getRootElement(), 255,255,255, true) outputChatBox(" ", getRootElement(), 255,255,255, true) outputChatBox("#ff0000[ARMY/TERRO] #ffffffHa aparecido un #0000ffCAMIÓN BLINDADO #ffffffcon armamento listo para su entrega! Ve al ícono #ffff00'CASCO ROJO' #ffffffen el #ff0000RADAR", getRootElement(), 255,255,255, true) outputChatBox(" ", getRootElement(), 255,255,255, true) outputChatBox("#ff0000**************************************", getRootElement(), 255,255,255, true) end end end end addEventHandler ( "onResourceStart", getResourceRootElement (getThisResource()), crearCamion )
  5. Tienes que usar createBlipAttachedTo: https://wiki.multitheftauto.com/wiki/CreateBlipAttachedTo De todos modos podrías publicar parte del código para ver exactamente cual es el problema. Un saludo.
  6. Hi, first sorry for my english. jaja Ok you need to use https://wiki.multitheftauto.com/wiki/CreateColCircle attached to the player (https://wiki.multitheftauto.com/wiki/AttachElements) When other players enter the col you have to set a data and then use it in outputChatBox https://wiki.multitheftauto.com/wiki/OnColShapeHit https://wiki.multitheftauto.com/wiki/SetElementData https://wiki.multitheftauto.com/wiki/OutputChatBox Dont forget remove the data when the player leave the col! (Optional) Also you can view the col using devmode. First you have to enable it. https://wiki.multitheftauto.com/wiki/SetDevelopmentMode then open your MTA consola pressing F8 and write... "devmode" and "showcol" Done!
  7. Utiliza un timer: setTimer https://wiki.multitheftauto.com/wiki/SetTimer
  8. You can create serverside objects using "createObject" and send to client using "triggerClientEvent" Then, check if you meta.xml is well written. (File path, names, etc) check wiki: createObject: https://wiki.multitheftauto.com/wiki/CreateObject triggerClientEvent: https://wiki.multitheftauto.com/wiki/TriggerClientEvent Elements tree: https://wiki.multitheftauto.com/wiki/Element_tree
  9. ES: Primero tienes que descargar filezilla https://filezilla-project.org/ EN: First dowload Filezilla: https://filezilla-project.org/ ES: Luego tienes que poner la contraseña y dirección que te proporcionó tu proveedor de servicios en los recuadros indicados y luego le das a conectar... EN: Then you have to put the password and address provided by the company... ES: Una vez estés dentro del servidor FTP escribes la ruta donde se encuentra tu carpeta de MTA server y luego es solo cuestión de subir los scripts... EN: Then you're inside the FTP server, write the the path where your MTA server folder is located and then you can upload your scripts...
  10. Pon el setVehicleLocked en la función que crea el vehículo al conectarse.
  11. Hola, estamos buscando programadores para una comunidad RolePlay que poco a poco se está haciendo mas conocida. Se trata de RPA: ♛Servidor de MTA 2019♛ ♦RPA Roleplay Advanced |EN MANTENIMIENTO|♦ ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ ➛Comunidad de +420 Personas ➛Host ubicado en Canada ➛Spoilers y Actualizaciones del servidor antes de su apertura. ➛Full Roleplay Español. ➛250 Slots ➛Staff & Moderadores Experimentados. ➛Mapeo & Hud Exclusivo del servidor. ➛Discord Oficial del servidor. ➛Foro y Página oficial del servidor. ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ ➛¡Facciones! | LSPD | LSMD | LSEM | LSJD | LSCW | ➛¡Bandas! | Gangs | Mafias | Alianzas | Negocios | ➛¡Economía! | Paga diaria | Venta de coches | Venta de casas | Venta de drogas | Servicios | ➛¡Tunning Personalizado! | Neón | Alerón | Faros | Ruedas | Color del coche | Etc | ➛!Legal o Ilegal¡ Tu decides si tener un rol de Ladrón o Traficante o ser una persona sin antecedentes policiales. Cargos que buscamos: - Un Supervisor de programación. - Dos programadores. Como buscamos gente seria pondremos los siguientes requisitos: - Conocimiento medio de programación Lua. - Alguna muestra que demuestre dichos conocimientos. - Experiencia programando en MTA. - Firmar un acuerdo de confidencialidad. - Conocimientos de SQL, manejo de base de datos en general. ¿Porque tengo que firmar un acuerdo de confidencialidad? - Buscamos tener una comunidad segura y poder garantizar la seguridad de los códigos realizados por nuestros programadores. ---Para mas información o para postularte por favor contactarme por: --- Correo: [email protected] Discord personal: Alfredo#9644 Servidor Discord de la comunidad: https://discord.gg/2khrzAx
  12. Prueba usar "getPedOccupiedVehicle" https://wiki.multitheftauto.com/wiki/GetPedOccupiedVehicle
×
×
  • Create New...