Jump to content

Search the Community

Showing results for tags 'resource'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Member Title


Gang


Location


Occupation


Interests

  1. Airplane This resource adds ambient aircraft to your MTA map. As many as you want, as long as the MTA element stream engine likes it. The aircraft models can be modified in config_s.lua. The resource was pre-mentioned in the Server time sync resource, because it is was an example resource which made use of serverside time. (And still makes use of) But by posting updates there for a different resource is a bit confusing. It is beyond a test resource now. Note: you still need to download the server time sync resource for this resource to work. You will be given an option to download server time sync resource, when you the download the resource airplane. The resource doesn't only creates planes, but also helicopters. Which is confusing I know, since the resource name is 'airplane'. But it was already too late for that without losing my version archive. Version 1.2.0 / 1.1.1 video's Admin settings Quantity aircraft Developermode Displaying the airplanes and other useful information. Demomode true - Let the resource create the aircraft false - Fill in your own aircraft list manually in file: config_s.lua How the aircraft is adjusted according to the GTA map. The blue crosses are used to display the max ground height of that specific area(200x200). You see that the crosses are placed higher near trees and buildings. The resource will adjust the aircraft height according to this data. This view is visible when development mode is active and some adjustments in the config_s.lua for the ground height data. Dataset for the aircraft height is available here: https://wiki.multitheftauto.com/wiki/Dataset-map-height Pro's: Low CPU usage after initialization. No network usage after initialization. Only the dependency server time sync will use network usage after initialization. Not that many lines of code for you have to scan through, if you want to modify the resource. Simple to implement. If you find a bug, I will be here. Con's No AI implementation. Brain-dead AI. The 'time based driven (animations)' concept is used, not everybody is familiar with that concept. That makes it harder to edit. It basically means that the aircraft animations are unstoppable, since time doesn't stop either. Pro: Which nearly nullifies the need of constant network usage between the server and the client. All aircraft are indestructible (even if not set to damage proof). (Can also be a pro) But I might add something in the future to counter that... but I first must figure out how that is suppose to work. Does not work outside of the GTA map. Download link: Resource Airplane Other downloads: Resource Server time sync Dataset GTA map height
  2. Hey, for last 2 months (or so) I was working on resource for MTA that implements custom rendering, idea was simple - get huge graphics improvment while saving original SA feeling, and I think I managed to do that! (Greetings to people who have been saying for years that MTA is too limited for shaders like that lol) It's important to mention - it's not ENB or any external script - it's just a resource, that server owner can start for everyone and players don't need to download anything! I'm here to share with you progress of it, yes - it's not done yet, but I'm very close to finishing it. Gallery (with slider to compare): https://borsuczyna.github.io Screenshots: What are requirements? Any gpu with shader model 3.0 can run it (almost any) special thanks Ren712, Einheit-101 Most important - when release? Sadly, I can't tell. There are still many things to do and to make it playable shader, like weather effects, finishing timecyc etc. also important to mention is that project will be open source when finished, anyone can contribute to it or create own fork! If you're interested in development, want to contribute or just want to look at some good pics everyday, join my discord server: https://discord.gg/gY5BZs4Y5Z (ps. please unban me from mta discord)
  3. Boa noite, gostaria de saber se tem solução o bug do "MODO GHOST ATIVADO" que fica floodando no chat pelo sistema de ativo e passivo, revirei toda a internet e nao achei nenhum script que nao de esse bug, todos ativos e passivos que achei dão esse problema, e são todos compilados alguma solução??
  4. Hello, I recently returned to making a server after a year and I wanted to remind myself how the "source", "root", "this", "sourceResource", "sourceResourceRoot", "client" etc. Elements worked. Unfortunately, when I checked the MTA wiki, I didn't understand any of these elements. In general, the best help would be if someone explained to me how these elements work on examples for AddEventHandler because in mta wiki there is only one example for a "source" and I guess "root"? element
  5. Draw distance v1.0.2 This resource improves the draw distance of all your resources that make use of map files. It makes your maps 10x more beautiful in my opinion! Greatly improves the draw distance of map objects Maxed out the draw-distance for peds and vehicles. (See MTA settings > video: Render vehicles always in high detail + Render peds always in high detail ) Multi-resources support (this effect is applied on every mapRoot element) Parallel loading method is used, but the loading speed is in that case reduced to improve performance. The effect is not only applied on resources that are starting, but also resources that are already running. Download here This resource is uncompiled! Repository: https://gitlab.com/IIYAMA12/draw-distance Video - Created by @Anx1ty Comparison Starting at 200 units distance 400 units distance (this is the distance where a lot of objects will be unloaded, but in this case switched with lowLOD objects) And even on 600 units distance, it is technically visible -> (while the fog is slowly eating it up... ) Download here Can all hardware run this? --> I have no idea... most likely ?. Just give it a try.
  6. For more information: Discord Group: https://discord.gg/cA9vnVFdYs Discord: NicolasECM#9405 Website: http://nicolasecm.com.co/
  7. I need help, I'm wanting to implement admins tags in my chat/scoreboard on my tactics server, however, GM is completely compiled and the scoreboard doesn't have the default exports, and even if I create a tag system it makes another chat and it does not replace the gm one, could someone help me?
  8. Galera to fazendo um sistema de painel q vc digita no painel tipo 255, 0, 0 dentro de um carro e seta a cor vermelha no carro q e do rgb 255, 0, 0 e etc. mas da forma que achei que era possivel ao abrir o painel e digitar a cor em rgb eu fiz uma função que na teoria era pra pegar oq foi digitado na editbox e setar oq foi digitado na editbox como cor do carro usando setVehicleColor so q n aparece nada e n seta cor no carro mais se o carro ta vermelho e coloca tipo 255, 0, 0 na editbox e da ok a cor sempre muda pra preto espero q de para entender function SetarCor (playerSource, getMsg) --local mensagem = tonumber(getMsg) local uVehicle = getPedOccupiedVehicle( playerSource ) if isPedInVehicle( playerSource ) then if uVehicle then -- if mensagem == "Vermelho" then setVehicleColor( uVehicle, tonumber(getMsg)) end end --end end addEvent("SetarCor", true) addEventHandler("SetarCor", getRootElement(), SetarCor) PARTE DO CLIENT function rgbtrigger (button, state) if painel == true then if button == "left" and state == "down" then if isCursorOnElement(screenW * 0.6384, screenH * 0.5885, screenW * 0.7379, screenH * 0.6185) then local getMsg = tostring(getElementData(msgstaff, "CMT_Txt")) removeEventHandler("onClientRender", root, dx) triggerServerEvent("SetarCor", getLocalPlayer(), localPlayer, getMsg) painel = false showCursor(false) end end end end addEventHandler("onClientClick", root, rgbtrigger)
  9. Hello dear community. I'm doing a Error Tooltip Resource, I created an Error Client File for all the Errors from my Main Register Resource, and I tried to call that resource by Functions on the same resource, How can I call a Function from the same resource and get The Object File that I want?... This is my code - Error File (InitTooltipMessage.lua) ---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•--- ---| |--- ---| Script by "Kyonax - Pilar Perfeccionista" Synchronous member |--- ---| Github: https://github.com/Kyonax • G-Mail: [email protected] |--- ---| Code Script from Montgomery Country RP |--- ---| Resource-Script: [init] |--- ---| Name-Script: [InitTooltipMessage] |--- ---| Function-Script: Save all the posible Script Errors |--- ---| |--- ---| DEV-DATE: 31/08/2020 |--- ---| Server Script |--- ---| number: 001 |--- ---| MIT License |--- ---| |--- ---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•---•--- local tooltip = { error = { notDataDigit = { name = 'notDataDigit', syntax = 'NULL LABEL', message = 'El campo actual debe ser completado', description = 'El campo en donde te encuentras, es un campo de entrada, es decir necesitas ingresar información para poder continuar.', type = 'ERROR', number = '1' }, notFoundAccount={ name = 'notFoundAccount', syntax = 'NULL QUERY LOGIN', message = 'No se ha podido encontrar la cuenta en la Base de Datos.', description='Se ha recibido valor NULL al realizar la búsqueda Query del Usuario en la Base de Datos, es decir que el valor Buscado no existe en la Base de Datos.', type = 'ERROR', number = '2' }, notEqual = { name = 'notEqual', syntax = 'NOT EQUAL LABEL', message = 'Los datos ingresados no son iguales.', description = 'Se ha obtenido un ERROR de similitud a la hora de comparar dos valores que deben ser exactamente iguales.', type = 'ERROR', number = '3' } incorrectInformation ={ name = 'incorrectInformation', syntax = 'NOT EQUAL QUERY', message = 'La información ingresada es incorrecta.', description = 'La comparación de el dato obtenido de la Base de Datos y el Ingresado ha devuelto un ERROR de similitud, es decir los datos ingresados no son iguales a los registrados en la base de datos.', type = 'ERROR', number = '4' }, notFoundVariables = { name = 'notFoundVariables', syntax = 'NULL INFORMATION', message = 'Las variables esenciales tienen como valor NULL.', description = 'Variables necesarias para le ejecución del código son de valor NULL, lo que indica que los valores no han sido digitadas o que han sido corrompidos.', type = 'ERROR', number = '5' }, existAccount = { name = 'existAccount', syntax = 'MULTIPLE VALUES QUERY', message = 'El usuario digitado no se encuentra disponible.', description = 'El nombre de usuario para crear la cuenta ya se encuentra registrado en la Base de Datos, lo que causa un error de multiples valores registrados.', type = 'ERROR', number = '6' }, existDiscordID = { name = 'existDiscordID', syntax = 'MULTIPLE VALUES QUERY', message = 'La ID de Discord digitada ya se encuentra en uso.', description = 'La ID de Discord se encontró en la base de datos, lo que quiere decir que otra cuenta está registrada con esta ID.', type = 'ERROR', number = '7' }, notValidPassword = { name = 'notValidPassword', syntax = 'LOW SECURITY ACCOUNT', message = 'La contraseña no es segura', description = 'Existen algunos requerimientos para acceder al Servidor, uno de ellos es tener una contraseña de más de 6 carácteres.', type = 'ERROR', number = '8' } } } local function getError(name) return tooltip.error[name] end local function getTooltip(name) return tooltip.error[name].syntax...' '...tooltip.error[name].message...' '...' ['...tooltip.error[name].type...' #' ...tooltip.error[name].number...']' end and I tried to call the getTooltip Function from another File called - RegisterBackend.lua - It's a Server Lua File local test = exports['[init]']:getTooltip('notFoundAccount').message local test2 = exports['[init]']:getError('notFoundAccount').type Both Files are on the same Resource call [Init] And this is my Meta.xml Code <!--ERROR--> <file src="src/error/InitTooltipMessage.lua" type='client'></file> <!--Exported Functions--> <export function='getError' type='client'></export> <export function='getTooltip' type='client'></export> The error that I get when I run the Code is this What I need to do? to call correctly Plss I'm Stuck in this
  10. Hi Guys, I have a question... I have this resource I want to use in my server. It is a car dealership, but what happens is, every car that a player buys disappear when the server or the resource is restarted. I was hoping that someone could help me with this. or at least give me a clue on how to prevent this to happen again. Thanks
  11. So I have a question, I have a model to import but I would like this object was only visible in a specific dimension. How can I do this?
  12. I have a problem with this script will someone help me? function Resource() local res = getResourceFromName("ResourceTest", true) startResource(res) end addCommandHandler("res", Resource)
  13. Hola hago este mensaje para ver si alguien me puede ayudar pasandome o vendiendome un resource de creacion de bases para un servidor de DayZ de mta desde ya muchas gracias
  14. Hola abro este foro para ver si alguien me puede ayudar mandandome un pack de jobs o algunos en singular para un servidor RPG de mta ya que en internet no hay muchos que funcionen correctamente no importa el idioma en el que esten ya que yo se traducirlos
  15. Olá a todos, iniciei um projeto recentemente de uma screen loading, a minha ideia é que nesta screen irá conter uma barra de progresso com uma porcentagem dos resources baixados, porém eu não sou muito familiarizado com essa parte de download do MTA. para eu estar fazendo esta conta eu preciso de dois valores, o valor total que eu já consegui obter, e o valor atual. É ai que me encontro sem saída, qual seria o melhor método de eu descobrir quantos resources faltam para serem baixados? Acredito eu que tem como, caso contrário não existiria a progress bar do MTA correto? De alguma forma o MTA deve saber quantos faltam para ser iniciado. Observações: 1 - Eu já pensei em algumas ideias tipo um exports em cada resource que será ligado. Porém o meu intuito é uma automatização sem q eu precise mexer em cada resource do meu servidor. 2 - Teria como eu "simular" essa progress bar com isTransferBoxActive, mas não estou atrás disto. 3 - Sim eu sei que é possível um downloader próprio com a função downloadFile. Porém para o momento atual que eu me encontro, estou realmente sem tempo para estar fazendo um downloader. Já revirei a wiki, mas não consegui nada que me trouxeste o resultado q eu procuro, alguém teria como me ajudar nessa? Desde já agradeço a todos.
  16. Hace tiempo atrás existía como un sistema de SLOTHBOT si mal no recurdo o script de tipo SILENT HILL, y lo ando buscando como loco. ¿De casualidad alguién lo tiene o lo ha visto publicado?, recuerdo que el sistema de SILENT HILL estaba en la página resources mta, pero ya no lo encuentro. Lo único que veo es un sistema de SILENT HILL pero no trae los sonidos de sos monstruos y pieles (skines) que traita este viejo sistema. Si alguién me podría ayudar por favor se lo super agradecería!... Si no me comprendieron por favor pregunten sin problemas.
  17. i need a Moving Steering wheel script for imvehft vehicles. if someone have the script please give me link
  18. Does any one Have the script for a Turning Steering wheel in The Car ? i have Imvehft Vehicles that i'm sure it will work in. Can someone give me the Mod / Script ?
  19. Eu queria saber se existe algum mod que define as handings dos veiculos automaticas exemplo eu tenho o painel b do handing o jogador aperta f1 abre o painel freeroam ele pega um carro e o carro que ele pegar a handing do proprio servidor ja carrega automatica naquele carro no caso sem ter q usar o painel b obs: queria colocar uma propria pra cada tipo de carro por ID
  20. First, I began with this: When entering either marker, you are taken to the specified location. It works perfectly. Both markers take me to the desired location in San Andreas' map. I moved them around and changed the shape of the marker just to be sure. There were no problems. Then, I found this: This is supposed to teleport you into the specified interior (nº0), and the coordinates next to the interior (x, y, z) The chatbox outputs the expected message. However, there is no teleporting to the specified place. The function 'setElementInterior' looks good, judging by what the wiki says. What am I missing? Something tells me it's a very obvious error I'm failing to see.
  21. --meu sistema de level local recompensa = 100 -- quantidade= function experience () for i, p in ipairs( getElementsByType( "player" ) ) do local exp = getElementData(p, "Exp") local exps = tonumber(getElementData(p, "Exp")) local lvls = tonumber(getElementData(p, "Level")) if lvls and exps then local needexp = lvls * 1500 if not exp then setElementData(p, "Level", 0) setElementData(p, "Exp", 0) else if exps >= needexp then setElementData(p, "Level", lvls + 1) setElementData(p, "Exp", 0) givePlayerMoney(p, recompensa) outputChatBox ("#106FE7( #ffffffLEVEL#106FE7 ) #FFFFFF Parabéns você passou para o level #106FE7" .. lvls + 1 .. "", p, 255, 255, 255, true) end end end end end setTimer(experience, 100, 0) function killandexp (ammo, killer, killerweapon, bodypart) if (killer) and (killer ~= source) then local exp = getElementData(killer, "Exp") local exps = tonumber(getElementData(killer, "Exp")) if not exp then setElementData(killer, "Exp", 0) else setElementData(killer, "Exp", exps + 2) triggerClientEvent(killer,"xplevel",killer) end end end addEventHandler ( "onPlayerWasted", getRootElement(), killandexp) function ChuvaXP (player) if (hasObjectPermissionTo(player, "command.kick", false)) then for id, players in ipairs(getElementsByType("player")) do local exp = getElementData(players, "Exp") local exps = tonumber(getElementData(players, "Exp")) if not exp then setElementData(players, "Exp", 0) else setElementData(players, "Exp", exps + 100) triggerClientEvent(players,"xplevel",players) end end end end addCommandHandler("chuvaxp", ChuvaXP) function ChuvaXPO (player) if (hasObjectPermissionTo(player, "general.tab_bans", false)) then outputChatBox ("#106FE7(#ffffffCHUVA XP#106FE7) ➺ #ffffff".. getPlayerName(player) .." #FFFFFFDeu #106FE7(#FFFFFFXP: #106FE7100 #106FE7) #FFFFFFPara Todos", root, 255, 255, 255, true) end end addCommandHandler("chuvaxp", ChuvaXPO) addEventHandler("onPlayerLogin", root, function(p, c) local lvl = getAccountData(c, "lvl") local exp = getAccountData(c, "exp") if lvl and exp then setElementData(source, "Level", lvl) setElementData(source, "Exp", exp) else setElementData(source, "Level", 0) setElementData(source, "Exp", 0) setAccountData(c, "exp", 0) setAccountData(c, "lvl", 0) end end) addEventHandler("onPlayerQuit", root, function() local acc = getPlayerAccount(source) if acc and not isGuestAccount(acc) then local lvl = getElementData(source, "Level") or 0 local exp = getElementData(source, "Exp") if lvl and exp then setAccountData(acc, "exp", exp) setAccountData(acc, "lvl", lvl) else setAccountData(acc, "exp", 0) setAccountData(acc, "lvl", 0) end end end) addCommandHandler("setlevel", function(player, cmd, target, amount) local accName = getAccountName(getPlayerAccount(player)) if not isObjectInACLGroup ("user."..accName, aclGetGroup("CDD|superMOD")) then outputChatBox("Você não tem acesso a esta equipe!", player, 255, 0, 0) return end if target then if tonumber(amount) then local targetplayer = getPlayerFromName(target) if targetplayer then setElementData(targetplayer, "Level", amount) setElementData(targetplayer, "Exp", 0) outputChatBox("Você instalou com sucesso "..amount.." nível do jogador "..getPlayerName(targetplayer).."!", player, 0, 255, 0, true) else outputChatBox("Erro: jogador não encontrado", player, 255, 0, 0) end else outputChatBox("Use: / setlevel [Nickname] [Level]", player, 255, 0, 0) end else outputChatBox("Use: / setlevel [Nickname] [Level]", player, 255, 0, 0) end end) --trabalho que quero que quando o player finalize receba exp MarkerSafeEntregadorDeJornal = createMarker( 1280.835, -1541.986, 13.522, "cylinder", 35, 0, 255, 0, 0) EntregadorDeJornalPickup = createPickup ( 1280.835, -1541.986, 13.522, 3, 1210) MarkerEntregadorDeJornal = createMarker ( 1280.835, -1541.986, 13.522, "cylinder", 1.2, 255, 255, 255, 0 ) attachElements ( MarkerEntregadorDeJornal, EntregadorDeJornalPickup, 0, 0, -1 ) BlipEntregadorDeJornal = createBlipAttachedTo ( MarkerEntregadorDeJornal, 42 ) setBlipVisibleDistance ( BlipEntregadorDeJornal, 150 ) function CancelarSumirPickup ( player ) cancelEvent() end addEventHandler ( "onPickupHit", EntregadorDeJornalPickup, CancelarSumirPickup ) LetraParaMarkers = "k" cmd1 = "hq" cmd2 = "profissao" local HQEntregadorDeJornalBlip = createBlip ( 1280.835, -1541.986, 13.522 ) setElementVisibleTo ( HQEntregadorDeJornalBlip, root, false ) -------------------------------------------------------------------- function VerificarBlipEmprego(player) if player then acc = getPlayerAccount ( player ) if isGuestAccount ( acc ) then return end setElementVisibleTo ( HQEntregadorDeJornalBlip, player, false ) end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then if getElementData ( pl, "Emprego" ) == "Entregador de Jornal" then return end VerificarBlipEmprego(pl) end end end, 3000,0) -------------------------------------------------------------------- function ComandoHQ ( source ) if getElementData ( source, "Emprego" ) == "Entregador de Jornal" then if isElementVisibleTo ( HQEntregadorDeJornalBlip, source ) then setElementVisibleTo ( HQEntregadorDeJornalBlip, source, false ) exports.Scripts_Dxmessages:outputDx(source, "Seu Local de Trabalho foi Desmarcado do Mapa!", "info") else setElementVisibleTo ( HQEntregadorDeJornalBlip, source, true ) exports.Scripts_Dxmessages:outputDx(source, "Seu Local de Trabalho foi Marcado no Mapa!", "info") end end end addCommandHandler ( cmd1, ComandoHQ ) -------------------------------------------------------------------- function AceitarEmprego02 (source) exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", AceitarEmprego02 ) if getElementData ( source, "AirNew>Encaminhamento" ) == "Entregador de Jornal" then setElementData ( source, "AirNew>Encaminhamento", false ) setElementData ( source, "Emprego", "Entregador de Jornal" ) exports.Scripts_Dxmessages:outputDx(source, "Você Agora Trabalha de Entregador de Jornal, Para Mais Informações Digite ( /Profissao )", "success") else exports.Scripts_Dxmessages:outputDx(source, "Você Precisa Estar Encaminhado da Agencia de Empregos para Trabalhar neste Local!", "error") end end function RecusarEmprego02 (source) exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) if isElementVisibleTo ( HQEntregadorDeJornalBlip, source ) then setElementVisibleTo ( HQEntregadorDeJornalBlip, source, false ) end removeElementData ( source, "Emprego", "Entregador de Jornal" ) exports.Scripts_Dxmessages:outputDx(source, "Você se Demitiu do Emprego de Entregador de Jornal com Sucesso!", "warning") end -------------------------------------------------------------------- function ComandosProf ( ThePlayer ) if getElementData ( ThePlayer, "Emprego" ) == "Entregador de Jornal" then playSoundFrontEnd ( ThePlayer, 43 ) outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Profissão #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09AComandos da Profissão de Entregador de Jornal", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #55D444/HQ #ffffff- #9ABDE0Para Marcar / Desmarcar o seu Local de Trabalho", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #55D444/Rotas #ffffff- #9ABDE0Abre a Lista de Rotas Disponiveis Para Trabalhar", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #FFD700Entre na Bike e Digite /Rotas Selecione uma Rota e Siga os Checkpoints!", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Profissão #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) end end addCommandHandler(cmd2, ComandosProf ) -------------------------------------------------------------------- function emarker(marker,md) if (md) then if isPedInVehicle ( source ) then return end if marker == MarkerEntregadorDeJornal then if getElementData ( source, "Emprego" ) == "Entregador de Jornal" then exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para se Demitir do Emprego de Entregador de Jornal") bindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) else exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para Aceitar o Emprego de Entregador de Jornal") bindKey ( source, LetraParaMarkers, "down", AceitarEmprego02 ) end end end end addEventHandler("onPlayerMarkerHit",getRootElement(),emarker) function lmarker(marker,md) if (md) then if marker == MarkerEntregadorDeJornal then exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", AceitarEmprego02 ) unbindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) end end end addEventHandler("onPlayerMarkerLeave",getRootElement(),lmarker) function CriarVeiculosComData () VeiculosComDataEntregadorDeJornal = { createVehicle(510, 1271.167, -1527.32, 13.564, 0, 0, 270 ), createVehicle(510, 1271.146, -1529.044, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -2, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -4, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -6, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -8, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -10, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -12, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -14, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -16, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -18, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -20, 13.564, 0, 0, 270 ), } for i, veh in ipairs(VeiculosComDataEntregadorDeJornal) do setElementData ( veh, "Emprego", "Entregador de Jornal" ) setVehicleDamageProof(veh,true) setVehicleColor( veh, 0, 0, 0 ) setVehiclePlateText ( veh, "RPGAMING" ) addEventHandler("onVehicleStartEnter", veh, VerificarEmprego ) --addEventHandler("onVehicleExit", veh, SairDoVeiculosComData ) local tx, ty, tz = getElementPosition(veh) local rx, ry, rz = getElementRotation(veh) setVehicleRespawnPosition(veh, tx, ty, tz, rx, ry, rz) end end addEventHandler("onResourceStart", resourceRoot, CriarVeiculosComData ) function VerificarEmprego (thePlayer, seat) local Jogador = getElementData(thePlayer, "Emprego" ) if seat == 0 then if Jogador == "Entregador de Jornal" then else cancelEvent() exports.Scripts_Dxmessages:outputDx(thePlayer, "Esse Veiculo é Exclusivo dos Entregadores de Jornal!", "error") end end end --[[function SairDoVeiculosComData () local veh = source setTimer(function() if getVehicleOccupant(veh) == false then respawnVehicle(veh) end end, 30000, 1) end addEventHandler ( "onPlayerQuit", getRootElement(), SairDoVeiculosComData ) --]] -------------------------------------------------------------------- local rElement = getRootElement() function respawnVehicles(player, seconds) for i, veh in ipairs(VeiculosComDataEntregadorDeJornal) do if isEmpty( veh ) then respawnVehicle ( veh ) end end end setTimer(respawnVehicles, 60000,0) function isEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if type( passengers ) == 'number' then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end -------------------------------------------------------------------- atualrotnumberJORNAL = {} ppcikJORNAL = {} blips = {} rotasJORNAL = { ["Entregas de Jornais - Los Santos (1) - 20 Entregas - $670"] = { {1282.185, -1546.146, 13.547}, {1292.531, -1536.74, 13.491}, --{1117.78308, -1030.55933, 31.88287}, --{11270.73914, -1027.27011, 32.35918}, --{1466.25684, -1172.65686, 23.88302}, --{1673.56787, -1169.50952, 23.92861}, --{1791.41406, -1164.77539, 23.82813}, --{2095.31763, -1292.43701, 23.97214}, --{2150.26270, -1291.66003, 23.97753}, --{2352.627019, -1513.26306, 24.00000}, --{2561.87158, -1467.34753, 24.01236}, --{2756.12573, -1180.33130, 69.39844}, --{2863.57446, -1440.18982, 10.95315}, --{2507.24414, -1725.65881, 13.54688}, --{23270.33276, -1721.86511, 13.58705}, --{2228.38867, -1722.77356, 13.55438}, --{2175, -1742, 13.55438}, --{2072.61230, -1793.96008, 13.54688}, --{1871.15784, -1923.91858, 13.54688}, --{1352.39136, -1758.33508, 13.50781}, }, ["Entregas de Jornais - Los Santos (2) - 20 Entregas - $750"] = { {823.93018, -1413.86011, 13.46503}, {2709.32098, -1504.01135, 13.54223}, {797.72333, -1580.373270, 13.54688}, {645.75140, -1694.06555, 14.89330}, {422.36475, -1758.63403, 8.18526}, {305.55188, -1771.70020, 4.54249}, {168.62589, -1770.10681, 4.43438}, {138.38370, -1460.07129, 25.62103}, {169.82892, -1348.34363, 69.36220}, {280.87973, -1320.37817, 53.81308}, {543.01135, -1202.30334, 44.50127}, {562.19452, -1060.57458, 74.59800}, {782.98035, -808.70764, 65.19865}, {2708.08984, -684.05566, 116.23006}, {1091.30396, -627.89929, 111.38203}, {1280.77197, -614.80652, 102.93521}, {1437.30725, -935.30865, 36.26117}, {1335.64368, -1066.11133, 27.87136}, {1144.98792, -1131.54431, 23.82813}, {1022.52026, -1122.13037, 23.87152}, }, ["Entregas de Jornais - Los Santos (3) - 20 Entregas - $1500"] = { {1324.671, -1433.923, 14.969}, {1184.128, -1316.365, 13.573}, {1096.775, -1288.524, 13.554}, {994.57, -1298.388, 13.39}, {814.181, -1342.959, 13.533}, {792.273, -1626.558, 13.391}, {1077.013, -1859.017, 13.547}, {1408.296, -1881.205, 13.547}, {1830.151, -1841.683, 13.578}, {1924.561, -1789.748, 13.383}, {2096.031, -1806.206, 13.552}, {2289.097, -1724.15, 13.547}, {2268.405, -1667.375, 15.377}, {2011.597, -1597.769, 13.572}, {1911.033, -1604.44, 13.547}, {1864.723, -1604.331, 13.539}, {1671.314, -1583.68, 13.547}, {1581.473, -1448.472, 13.539}, {1519.231, -1449.773, 13.539}, {1363.771, -1431.401, 13.539}, }, } pay = { ["Entregas de Jornais - Los Santos (1) - 20 Entregas - $670"] = 670, ["Entregas de Jornais - Los Santos (2) - 20 Entregas - $750"] = 750, ["Entregas de Jornais - Los Santos (3) - 20 Entregas - $1500"] = 1500, } function ifPlayerEnterOnMarker(markerHit,matchingDimension) if isPedInVehicle(source) then if markerHit == ppcikJORNAL[source] then if (matchingDimension) then if isElement(ppcikJORNAL[source]) then local rname = getElementData(source,"rtnameJornal") or nil if rname == nil then return end destroyElement(ppcikJORNAL[source]) triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,false) local vh = getPedOccupiedVehicle(source) toggleAllControls ( source, false ) setControlState ( source, "handbrake", true ) if atualrotnumberJORNAL[source] <= #rotasJORNAL[rname] then exports.Scripts_Dxmessages:outputDx(source, "Entregando Jornais... Aguarde 2 Segundos!", "info") setTimer(gerarrota,2500,1,source) setTimer(function(source) exports.Scripts_Dxmessages:outputDx(source, "Jornais Entregues, Siga Para o Proximo Checkpoint!", "success") end,2500,1,source) elseif atualrotnumberJORNAL[source] == #rotasJORNAL[rname]+1 then setElementData(source,"rtnameJornal",rname) atualrotnumberJORNAL[source] = 1 local rec = pay[rname] givePlayerMoney(source,tonumber(rec)) local vh = getPedOccupiedVehicle(source) setTimer(function(source) exports.Scripts_Dxmessages:outputDx(source, "Você Recebeu um Valor de $"..rec.." Por Finalizar as Entregas de Jornais!", "success") end,2500,1,source) setTimer(function(source) toggleAllControls ( source, true ) end, 2500,1, source ) setTimer(function(source) setControlState ( source, "handbrake", false ) end, 2500,1, source ) setElementData(source,"rtnameJornal",nil) local exp = getElementData(player, "Exp") local exps = tonumber(getElementData(player, "Exp")) --setElementData(player, "Exp", 0) setElementData(player, "Exp", exps + 100) triggerClientEvent(player,"xplevel",player) end end end end end end addEventHandler("onPlayerMarkerHit",getRootElement(),ifPlayerEnterOnMarker) -------------------------------------------------------------------- function VerificarCairBike(player) if player then acc = getPlayerAccount ( player ) if isGuestAccount ( acc ) then return end local rname = getElementData(player,"rtnameJornal") or nil if rname == nil then triggerClientEvent ( "Desligar:AntiQueda", player ) else triggerClientEvent ( "Ligar:AntiQueda", player ) end end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then if getElementData ( pl, "Emprego" ) == "Entregador de Jornal" then VerificarCairBike(pl) end end end end, 3000,0) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- function pickjobJornal(source) if not isElement(source) then return end local im = isPedInVehicle(source) if im == false then return end local job = getElementData(source,"Emprego") or false if job == "Entregador de Jornal" then local vh = getPedOccupiedVehicle(source) if isElement(vh) then local x,y = getElementPosition(vh) local x1,y1 = getElementPosition(source) local dist = getDistanceBetweenPoints2D(x,y,x1,y1) local isMarkerSafe = isElementWithinMarker(vh,MarkerSafeEntregadorDeJornal) local id = getElementModel(vh) local seat = getPedOccupiedVehicleSeat(source) if dist > 0 then return end if id == 510 then if seat == 0 then if isMarkerSafe == false then return end triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>AbrirPainel<Client",source,rotasJORNAL) end end end end end addCommandHandler("rotas",pickjobJornal) function receivert(source,rotaname) if isElement(ppcikJORNAL[source]) then destroyElement(ppcikJORNAL[source]) end triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,false) setElementData(source,"rtnameJornal",rotaname) atualrotnumberJORNAL[source] = 1 gerarrota(source) end addEvent("AirNew>request>Startrota>Server>EntregadorDeJornal", true) addEventHandler("AirNew>request>Startrota>Server>EntregadorDeJornal",getRootElement(), receivert) function gerarrota(source) local rname = getElementData(source,"rtnameJornal") or nil if rname == nil then return end if not isElement(ppcikJORNAL[source]) and isPedInVehicle(source) then local vh = getPedOccupiedVehicle(source) toggleAllControls ( source, true ) setControlState ( source, "handbrake", false ) local id = tonumber(atualrotnumberJORNAL[source]) local x,y,z = rotasJORNAL[rname][id][1],rotasJORNAL[rname][id][2],rotasJORNAL[rname][id][3] ppcikJORNAL[source] = createMarker (x, y,z, "checkpoint", 4, 255, 0, 0, 50,source) triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,true,x,y,z) atualrotnumberJORNAL[source] = id+1 end end function sair ( quitType ) if isElement(ppcikJORNAL[source]) then destroyElement(ppcikJORNAL[source]) end end addEventHandler ( "onPlayerQuit", getRootElement(), sair ) function SairDaBike ( thePlayer, seat, jacked ) local rname = getElementData(thePlayer,"rtnameJornal") or nil if rname == nil then return end canceljobtimer (thePlayer) exports.Scripts_Dxmessages:outputDx(thePlayer, "Você Saiu da Bike, Entregas Canceladas!", "warning") end addEventHandler ( "onVehicleExit", getRootElement(), SairDaBike ) function canceljobtimer(source) if isElement(ppcikJORNAL[source]) then destroyElement(ppcikJORNAL[source]) end triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,false) atualrotnumberJORNAL[source] = 1 setElementData(source,"rtnameJornal",nil) end function canceljobdeath() local job = getElementData(source,"Emprego") or false if job ~= "Entregador de Jornal" then return end local rname = getElementData(source,"rtnameJornal") or nil if rname == nil then return end canceljobtimer(source) exports.Scripts_Dxmessages:outputDx(source, "Você Morreu e Suas Entregas Foram Canceladas!", "warning") end addEventHandler( "onPlayerWasted", getRootElement( ),canceljobdeath)
  22. Hello ! i'm back again with my first gamemode based on [PROTOTYPE] and [PROTOTYPE2] games. The context is simple. A secret government agency ( called Black Watch ) has to fight against a guy with superhuman skills in a post-apocalyptic place called 'The Red Zone'. The Black Watch Team has three ranks: Trooper - Commander - Pilot. Each rank has its own skills and respective vehicles as the black watch team, the superhuman (Prototype) has a wide variety of skills, attacks and transformations Also during the course of the gamemode, certain events occur such as: Super Soldiers Airstrikes & Others. Note: this gm needs at least 4 players to run ( or you can also change it cause is an Open Source script ) Thx for your time . Download the resource here
  23. This is the dumbest question I've ever asked on this forum, but I have problem even not only with this. So, how can I add scripts from different folders in my meta.xml? And in these scripts, how can I load xml files from different folders, too? Any idea? If yes, please, show me example I know, that I would use xml = xmlLoadFile("filename.xml") But how to load xml in different folders? Same <script src="script.Lua" type="server"/> But how to tell MTA to load script from different folder?
×
×
  • Create New...