Search the Community

Showing results for tags 'resources'.



More search options

  • 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
  • Archive
  • Private Bugtracker

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


Gang


Location


Occupation


Interests

Found 34 results

  1. 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
  2. La versión más completa del panel de admin. en español a la fecha, actualizada y traducida en un 99.5% con la conciencia y los ajustes más altos al idioma, desde la ventana de "Jugador" hasta "Opciones" pasando por "Resources" y el administrador del ACL. Versión desarrollada y traducida para un mejor entendimiento de sus funciones al momento de ejecución. Esta versión incluye: Texto de las ventanas traducidos Botones traducidos con el mayor grado de minimalismo outputChatBox's de todas las funciones en español Administrador ACL traducido en su totalidad Admin Wizard traducido Apartado de reportes (/report) traducido * (El apartado anterior no es más que puntos a resaltar, el script completo casi en su totalidad está traducido). Esta versión ayuda a todo aquel que no domine el idioma inglés y quiera interactuar desde la perspectiva de un administrador con su servidor, así como también a la comunidad hispanohablante que por simple gusto o cuestiones de comodidad quiera incorporar una versión traducida al español del panel. Importante: * Algunas palabras como "Stats", "Resources", "Client" y "Server" han sido dejadas como están en su idioma original, ya que queda claro lo que estas quieren transmitir, a excepción de "Kick" que en el ámbito de la moderación en juegos multijugador en español puede ser expresada como "Kickear" siendo una adaptación del término en inglés. Esto pasa también con la palabra "Customize" que puede ser transformada a "Customizar". * Todos los comandos han sido dejados por defecto. * Esta versión incluye algunos logs traducidos mas no incluye la información de confirmación de las acciones del panel en la consola principal. * En caso de encontrar un error gramatical, por favor, deja un comentario. * Esta es la primera versión del panel de admin en español traducido al español casi en su totalidad, por lo que no es perfecta, pero sí la más precisa y acorde. * Existe la disposición de desarrollar nuevas versiones a medida que se vayan reportando nuevos errores. DESCARGA: https://community.multitheftauto.com/index.php?p=resources&s=details&id=18185 Todos los créditos van a lil_Toady, creador de los archivos originales que hacen de la versión en inglés la versión oficial del panel para MTA: San Andreas. All credits goes to lil_Toady, creator of the original files that makes english version, the official one for MTA: San Andreas.
  3. I've been working on my own server for a few weeks now. After adding mods for vehicles, weapons and skins rocketed it to aproximatelly 500mb. I've found servers that are filled with skins, great mappings, scripts and more, and they weight around 200mbs. They have more skins, a lot more scripts and complex functions, new textures for buildings; basically, a complete make-over. I've only heard about the word "compiling". I'm confident there are other ways to reduce the weight for the client. Is there such thing as "server-side mods"? These are the heaviest. Maybe moving them server-side reduces the downloaded content significantly.
  4. I recently dove into this simple thing called "scripting and building a server". Naturally —added to my already curious personality—, I always come up with a doubt, a question, or any sort of uncertainty. After a week of messing around with it, I noticed that 5 of the 10 last posts made in the Script section were from me. I was having so much fun —truthfully— that I just kept on finding new things to ask. I'm pretty sure they are common questions. I'm not asking to have a script from scratch, or to be taught absolutely everything. It is most commonly about errors and to help myself understand the colloquial language of the scripts. However, I can't help but think that maybe it's not the best approach. I always think to myself "try to find it on your own", but I frenquently find myself getting even more confused the more I tour into each command and function. Is there a certain tacit limit as to how many questions can be asked? Is there any way to get the necessary help without flooding the sections?
  5. [SOLVED] This will certainly be a beginner's subject. The folder [gameplay], located in "Resources", is filled with .rar files. I want to edit 'help.xml', which is inside "freeroam.rar". I tried extracting everything into a new folder called "freeroam", but my server is not detecting said folder. I'm sure I'm ignoring a command somewhere that's failing to locate the folder (might be written to only locate "freeroam.rar"). What can I do to reach the file, modify it, and keep the freeroam files working?
  6. 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?
  7. Im working on a roleplay server and I always test the resources in local host server, however I have just noticed today that the freshly added resources are not even running on the server, only the older ones. Ive tried to start them with command but the server just cant find 'em while they are clearly there.. Currently there are maybe 20 resources running on the server.. The only thing what came to my mind was maybe there is a limitation of usable resorces for local servers..
  8. Está iniciando seu servidor ou começando scripting no MTA? Aqui será listado tudo o que você precisa para aprender desde configurar seu servidor, ACL, colocar resources, até aprender Lua no MTA e criar scripts para modificar o jogo por meio da programação. Se você é totalmente leigo no assunto você também verá links que irá te introduzir no nível básico da programação, basta ter o mínimo de esforço e acompanhar os tutoriais aqui mostrados. Se você já têm uma noção de programação, encontrará tutoriais que irão te ajudar a se aprofundar na programação Lua e ter uma boa experiência de Scripting no MTA. Informações relacionadas ao MTA Se você busca configurar corretamente o seu Servidor e entender como as coisas funcionam, estes links serão de grande ajuda: Links traduzidos para português Manual do Servidor ACL - Lista de Controle de Acesso Resources (ou Recursos) - O que são? O arquivo meta.xml Quer programar scripts? Acompanhe este links: Nota: Se você é um iniciante na programação veja também os tutoriais para iniciantes em: Iniciando na programação Introdução a Scripting no MTA (link útil) Programar GUI no MTA Depurando seu código Programação e a linguagem Lua Iniciando na programação: Vídeo - Introdução a Algoritmos Introdução aos Algoritmos Vídeo - Lógica de programação Programação Lua: Conheça a linguagem Lua Manual de Referência de Lua 5.1 Playlist - Programando em Lua (vídeo) Playlist - Curso de programação em Lua (vídeo) Introdução à linguagem de programação Lua Teaching-lp seminario-Lua PDF Outros links (em inglês): Lua.org Lua wiki www.tutorialspoint.com/Lua Lista de tutoriais e manuais Lua Sub-fórum - Tutorials E também: Tutoriais: sub-fórum da seção Portuguesa Editores para programar e Ferramentas Com plugins/extensões do MTA disponíveis: - Notepad++ | Plugins do MTA - Sublime Text | Plugins (Atualizado: link) - Visual Studio Code | Extensões: MTA:SA Lua Debugger: MTA:SA Debugger and Test Framework - Atom Editor | Plugins Sem plugins do MTA: - ZeroBrane Studio - IntelliJ IDEA - Eclipse - Decoda Lua IDE Também: Lua for windows | GitHub
  9. Opá. Manos conheci esse site agora e já jogo MTA a um tempo mais nunca parei para criar um servidor bom estou criando o meu agora e quando os players vão digitar no painel login exemplo se logarem ou registrarem acabam soltando sua BIND eu queria saber se tem como bloquear soltar as BINDS apenas no painel Login. Obrigado pela Compreensão ❤️ Qualquer coisa já ajuda
  10. sevenlwo

    freeroam help

    Hello, i'm trying to create a checkbox to enable and disable the ghost-mode on my F1(freeroam) panel on MTA server, but actually i dont know how to do it. someone can help me?
  11. Hello everyone, guys please help me, I need a script that will protect custom machines, maps, write in a personal, or here in the topic, thank you all in advance
  12. First I would like to say if there is any possibility or some way I am depriving the resources of my server, however I say if there is any way to get access to the resource folders for players. Features these I say as .DFF .TXD both of cars and skin, as I am with some exclusive ones that I paid dearly and would not want them to simply be stolen. My question is: Is there any way I can block resource folders or just those modifications so nobody can catch them?
  13. Fala galera, estou com um problema na nova versão do MTA, seguinte quando eu edito algo no freeroam e salvo, depois vou no Painel Admin e do um restart na resource "Freeroam", e não muda nada continua como padrão, só muda quando eu desligo o servidor e volto a liga-lo ai sim eu vejo oque eu mudei!.Será que é algum bug ou uma opção no servidor que esteja causando esse bug?, em versões antigas do MTA, o RESTART na, resource funciona normalmente, sem eu precisar desliga e ligar o servidor novamente.Estou a 2 dias, procurando a solução e nada ate agora, se alguma alma viva que esteja com o mesmo problema e tenha conseguido corrigir isso, pls mande a solução, grato!.
  14. Server closed, mode resources https://drive.google.com/file/d/1a1LhPHrO0mmq2bSfqlUhCwS2BOwyQeCt/view
  15. Server closed, mode resources https://drive.google.com/file/d/1a1LhPHrO0mmq2bSfqlUhCwS2BOwyQeCt/view
  16. Tengo errores en esta funciones dentro de mi sistema de nivel me ayudarían a solucionarlo por favor?. ---EN EL SERVER TENGO ESTE ERROR AQUI: getPlayerEXP = function(l_13_0) if not tonumber(getElementData(l_13_0, "exp")) then -- return not l_13_0 or type(l_13_0) ~= "userdata" or getElementType(l_13_0) ~= "player" or 0 -- do return end -- AQUI end outputDebugString("Bad argument @ 'getPlayerEXP' [Expected player element at argument 1, got " .. tostring(l_13_0) .. "]", 2) return false end -- EN EL CLIENTE TENGO ESTE ERROR AQUI EN LAS MIMAS LINEAS: getPlayerEXP = function(l_7_0) if not tonumber(getElementData(l_7_0, "exp")) then return not l_7_0 or type(l_7_0) ~= "userdata" or getElementType(l_7_0) ~= "player" or 0 do return end -- AQUI end outputDebugString("Bad argument @ 'getPlayerEXP' [Expected player element at argument 1, got " .. tostring(l_7_0) .. "]", 2) return false end -- LOS ERRORES SON DE: `end`expected (to close `if` at line 197) near do
  17. where i can change the text from that circled photo??? where is placed in resources ?? in announcement isn't https://imgur.com/a/galEmaI PLEASE HELP MEEEE
  18. I already rebooted the mta, gave stop and restart in the panel of the host and did not return the resources https://uploaddeimagens.com.br/imagens/mta-screen_2018-05-08_22-42-39-png
  19. Hi... i'm making my own rpg / rp server with my friend and i have a little issue As you can see in the title; when i start a new resource when my "rpg" gamemode is enabled the maps are loaded multiple times, so i have to restart my "rpg" gamemode to have just a single map loaded It means that, for example, i hit a marker and the GUI is displayed 2 times (Because there are 2 markers in the same place) The way to load maps i do is in 'meta' like this: ----------------------------------------------------------------------------------------------------------------- <meta> <!-- MAPPING --> <script src="mapping/mapEditorScriptingExtension_s.lua" type="server"></script> <script src="mapping/mapEditorScriptingExtension_c.lua" type="client" validate="false"></script> <map src="mapping/BASE_Map.map" dimension="0"></map> <!-- MARKERS --> <map src="markers/freecars.map" dimension="0" /> <script src="markers/freecars_s.lua" type="server" /> <script src="markers/freecars_c.lua" type="client" /> </meta> ------------------------------------------------------------------------------------------------------------ I saw another post that probably talks about the same problem, but, at least i noticed is map loading's fault: https://forum.gtanet.work/index.php?threads/entershape-gets-triggered-twice.2044/ If you know how to solve this kind of "over load" it's perfect for me But if you don't really know i would like to know a different ways (As much ways as you know) to load those maps when i start my rpg mode Thanks <3
  20. Hello! I would like to buy some resources for my dayz server. (Anyway, if you have/know any free res. you can share it if u want wink wink) PAYPAL Only! I can pay enough for nice resource. ↓ ↓ ↓ ↓ ↓ ↓ Thank you,have a nice day/night/whatever you want #SryForMyBadEnglish
  21. Hola , queria una ayuda con el respawn de hospitales mas cercanos , quiero que los users vayan al hospital mas cercano cuando mueren , pero no puedo , siempre me dirije el hospital LS , cerca de groove, desactive el play para ver si era eso , sin embargo me seguia pasando lo mismo , me dirigia al hospital ls , y entonces desactive el respawn que tenia puesto , y cuando moria iba al mismo hospital LS , y nose como sacar ese respawn que solo vaya al hospital ls.
  22. hi. im looking for pubg (battle ground) backup any 1 please?
  23. Me ayudan con este pequeño problema?, es un error que me tira estas lineas cuando me acerco a una tent (tienda de campaña) if getElementData(source,"vehicle") then if not getElementData(source,"deadVehicle") then showClientMenuItem("Vehicle",(getVehicleName(getElementData(source,"parent")) or "Tienda de Campaña"),getElementData(source,"parent")) -- ERROR AQUI setElementData(getLocalPlayer(),"currentCol",source) setElementData(getLocalPlayer(),"loot",true) setElementData(getLocalPlayer(),"lootname","Gear ("..(getVehicleName(getElementData(source,"parent")) or "Tienda de Campaña")..")") -- ERROR AQUI setNewbieInfo(true,"Equipo","Presiona J para acceder al inventario!",source) return end end Los errores son: Bad argument @ getvehiclename....
  24. Hello guys,i made something which replaces explosion sounds,weapon sounds,weapon models,sniper scope,rocket crosshair and disables default weapon sounds in 1 script,now the problem is whenever i shoot with my gun it makes me lag,i dont use any custom effects or stuff.Pls help. Thank You.Btw heres the code if u need local distance = 75 --distance from where you can hear the shot local explostionDistance = 150 local cSoundsEnabled = true local reloadSoundEnabled = false local explosionEnabled = true ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/knife.txd" ) engineImportTXD ( txd, 335) dff = engineLoadDFF ( "Weapons/knife.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 335) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/pistol.txd" ) engineImportTXD ( txd, 346) dff = engineLoadDFF ( "Weapons/pistol.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 346) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/silenced.txd" ) engineImportTXD ( txd, 347) dff = engineLoadDFF ( "Weapons/silenced.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 347) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/deagle.txd" ) engineImportTXD ( txd, 348) dff = engineLoadDFF ( "Weapons/deagle.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 348) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/shotgun.txd" ) engineImportTXD ( txd, 349) dff = engineLoadDFF ( "Weapons/shotgun.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 349) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/sawnoff.txd" ) engineImportTXD ( txd, 350) dff = engineLoadDFF ( "Weapons/sawnoff.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 350) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/striker.txd" ) engineImportTXD ( txd, 351) dff = engineLoadDFF ( "Weapons/striker.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 351) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/uzi.txd" ) engineImportTXD ( txd, 352) dff = engineLoadDFF ( "Weapons/uzi.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 352) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/mp5.txd" ) engineImportTXD ( txd, 353) dff = engineLoadDFF ( "Weapons/mp5.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 353) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/tec9.txd" ) engineImportTXD ( txd, 372) dff = engineLoadDFF ( "Weapons/tec9.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 372) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/ak47.txd" ) engineImportTXD ( txd, 355) dff = engineLoadDFF ( "Weapons/ak47.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 355) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/m4.txd" ) engineImportTXD ( txd, 356) dff = engineLoadDFF ( "Weapons/m4.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 356) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/rifle.txd" ) engineImportTXD ( txd, 357) dff = engineLoadDFF ( "Weapons/rifle.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 357) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/sniper.txd" ) engineImportTXD ( txd, 358) dff = engineLoadDFF ( "Weapons/sniper.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 358) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/launcher.txd" ) engineImportTXD ( txd, 359) dff = engineLoadDFF ( "Weapons/launcher.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 359) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/hlauncher.txd" ) engineImportTXD ( txd, 360) dff = engineLoadDFF ( "Weapons/hlauncher.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 360) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/minigun.txd" ) engineImportTXD ( txd, 362) dff = engineLoadDFF ( "Weapons/minigun.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 362) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/grenade.txd" ) engineImportTXD ( txd, 342) dff = engineLoadDFF ( "Weapons/grenade.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 342) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/teargas.txd" ) engineImportTXD ( txd, 343) dff = engineLoadDFF ( "Weapons/teargas.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 343) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/molotov.txd" ) engineImportTXD ( txd, 344) dff = engineLoadDFF ( "Weapons/molotov.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 344) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) function replaceWeapon() txd = engineLoadTXD ( "Weapons/satchel.txd" ) engineImportTXD ( txd, 363) dff = engineLoadDFF ( "Weapons/satchel.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 363) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/parachute.txd" ) engineImportTXD ( txd, 371) dff = engineLoadDFF ( "Weapons/parachute.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 371) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----RIP function replaceWeapon() txd = engineLoadTXD ( "Weapons/bomb.txd" ) engineImportTXD ( txd, 364) dff = engineLoadDFF ( "Weapons/bomb.dff") -- use weapon model ID, not GTA weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons) engineReplaceModel ( dff, 364) -- Likewise, model ID, for M4 as example it's 356 end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon) ----Adds New Explosion Sounds addEventHandler("onClientExplosion", getRootElement(), function(x,y,z, theType) local Sdimension = getElementDimension(source) local Sinterior = getElementInterior(source) if(explosionEnabled)then if(theType == 0)then--Grenade local explSound = playSound3D("Explosions/explosion1.mp3", x,y,z) setSoundMaxDistance(explSound, explostionDistance) setElementDimension(explSound, Sdimension) setElementInterior(explSound, Sinterior) elseif(theType == 4 or theType == 5 or theType == 6 or theType == 7)then --car, car quick, boat, heli local explSound = playSound3D("Explosions/explosion3.mp3", x,y,z) setSoundMaxDistance(explSound, explostionDistance) setElementDimension(explSound, Sdimension) setElementInterior(explSound, Sinterior) elseif(theType == 1)then else local explSound = playSound3D("Explosions/explosion2.mp3", x,y,z) setSoundMaxDistance(explSound, explostionDistance) setElementDimension(explSound, Sdimension) setElementInterior(explSound, Sinterior) end end end) ----Adds New Weapon Sounds function playSounds(weapon, ammo, ammoInClip) if(cSoundsEnabled)then local x,y,z = getElementPosition(source) if weapon == 31 then --m4 if(ammoInClip == 0 and reloadSoundEnabled)then mgReload("Sounds/m4.wav", x,y,z) else local sound = playSound3D("Sounds/m4.wav", x,y,z) setSoundMaxDistance(sound, distance) end elseif weapon == 22 then --pistol if(ammoInClip == 0 and reloadSoundEnabled)then pistolReload("Sounds/pistole.wav", x,y,z) else local sound = playSound3D("Sounds/pistole.wav", x,y,z) setSoundMaxDistance(sound, distance) end elseif weapon == 23 then --silenced if(ammoInClip == 0 and reloadSoundEnabled)then pistolReload("Sounds/silenced.wav", x,y,z) else local sound = playSound3D("Sounds/silenced.wav", x,y,z) setSoundMaxDistance(sound, distance) end elseif weapon == 24 then --deagle if(ammoInClip == 0 and reloadSoundEnabled)then pistolReload("Sounds/deagle.wav", x,y,z) else local sound = playSound3D("Sounds/deagle.wav", x,y,z) setSoundMaxDistance(sound, distance) end elseif weapon == 25 then --shotgun if(weapon == 25)then local sound = playSound3D("Sounds/shotgun.wav", x,y,z) setSoundMaxDistance(sound, distance) shotgunReload(x,y,z) else local sound = playSound3D("Sounds/shotgun.wav", x,y,z) setSoundMaxDistance(sound, distance) end elseif weapon == 28 then --uzi if(ammoInClip == 0)then mgReload("Sounds/uzi.wav", x,y,z) else local sound = playSound3D("Sounds/uzi.wav", x,y,z) setSoundMaxDistance(sound, distance) end elseif weapon == 38 then --minigun if(ammoInClip == 0)then mgReload("Sounds/minigun.wav", x,y,z) else local sound = playSound3D("Sounds/minigun.wav", x,y,z) setSoundMaxDistance(sound, distance) end elseif weapon == 29 then --mp5 if(ammoInClip == 0 and reloadSoundEnabled)then mgReload("Sounds/mp5.wav", x,y,z) else local sound = playSound3D("Sounds/mp5.wav", x,y,z) setSoundMaxDistance(sound, distance) end elseif weapon == 26 then --sawnoff if(ammoInClip == 0 and reloadSoundEnabled)then mgReload("Sounds/sawnoff.wav", x,y,z) else local sound = playSound3D("Sounds/sawnoff.wav", x,y,z) setSoundMaxDistance(sound, distance) end elseif weapon == 27 then --sawnoff if(ammoInClip == 0 and reloadSoundEnabled)then mgReload("Sounds/striker.wav", x,y,z) else local sound = playSound3D("Sounds/striker.wav", x,y,z) setSoundMaxDistance(sound, distance) end elseif weapon == 32 then --tec-9 if(ammoInClip == 0)then tec9Reload(x,y,z) else local sound = playSound3D("Sounds/tec-9.wav", x,y,z) setSoundMaxDistance(sound, distance) end elseif weapon == 30 then --ak if(ammoInClip == 0 and reloadSoundEnabled)then mgReload("Sounds/ak.wav", x,y,z) else local sound = playSound3D("Sounds/ak.wav", x,y,z) setSoundMaxDistance(sound, distance) end elseif weapon == 33 then --rifle if(ammoInClip == 0 and reloadSoundEnabled)then mgReload("Sounds/rifle.wav", x,y,z) else local sound = playSound3D("Sounds/rifle.wav", x,y,z) setSoundMaxDistance(sound, distance) end elseif weapon == 34 then --sniper local sound = playSound3D("sounds/sniper.wav", x,y,z) setSoundMaxDistance(sound, distance) end end end addEventHandler("onClientPlayerWeaponFire", getRootElement(), playSounds) ----Disables Default Explosion And Weapon Sounds setWorldSoundEnabled(5, false) function removeWorldSounds() setWorldSoundEnabled(5, 3, false) setWorldSoundEnabled(5, 4, false) setWorldSoundEnabled(5, 5, false) setWorldSoundEnabled(5, 6, false) setWorldSoundEnabled(5, 7, false) setWorldSoundEnabled(5, 8, false) setWorldSoundEnabled(5, 11, false) setWorldSoundEnabled(5, 12, false) setWorldSoundEnabled(5, 13, false) setWorldSoundEnabled(5, 14, false) setWorldSoundEnabled(5, 15, false) setWorldSoundEnabled(5, 16, false) setWorldSoundEnabled(5, 17, false) setWorldSoundEnabled(5, 18, false) setWorldSoundEnabled(5, 21, false) setWorldSoundEnabled(5, 22, false) setWorldSoundEnabled(5, 23, false) setWorldSoundEnabled(5, 24, false) setWorldSoundEnabled(5, 26, false) setWorldSoundEnabled(5, 27, false) setWorldSoundEnabled(5, 29, false) setWorldSoundEnabled(5, 32, false) setWorldSoundEnabled(5, 33, false) setWorldSoundEnabled(5, 52, false) setWorldSoundEnabled(5, 55, false) setWorldSoundEnabled(5, 63, false) setWorldSoundEnabled(5, 73, false) setWorldSoundEnabled(5, 76, false) setWorldSoundEnabled(5, 83, false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), removeWorldSounds) ----Replaces The Sniper Crosshair table = { -- you can add more stuff here :) -- Crosshair {"files/siterocket.png", "siterocket"}, {"files/SNIPERcrosshair.png", "SNIPERcrosshair"}, } addEventHandler( "onClientResourceStart", resourceRoot, function() for i = 1, #table do local shader, tec = dxCreateShader ( "texreplace.fx" ) local tex = dxCreateTexture ( ""..table[i][1].."" ) engineApplyShaderToWorldTexture ( shader, table[i][2] ) engineApplyShaderToWorldTexture ( shader, table[i][2].."lod" ) dxSetShaderValue ( shader, "gTexture", tex ) end end)
  25. Hello,i got a script which replaces the default sniper scope with a custom one by using shaders,now i got the bug that my scope doesnt draw correctly,it draws 4 scopes Here is the code table = { {"files/siterocket.png", "siterocket"}, {"files/SNIPERcrosshair.png", "SNIPERcrosshair"}, } addEventHandler( "onClientResourceStart", resourceRoot, function() for i = 1, #table do local shader, tec = dxCreateShader ( "texreplace.fx" ) local tex = dxCreateTexture ( ""..table[i][1].."" ) engineApplyShaderToWorldTexture ( shader, table[i][2] ) engineApplyShaderToWorldTexture ( shader, table[i][2].."lod" ) dxSetShaderValue ( shader, "gTexture", tex ) end end)