Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 23/01/25 in Posts

  1. Hello MTA players, I realised that I had to create this post because I got a lot of feedback, I stopped all my activities in MTA and I don't play MTA anymore because I had to make some changes in my life and change my life direction, I saw MTA in 2010 and I started playing, during this time I made very good friends, developers and players, so I would like to thank you all endlessly, 3 months ago I stopped all my activities in MTA, but I was still receiving a lot of message requests (for paid development or other issues) after that I gave everyone goodwill feedback, but I had to stop this because I was receiving a lot of messages from MTA servers and players, Anyway I have to say that I will miss all MTA players and developers, I will visit from time to time but I won't have much time for that, for some players who will try to contact me I have to say that I don't have a discord server and I don't answer private messages, I think you will be understanding and thanks for that... I have reached the end of my career in MTA. I have worked voluntarily on many servers and participated in numerous projects. I have sold all the projects I worked on, both paid and free, and I would like to announce that I will no longer be continuing my projects. I had a great time on many servers, and for that, I want to express my gratitude. Finally, I am deeply grateful to the valuable members of the MTA team, as they have helped me in many ways. Some of them include @Sarrum, @Vinyard, @Citizen, @IIYAMA, @AlexTMjugador, and myonlake (Patrik). I will miss you, guys!
    6 points
  2. Hey MTA community! I’m excited to release the latest version of the In-Game Lua Editor for MTA:SA, now with even more powerful features to enhance your development experience directly inside the game. What’s New in v3.0: Create Resources directly in the editor, with the ability to choose the folder (e.g., [ADMIN], [GAMEMODES]) for resource creation. Rename and Relocate Resources in one action, making resource management easier. Delete Resources with a confirmation dialog to avoid accidental deletions. Create and Edit HTML Files alongside Lua files, allowing you to handle both HTML and Lua resources directly in the game. Base Path System to restrict developers to specific folders, making it perfect for team organization and isolating workspaces. Function Blacklist: Automatically block dangerous functions like loadstring, setAccountPassword, removeAccount, and others for added security. In-Panel Notifications to give real-time feedback for every action performed in the editor. Security Enhancements: Full ACL Permission System to control access and operations. Activity Logs with SQLite tracking every create, edit, delete, and rename operation. Path Protection and additional security measures to prevent risky operations. Video Demo: Watch on YouTube Download: Download the Resource Here GitHub Repository: Visit the GitHub Repository How it Works: The In-Game Lua Editor allows you to browse, create, edit, and delete Lua and HTML files all in real-time directly inside MTA:SA. No need for external editors or FTP uploads, and no server restarts required. Installation Instructions: Download the resource and add it to your server. Grant "Admin" ACL permissions to the resource. Edit the permissionACL variable in editorS.lua with your admin group. Use the /editor command in-game to open the editor. Let me know your thoughts and feedback! This tool has saved me countless hours, and I hope it helps improve your development process as well. More updates and contributions coming soon! Developed by BranD - Trident Sky Company
    5 points
  3. Tired of San Andreas water that looks like someone spilled green paint and called it “good enough”? Meet this shader: water so realistic, you'll forget you're in a 22 year old game. Enjoy ripples, reflections, and surface waves that almost make you wish GTA had fishing. Boats finally look like they’re actually in the water not floating on radioactive soup. Best part? It’s fully customizable tweak the look, the color, the movement, or make the water as cursed as you want. Plus, it’s at least kind of optimized to run smoothly on hopefully most rigs, so you won’t need a NASA PC to enjoy the water. Just install it, and watch your players get distracted and drive off a pier. https://community.multitheftauto.com/index.php?p=resources&s=details&id=19007
    4 points
  4. MTA UI Editor is a project created with the goal of making interface creation for Multi Theft Auto (MTA) much easier and more accessible. The editor provides a dedicated visual application for building interface windows for MTA, supporting both DxDraw-based interfaces and MTA’s native UI system. With it, you can visually design your interfaces and export them already prepared for direct use in your MTA resources, saving a significant amount of development time. This is the first version of the project, so some configurations may still be inconsistent or incomplete. If you encounter any issues, unexpected behavior, or have suggestions for improvements, please open an issue on the project’s GitHub repository. Feedback from the community is extremely important to help improve the tool. Requirements Windows .NET Framework 4.7.2 Open Source The source code is completely open and free. Anyone is welcome to modify it, improve it, or contribute to the project in any way. Download: https://github.com/was547/MTAUIEditor/releases Official Repository: https://github.com/was547/MTAUIEditor Picture: https://ibb.co/LXYgXdqV I don't know if I have published in the right place on the forum, sorry if this is the wrong category for this kind of resource, greetings!
    3 points
  5. -> develop and sell cheats for players to abuse in servers -> develop and sell anti-cheat for servers to defend from cheating players -> win-win with both sides
    3 points
  6. This fan-made list features free, open-source, popular and reputable Multi Theft Auto resources containing Lua scripts that are not compiled or obfuscated. The goal is to provide a simple starting point for developers who want to learn from high quality code, reuse well maintained systems and contribute to projects that benefit the entire community. All resources included here are publicly available, actively used by players or servers, and shared with the intention of supporting collaboration, transparency and better development practices. Anyone is welcome to suggest additions or improvements so the list can stay accurate and useful for newcomers and experienced developers alike. The Multi Theft Auto server comes with a pack of official resources preinstalled. The full list of these default resources (and more information) is available on this MTA Wiki Article. Highlights: Map Editor Freeroam "play" gamemode Race gamemode Handling editor "hedit" Map fixes Scoreboard (TAB player list) Country of IP Address Admin Panel Performance Browser The list of the community/fan-made MTA resources is hosted on the following Google Spreadsheet for ease of maintenance and accessibility for everyone. https://docs.google.com/spreadsheets/d/1bbr-cXRvWQuyaNx0KtI2Imk4bD0UTWKxx0x8sh2FGKM/edit?usp=sharing Want to suggest a change or addition to that list? Reach out to us on the MTA Discord or here on the forums. It helps if you share your resource on #showroom (MTA Discord), community.multitheftauto.com, forums 'Resources' section, etc...
    2 points
  7. Sphene is now officially open source! https://github.com/sphene/sphene-mta Excited to work with all of you, to turn this highly experimental pile of trash into something beautiful! Remember, Sphene historically has been very experimental. Many different approaches were tried and researched and that has left a lot of experimental, legacy and unfinished code. It's not the most glamorous, but we're still proud of it! Together we'll refactor the legacy code, we'll finish the unfinished pieces and we'll work through all the large problems that are ahead of us. Repository wiki will be filled with information, and lists (current states of each mission, etc) in the coming days. REMEMBER! Sphene is NOT production ready. We will only help those who want to contribute to our development with setting up their local development versions.
    2 points
  8. Hello all. The holiday season is finally here, and we have prepared a more compact summary post for you than usual. Please read on to see, what we have been up to lately. GTA VI The upcoming year will bring us the next game from the Grand Theft Auto series - GTA VI. Planned to launch in Fall 2025 on consoles, it will likely arrive on PC as well, just some months later. The second trailer for GTA VI is also rumoured to be shown soon, with some elaborate fan theories backing these rumours. Will the game be good? Only the time will tell, but looking back, there was not a major GTA game release from Rockstar Games that was bad (for the sake of this argument, let's consider the Trilogy as a minor release ). That alone makes it worth to look forward to it, and it will be also nice to re-visit Vice City similar to how we did it with Liberty City and San Andreas. MTA Status and Updates Not much to report in regards of MTA - we have been focusing on improving various parts of our infrastructure, which is not immediately visible at first glance. Still, since there are many areas that need the attention, there is a lot of work involved. Thankfully, CiBeR, Botder, Lopsi, Dutchman and others have been looking into it. Thanks to the hard work done by our Helper - FileEX, we have also refreshed the Lua syntax highlighting system on our Wiki. For a long time it was unmaintained, causing many of the recent MTA scripting functions and events to be not correctly highlighted in the code snippet examples on the wiki. This has changed though, and it should be working much better now. We have been also tinkering with our #MTASpotlights hashtag on X / Twitter. We are still exploring this idea, but nonetheless, thank you for your submissions so far. If you would like to share some media that we could promote, you can do so on our Discord, just please make sure to read the guidelines beforehand. And, naturally, there have been additions to the mod's source code now and then, bringing in new scripting functions and bugfixes. Similarly, we have been pushing those as client updates for you, also now and then. Player Counts and Other Statistics Type Amount of players Date / Time Recent peak number of concurrent unique players 24,808 players 2024.12.22 (at 18.13 GMT) Highest recorded number of concurrent unique players 52,098 players 2020.04.02 (at 18.00 GMT) Recent number of daily unique players 95,445 players 2024.12.15 (Sunday) Highest recorded number of daily unique players 185,818 players 2018.02.03 (Saturday) Recent number of monthly unique players 478,736 players September, 2024 Highest recorded number of monthly unique players 805,903 players January, 2018 For a mod for a game that is nearly 20 years old now, these are fairly good numbers. Smaller than last year, but still impressive. We are glad that you are still with us. MTA:SA version or series Percentage of players using that version or series as of 24th of December, 2024 1.6.0 99.5% 1.5.9 0.4% <1.5.9 0.1% Also, as of 24th of December, 2024: there are over 90,000 members on our Discord server, we have got 13,790 followers on X/Twitter, 58,000 users follow our Facebook fanpage , and our Steam Community group has nearly 50,000 members. --- To end this post on a high note, we would like to take this moment to wish you all Happy Holidays and a Happy New Year. Enjoy the Season and take care. -MTA Team
    2 points
  9. I am working with Cursor. Which is a fork of Visual Studio Code modified with AI in mind. It is my daily driver. The free version should give you enough monthly requests to finish your script. An no this is not a stupid AI, it is a optimised version for coding after all. You can even choose which AI you want to use, but some advanced may be behind a paywall.
    2 points
  10. PARKING METER SCRIPT COMPATIBLE WITH THE NEWEST OWLGAMING VIDEO SHOWCASE INTERESTING FEATURES OF THIS SCRIPT: dxDraw UI – modern and user-friendly display (like a real parking meter). Hourly parking system – players can choose how many hours they want to park up to 24 hours (to prevent unrealistic over-parking) Dynamic price calculation – price is automatically calculated based on time. Active/expired parking check – players can extend their active parking or start a new one. Sound effects – confirmation, payment. and error sounds. MDC integration – all payments and parking data are stored and then shown in MDC. Multiple parking zones – you can add unlimited zones and meters via config file. PAYHIP LINK If you have any questions, feel free to text me on Discord! (fajlyp)
    2 points
  11. MTA:SA - Claire Anticheat Claire is a modular, lightweight anticheat resource for MTA:SA, designed to improve the integrity and fairness of servers. Its core philosophy is simple: organize detections into clean, independent modules, make them easy to configure, and build an open platform that others can expand and improve. Claire runs silently in the background, acting as a guardian layer — constantly monitoring player behavior, network conditions, and client-side integrity without interfering with gameplay or degrading performance. Its design favors discretion and precision, targeting cheats without disrupting legitimate users. If you're looking for a solid, customizable way to secure your MTA:SA server, try out Claire. Why does it matter? By being fully open-source, Claire gives server owners an accessible and transparent tool to detect common exploits and improve their server environment. But more than that, it invites collaboration. The idea is that, together — through testing, feedback, improvements, and shared knowledge — we can create a more solid, trustworthy anticheat resource that benefits the entire MTA community. Current features Claire currently includes over 20 independent detection modules, covering movement, combat, environment manipulation, network spoofing, and more. All detections are modular, configurable, and designed to operate silently in the background with minimal performance impact. False positives are rare thanks to tolerance-based logic, score systems, and heuristic analysis. Overall reliability across all modules is expected to be around 95%, all features are listed at our GitHub page. Contributing Claire is an open-source project — contributions are welcome! Feel free to contribute with PRs, reports, or suggestions at our GitHub page. You can also reach out to us on Discord. Download Download from MTA Community: latest release - 1.1.5 from 2025/04/22 Download from GitHub: latest release - 1.1.5 from 2025/04/22 Please check our GitHub page before downloading it, I'm open for suggestions.
    2 points
  12. Link: https://payhip.com/TheDarkQ
    2 points
  13. It is indeed a kind of attack. It means that the player is able execute clientside-code on demand. The attacker is triggering 'known generic events' which might be handled by the server. The ones that are unknown are in your logs, the ones that are known and trigger able are not. But that does not mean that the ones that did trigger didn't cause unwanted results. You might want to consider to restart the resources, just to make sure there is no memory leak. The event which AngelAlpha mentioned can indeed help with detecting that kind of attacks. As an extend you can also add a honeypot, which in this case are 'unkown' events for your server but know for other servers. When a player uses this kind of attack again, you can ban them automatic. You might want take a closer look at your logs for candidates (for example money related). There is also this event: https://wiki.multitheftauto.com/wiki/OnPlayerTriggerEventThreshold But be careful with automating things, always test these kind of stuff or you might accidentally nuke your own player base.
    2 points
  14. Добрый день! При присоединении к серверу появляется данная ошибка "АС#4 Malicious activity". Переустановка Windows не помогла. В чем может быть проблема?
    1 point
  15. Explain the problem better and speak in English.
    1 point
  16. We have an announcement to make regarding certain services and technologies, like "Cloud Gaming" platforms and various cloud / cloud VM and hypervisor based services and software. Unfortunately, the majority of such services can no longer be used with MTA starting today. After observing a growing trend of abuse, such as server ban evading (serials related) we have enabled the same type of security, known as MTA serial verification - which usually applies to the most common consumer VM software - to all VM types and cloud services that we know of. This means that the procedure from https://updatesa.multitheftauto.com/sa/trouble/?tr=serial-validation must be followed on all relevant services, not just the aforementioned. Because most cloud & VM hosting services won't provide users access to the host machine (that hosts the VM), we expect that most "cloud gaming" users will no longer be able to play MTA using said service. Not that MTA is an attractive game to play in cloud gaming though, we advise you to use MTA like a normal user (on your own PC) and understand that we care about servers being able to reliably ban players. Cloud gaming, for instance.. would constantly offer you a new so-called environment, allowing infinite serial swaps, making you hard to ban. It's possible for some people still being able to use relevant services, as these measures will only apply to newly generated MTA serials (not retroactively). This is intended. This topic is also relevant to the "There was a problem validating your serial" error and "Banned by MTA" with reason PROHIBITED VM TYPE / SECURITY VIOLATION
    1 point
  17. I cannot seem to find unstable variant of net.so/net_64.so anywhere. The install-data script (which uses https://mirror-cdn.multitheftauto.com/bdata/net_64.so) fetches untested one. The same site does actually provide unstable net.dll for windows. https://nightly.multitheftauto.com also just provides untested one. So, if anyone could provide me with the link to unstable net_64.so v1.7, that'll be wonderful. I'm specifically looking for rev-25899 but any of the recent revision will work.
    1 point
  18. Resursa este: usor de folosit scurta si la obiect cel mai important sigura impotriva codatilor (daca nu aveti cumva un server asa puscat ca au acces si la astea) Ce ofera: functie setPlayerData functie getPlayerData removePlayerData sendDataToClient Versiune 0.0.1 https://community.multitheftauto.com/index.php?p=resources&s=details&id=18960
    1 point
  19. Welcome to **SAS Network**, a next-generation MTA:SA community combining the best game modes in one place! Play your way: • **CNR (Cops and Robbers)** – create chaos, chase criminals, earn reputation • **ClanWars** – build your team, dominate the battlefield • **Freeroam** – explore, drift, chill, and show off your rides • **Race** – master custom-made tracks and climb the leaderboards What makes us special: • Smooth, lag-free EU servers • Fully optimized custom systems • Active and friendly international community • Frequent updates, challenges, and seasonal events • Discord integration & ranking system Whether you’re into competition, cruising, or pure fun — **SAS Network** has a place for you. Join now: **Server IP:** Coming Soon **Discord:** https://discord.gg/rrFJ5CPsjz **Website:** Coming Soon
    1 point
  20. eyvallah o kadar uğraşamam olmuyorsa olmuyordur bir şey yapmışsın ama anlayamıyorum o kadar kod bilgim yok. oyunda açtıktan sonra silah değiştiremiyorum ve sesler gelmiyor silahtan
    1 point
  21. ¡Bienvenido a una nueva era de MTA:DAYZ! Te presentamos el servidor MTA:DAYZ – The-DayZ, desarrollado por Trust & Machin. El proyecto estuvo en desarrollo durante un año, totalmente original y programado desde cero, sin utilizar soluciones prefabricadas. El lanzamiento está previsto para este invierno. Mira el tráiler del servidor Únete a nuestra comunidad en Discord ━━━━━━━━━━━━━━━━━━━━ El servidor está desarrollado por un equipo polaco, pero cuenta con traducciones a varios idiomas — ¡incluido el español ━━━━━━━━━━━━━━━━━━━━ ¿Por qué elegir nuestro servidor? Cada sistema fue creado pensando en los jugadores, optimizado y perfeccionado para garantizar una experiencia estable y atractiva. Queremos ofrecer algo único — no solo otra copia de lo que ya existe. ━━━━━━━━━━━━━━━━━━━━ Interfaz pensada para el jugador: • Todas las estadísticas en un solo lugar • Historial de puntos premium y de juego • Guía clara, configuración de teclas rápidas, FPS y audio • Personalización de la mira y sistema de códigos de invitación • Lista de logros que puedes desbloquear durante el juego ━━━━━━━━━━━━━━━━━━━━ Sistema de grupos: • Los niveles de grupo desbloquean nuevas funciones, como:  – TAG propio en el chat  – Marcador en el mapa del lugar de muerte de un compañero  – Bonificaciones médicas y otros apoyos tácticos • Ranking de grupos — basado en las estadísticas conjuntas de todos los miembros (kills, tiempo de supervivencia, etc.), creando una competición dinámica y destacando a los mejores equipos ━━━━━━━━━━━━━━━━━━━━ Sistema de intercambio seguro: Permite comerciar incluso estando offline, lo que mejora la comodidad y reduce el riesgo de estafas. ━━━━━━━━━━━━━━━━━━━━ ¡Jefes legendarios te esperan! Entre ellos Grounder — un enemigo capaz de generar una onda expansiva que lanza a los jugadores por los aires y dificulta derrotarlo. ━━━━━━━━━━━━━━━━━━━━ Sistema de crafteo: Permite crear objetos únicos con ciertos NPCs. Algunos objetos legendarios solo pueden conseguirse fabricándolos uno mismo. ━━━━━━━━━━━━━━━━━━━━ Bases seguras para tus pertenencias: • Se pueden comprar con moneda premium o puntos de juego — diseñado para evitar el Pay2Win • Sistema avanzado de registros y permisos detallados — puedes dar acceso limitado a una tienda de campaña o a una sala específica antes de otorgar acceso total a la base ━━━━━━━━━━━━━━━━━━━━ En el mapa aparecen vehículos accidentados que pueden ser saqueados para obtener loot valioso. Son fáciles de localizar gracias al humo denso que los rodea. ━━━━━━━━━━━━━━━━━━━━ Inventario práctico e intuitivo: • Vista previa de la imagen y descripción del objeto • Recoger toda la munición con un solo clic • Posibilidad de soltar varios objetos a la vez ━━━━━━━━━━━━━━━━━━━━ La ciudad de San Fierro está temporalmente bloqueada. En esta zona existe una nube tóxica que mata al jugador en pocos segundos. Si el servidor se desarrolla con éxito, planeamos introducir equipamiento especial para entrar de forma segura y reabrir esta localización en el futuro. ━━━━━━━━━━━━━━━━━━━━ Ahora es posible reforzar los vehículos con acero. Esto aumenta su resistencia y los protege, por ejemplo, contra pinchazos en los neumáticos. ━━━━━━━━━━━━━━━━━━━━ Y eso no es todo — no queremos revelar cada detalle, queremos que los descubras por ti mismo jugando en el servidor. Espera con ganas la apertura del servidor y únete a nuestra comunidad en Discord: Discord Para quienes quieran ver más: también tenemos un vídeo de más de 30 minutos del servidor. Ver vídeo ¡Gracias por tu interés — esperamos jugar contigo pronto! ━━━━━━━━━━━━━━━━━━━━ A continuación te mostramos algunas imágenes del servidor: ━━━━━━━━━━━━━━━━━━━━
    1 point
  22. Hi, No need for a specific license, just run your server as usual. At most, define an e-mail address in your mtaserver.conf (look for the owner_email_address field) and you're good to go. Sidenote: please avoid tagging staff members.
    1 point
  23. # UPDATE * Added sounds when the player doesn't have enough money or when the purchase is done ( different sounds for both). * Dealers now have voices that are triggered when the the bag is opened or when the player can't buy the weapon. * The bag now remains open even when the transaction is failed.
    1 point
  24. Good job, it was an honor to test it
    1 point
  25. Imagine advertising that you work with the "largest cheater groups in MTA:SA" lol
    1 point
  26. There are two kinds of methods, one with setTimer and the other with the alternative onClientRender setTimer : The cursor always appears in the center for one frame after showCursor(true). function openPanel() showCursor(true) -- Save the last cursor position (values between 0 and 1) local x, y = getCursorPosition() -- Get the screen resolution local sx, sy = guiGetScreenSize() -- After 50ms, set the cursor back to its previous position setTimer(function() setCursorPosition(x * sx, y * sy) end, 50, 1) end onClientRender: Use a timer or onClientRender to set the position after showing the cursor. function panelAc() showCursor(true) local x, y = getCursorPosition() local sx, sy = guiGetScreenSize() local function imlecDuzelt() setCursorPosition(x * sx, y * sy) removeEventHandler("onClientRender", root, imlecDuzelt) end addEventHandler("onClientRender", root, imlecDuzelt) end your fixed code : local toggle = false local savedCursorX, savedCursorY local function togglePanel() toggle = not toggle if toggle then showCursor(true) if savedCursorX and savedCursorY then local screenX, screenY = guiGetScreenSize() -- Wait one frame before setting the cursor position setTimer(function() setCursorPosition(savedCursorX * screenX, savedCursorY * screenY) end, 50, 1) end else savedCursorX, savedCursorY = getCursorPosition() showCursor(false) end end bindKey("k", "down", togglePanel) I think you understand, if you have a different problem please post it here or create a new topic and tag me
    1 point
  27. Is there any error on debug or F8? I dont understand why its not working
    1 point
  28. MTA:SA Lua Enums - TypeScript-inspired Enumerations for Lua Overview A lightweight, type-safe enumeration library for Multi Theft Auto: San Andreas, bringing TypeScript-like enum functionality to Lua. This library provides a clean, intuitive way to define and use enumerations in your MTA:SA scripts. Key Features Multiple Syntax Styles: Create enums using traditional function calls or with a more elegant syntax similar to TypeScript Global and Local Enums: Define global enums for application-wide constants or local enums for module-specific use Type Safety: Validate enum values and prevent modification after creation Auto-incrementing Values: Automatically assign sequential values to enum members Utility Methods: Easily convert between enum values and names with built-in helper functions Example Usage -- Global enum with string name and curly braces enum 'Direction' { NORTH = 1, EAST = 2, SOUTH = 3, WEST = 4 } -- Local enum with direct table assignment local HttpStatus = enum { OK = 200, NOT_FOUND = 404, SERVER_ERROR = 500 } -- Auto-incrementing values enum 'Size' { "SMALL", "MEDIUM", "LARGE" } -- Using enum values local direction = Direction.NORTH local status = HttpStatus.OK -- Get name from value local directionName = Direction.getName(1) -- Returns "NORTH" -- Check if value belongs to enum if HttpStatus(200) then -- 200 is a valid HttpStatus value end Why Use This Library? Clean Code: Eliminate magic numbers and strings with descriptive enum constants Error Prevention: Catch typos and invalid values at runtime Self-documenting: Make your code more readable and maintainable Flexibility: Choose the syntax style that best fits your coding preferences Lightweight: Minimal overhead with no external dependencies Installation Simply include the enum.lua file in your project and add it to your meta.xml: <script src="path/to/enum.lua" type="shared" cache="false" /> Check out the full source code at: https://github.com/norelockk/mtasa-lua-enums This library is perfect for MTA:SA developers looking to write cleaner, more maintainable code with proper type safety. Whether you're building a simple gamemode or a complex resource, these enums will help organize your constants and prevent common errors.
    1 point
  29. MAP Converters Some basic map converters that may be useful. https://mtaclub.eu/converters Please let me know if you find a bug!
    1 point
  30. تواصل معي دسكورد اخوي ,اقدر اسويلك هو w.lth contact me in discord ,i can do it for you w.lth
    1 point
  31. function faroisd() local car = getPedOccupiedVehicle(source) -- get the car the player is in (could be false if not in one) if car and isElement(car) then if getVehicleOverrideLights(car) == 1 then setTimer(setVehicleOverrideLights, 100, 1, car, 2) else setTimer(setVehicleOverrideLights, 100, 1, car, 1) end end end addEvent("ligar", true) addEventHandler("ligar", root, faroisd)
    1 point
  32. @thebossofc O erro está dizendo que o 4º argumento do seu setPedAnimation deveria ser um número, mas vc colocou um true no lugar. setPedAnimation(source, "crack", "crckidle"..math.random(1,4), true, false, false, false ) -- 1 2 3 4 (era pra ser um número inteiro, o true é só depois) Faltou você declarar o parâmetro time. Normalmente o valor dele é -1.
    1 point
  33. It's great to see you here again after years. This worked. Thanks IIYAMA!
    1 point
  34. It is a permission issue. https://wiki.multitheftauto.com/wiki/Server_Commands#aclrequest First verify if the meta.xml has any acl request listed in it's meta.xml /aclrequest list <resourceName> all And if loadstring is listed, grand permission. /aclrequest allow <resourceName> all If not listed, add it to the meta.xml of the resource: <aclrequest> <right name="function.loadstring" access="true" /> </aclrequest> See example: https://wiki.multitheftauto.com/wiki/Meta.xml Run: /refreshall And try the aclrequest commands again.
    1 point
  35. You can make your own functions that operate in terms of your custom concepts, and use dxDrawRectangle/dxDrawText under the hood for actual drawing. An example: function getCoords(coordSys, x, y) if coordSys then x, y = coordSys.x+x, coordSys.y+y end return x, y end function makeCoordSystem(parent, x, y) local finalX, finalY = getCoords(parent, x, y) return { x = finalX, y = finalY } end function drawText(coordSys, text, x, y) local finalX, finalY = getCoords(coordSys, x, y) dxDrawText(text, finalX, finalY) end function drawRectangle(coordSys, x, y, width, height, color) local finalX, finalY = getCoords(coordSys, x, y) dxDrawRectangle(finalX, finalY, width, height, color) end This implements a concept of coordinate system, the coordinate offset described by table with keys x and y. With this, you can do: local onScreenHud = makeCoordSystem(false, x*1200, y*120) -- false means onScreenHud will be placed in absolute coordinates function drawHUD() drawRectangle(onScreenHud, 0, 0, x*1400, y*400, tocolor(0, 0, 0, 150)) drawText(onScreenHud, "Text", x*20, y*10) end Since makeCoordSystem has parent as first argument, even coordinate systems themselves can be positioned with respect to other coordinate systems: local someInnerHud = makeCoordSystem(onScreenHud, x*20, x*40) function drawInnerHUD() drawText(someInnerHud, "Text in the inner HUD", x*20, y*10) end It's all about coming up with the right abstractions. As an example, you could modify this to add width and height properties to coordinate systems, and use them in calculations so you wouldn't have to write x* and y* everywhere.
    1 point
  36. function onClientResourceStart() map = Map.new():init() map:setBounds(x*30, y*30, x*1306, y*708) map:setAlpha(200) radar = Map.new():init() radar:setBounds(x*20, y*560, x*281, y*193) radar:setStyle(2) radar:setAlpha(200) radar:setBlipSize(x*24) radar:setVisible(true) -- Variables to track mouse movement mouseDown = false lastX, lastY = 0, 0 map.Switch = function() local wasVisible = map:isVisible() map:setVisible(not wasVisible) radar:setVisible(not wasVisible) showChat(not wasVisible) -- Only show cursor and bind keys when map is visible if not wasVisible then showCursor(true) addEventHandler("onClientCursorMove", root, handleMouseMovement) addEventHandler("onClientMouseWheel", root, handleMouseWheel) addEventHandler("onClientClick", root, handleMouseClick) bindKey("mouse_wheel_up", "down", function() zoomMap("in") end) bindKey("mouse_wheel_down", "down", function() zoomMap("out") end) else showCursor(false) removeEventHandler("onClientCursorMove", root, handleMouseMovement) removeEventHandler("onClientMouseWheel", root, handleMouseWheel) removeEventHandler("onClientClick", root, handleMouseClick) unbindKey("mouse_wheel_up", "down") unbindKey("mouse_wheel_down", "down") end end bindKey('F11', 'down', map.Switch) setPlayerHudComponentVisible("radar", false) toggleControl("radar", false) end -- Function to handle mouse clicks for dragging function handleMouseClick(button, state) if map:isVisible() and button == "left" then if state == "down" then mouseDown = true local x, y = getCursorPosition() lastX, lastY = x, y else mouseDown = false end end end -- Function to handle mouse movement for dragging the map function handleMouseMovement(_, _, x, y) if map:isVisible() and mouseDown then local currentX, currentY = x, y local deltaX, deltaY = currentX - lastX, currentY - lastY -- Move map based on mouse movement local mapX, mapY, mapW, mapH = map:getBounds() -- Adjust movement sensitivity as needed local moveSpeed = 1.5 map:setBounds(mapX - deltaX * moveSpeed, mapY - deltaY * moveSpeed, mapW, mapH) lastX, lastY = currentX, currentY end end -- Function to handle mouse wheel for zooming function handleMouseWheel(direction) if map:isVisible() then zoomMap(direction > 0 and "in" or "out") end end -- Centralized zoom function function zoomMap(direction) if not map:isVisible() then return end local x, y, width, height = map:getBounds() local zoomFactor = 0.1 -- Adjust for faster/slower zooming if direction == "in" then -- Zoom in: decrease size, adjust position to zoom toward center local newWidth = width * (1 - zoomFactor) local newHeight = height * (1 - zoomFactor) local newX = x + (width - newWidth) / 2 local newY = y + (height - newHeight) / 2 map:setBounds(newX, newY, newWidth, newHeight) else -- Zoom out: increase size, adjust position to zoom from center local newWidth = width * (1 + zoomFactor) local newHeight = height * (1 + zoomFactor) local newX = x - (newWidth - width) / 2 local newY = y - (newHeight - height) / 2 map:setBounds(newX, newY, newWidth, newHeight) end end addEventHandler("onClientResourceStart", resourceRoot, onClientResourceStart) function onClientResourceStop() setPlayerHudComponentVisible("radar", true) toggleControl("radar", true) -- Clean up any remaining event handlers if map:isVisible() then removeEventHandler("onClientCursorMove", root, handleMouseMovement) removeEventHandler("onClientMouseWheel", root, handleMouseWheel) removeEventHandler("onClientClick", root, handleMouseClick) end end addEventHandler("onClientResourceStop", resourceRoot, onClientResourceStop)
    1 point
  37. Try this one Client.lua local inventario = { ["THC"] = 0, ["LSD"] = 0, ["Cocaina"] = 0, ["Heroina"] = 0 } local productosVendedor = {"THC", "LSD", "Cocaina", "Heroina"} local precios = { ["THC"] = 500, ["LSD"] = 500, ["Cocaina"] = 500, ["Heroina"] = 500 } local ventana, lista, usarButton, cerrarButton -- Función para abrir el menú de compra function abrirMenuDeCompra() ventana = guiCreateWindow(0.3, 0.3, 0.4, 0.5, "Menu de Compra", true) lista = guiCreateGridList(0.1, 0.2, 0.8, 0.5, true, ventana) local columnaProducto = guiGridListAddColumn(lista, "Producto", 0.6) local columnaPrecio = guiGridListAddColumn(lista, "Precio", 0.3) for i, producto in ipairs(productosVendedor) do local row = guiGridListAddRow(lista) guiGridListSetItemText(lista, row, columnaProducto, producto, false, false) guiGridListSetItemText(lista, row, columnaPrecio, "$"..precios[producto], false, false) end local comprarButton = guiCreateButton(0.1, 0.75, 0.8, 0.1, "Comprar Producto", true, ventana) guiSetProperty(comprarButton, "NormalTextColour", "FF0000FF") -- Botón en rojo cerrarButton = guiCreateButton(0.1, 0.88, 0.8, 0.1, "Cerrar", true, ventana) guiSetProperty(cerrarButton, "NormalTextColour", "FFFFFFFF") -- Botón de cerrar -- Evento para comprar productos addEventHandler("onClientGUIClick", comprarButton, function() local selectedItem = guiGridListGetSelectedItem(lista) if selectedItem ~= -1 then local producto = guiGridListGetItemText(lista, selectedItem, columnaProducto) triggerServerEvent("comprarProducto", resourceRoot, producto) end end, false) addEventHandler("onClientGUIClick", cerrarButton, function() if isElement(ventana) then destroyElement(ventana) showCursor(false) end end, false) showCursor(true) end addEvent("abrirMenuDeCompra", true) addEventHandler("abrirMenuDeCompra", resourceRoot, abrirMenuDeCompra) -- Función para agregar el producto al inventario del jugador function agregarProductoAlInventario(producto) if inventario[producto] then inventario[producto] = inventario[producto] + 1 else inventario[producto] = 1 end actualizarPanelDeInventario() end addEvent("agregarProductoAlInventario", true) addEventHandler("agregarProductoAlInventario", resourceRoot, agregarProductoAlInventario) -- Función para mostrar mensaje de compra fallida function mostrarMensajeCompraFallida() outputChatBox("No tienes suficiente dinero para comprar este producto.", 255, 0, 0, true) end addEvent("mostrarMensajeCompraFallida", true) addEventHandler("mostrarMensajeCompraFallida", resourceRoot, mostrarMensajeCompraFallida) -- Función para mostrar mensaje de compra exitosa function mostrarMensajeCompraExitosa(producto) outputChatBox("Compra exitosa de " .. producto .. ". ¡Gracias por tu compra!", 0, 255, 0, true) end addEvent("mostrarMensajeCompraExitosa", true) addEventHandler("mostrarMensajeCompraExitosa", resourceRoot, mostrarMensajeCompraExitosa) -- Función para abrir/cerrar el panel de inventario (F2) function togglePanelDeInventario() if isElement(ventana) then destroyElement(ventana) showCursor(false) else ventana = guiCreateWindow(0.3, 0.3, 0.4, 0.5, "Inventario de Drogas", true) lista = guiCreateGridList(0.1, 0.2, 0.8, 0.5, true, ventana) local columnaProducto = guiGridListAddColumn(lista, "Producto", 0.6) local columnaCantidad = guiGridListAddColumn(lista, "Cantidad", 0.3) for producto, cantidad in pairs(inventario) do local row = guiGridListAddRow(lista) guiGridListSetItemText(lista, row, columnaProducto, producto, false, false) guiGridListSetItemText(lista, row, columnaCantidad, tostring(cantidad), false, false) if cantidad == 0 then guiGridListSetItemColor(lista, row, columnaCantidad, 255, 255, 255) -- Texto blanco else guiGridListSetItemColor(lista, row, columnaCantidad, 0, 0, 0) -- Texto negro end end usarButton = guiCreateButton(0.1, 0.75, 0.8, 0.1, "Usar Producto", true, ventana) guiSetProperty(usarButton, "NormalTextColour", "FF0000FF") -- Botón en rojo cerrarButton = guiCreateButton(0.1, 0.88, 0.8, 0.1, "Cerrar", true, ventana) guiSetProperty(cerrarButton, "NormalTextColour", "FFFFFFFF") -- Botón de cerrar addEventHandler("onClientGUIClick", usarButton, function() local selectedItem = guiGridListGetSelectedItem(lista) if selectedItem ~= -1 then local producto = guiGridListGetItemText(lista, selectedItem, columnaProducto) if inventario[producto] > 0 then usarProducto(producto) inventario[producto] = inventario[producto] - 1 actualizarPanelDeInventario() else outputChatBox("Debes ir al vendedor para comprar " .. producto, 255, 0, 0, true) end end end, false) addEventHandler("onClientGUIClick", cerrarButton, function() if isElement(ventana) then destroyElement(ventana) showCursor(false) end end, false) showCursor(true) end end bindKey("F2", "down", togglePanelDeInventario) -- Función para usar el producto seleccionado function usarProducto(producto) if producto == "THC" then outputChatBox("Usaste THC", 255, 0, 0, true) -- Aplica efectos de THC elseif producto == "LSD" then outputChatBox("Usaste LSD", 0, 255, 0, true) -- Aplica efectos de LSD elseif producto == "Cocaina" then outputChatBox("Usaste Cocaina", 255, 255, 0, true) -- Aplica efectos de Cocaina elseif producto == "Heroina" then outputChatBox("Usaste Heroina", 128, 0, 128, true) -- Aplica efectos de Heroina end end -- Función para actualizar el panel de inventario function actualizarPanelDeInventario() if isElement(ventana) then destroyElement(ventana) togglePanelDeInventario() end end Server.lua -- Crea un vendedor en una ubicación específica local vendedor = createPed(50, 2165.93, 1696.37, 10.82) -- Congela el vendedor para que no se mueva ni muera setElementFrozen(vendedor, true) setElementData(vendedor, "invincible", true) -- Crea un marker (área de interacción) cerca del vendedor local marketMarker = createMarker(2165.93, 1696.37, 10.10, "cylinder", 1.5, 255, 0, 0, 150) -- Función para mostrar el menú de compra function mostrarMenuDeCompra(player) triggerClientEvent(player, "abrirMenuDeCompra", resourceRoot) end -- Función para manejar la compra de productos function comprarProducto(player, producto) local precio = 500 if getPlayerMoney(player) >= precio then takePlayerMoney(player, precio) triggerClientEvent(player, "agregarProductoAlInventario", resourceRoot, producto) triggerClientEvent(player, "mostrarMensajeCompraExitosa", resourceRoot, producto) else triggerClientEvent(player, "mostrarMensajeCompraFallida", resourceRoot) end end -- Evento para mostrar el menú de compra cuando el jugador entra en el marker addEventHandler("onMarkerHit", marketMarker, function(player) if getElementType(player) == "player" then mostrarMenuDeCompra(player) end end) -- Evento para manejar la compra de productos addEvent("comprarProducto", true) addEventHandler("comprarProducto", resourceRoot, comprarProducto) -- Hacer al ped invulnerable addEventHandler("onPedWasted", root, function() if source == vendedor then cancelEvent() end end) addEventHandler("onClientPedDamage", root, function() if source == vendedor then cancelEvent() end end)
    1 point
  38. v2.2.0 released: modernization and new command for QoL Download and changelog here: https://github.com/Fernando-A-Rocha/mta-nandocrypt/releases/tag/v2.2.0
    1 point
  39. By showing the cursor: https://wiki.multitheftauto.com/wiki/ShowCursor Though setCameraMatrix might also be possible, but you will have to reset the camera.
    1 point
  40. 1 point
  41. Download latest version from https://nightly.mtasa.com
    1 point
  42. Hello! I would like to show you the developments of my project about vehicle registration plates for different countries. Here's what it looks like: I am always open to hearing the feedback or insights of those who have a better understanding of the registration plates. Thank you!
    1 point
  43. Closing this based on inactivity. OP, if you're still looking for help, let me know and I'll reopen this for you.
    1 point
  44. Map files Table of contents: Introduction How to read a map file? Broken map file, what to do? Editor bugged, what to do? Modify your maps outside of MTA Extra links Introduction A map-file! What is that? The name already gives away the definition. It is a file which contains a MTA map. The format makes maps portable, so that you can send them over to your friends. You can recognize map-files by the extension: .map Here is an example of a map: Syntax highlight When you open a map file in your text editor. The syntax highlight you should use is XML (HTML will work as well, but the semantic is different and could cause issues with auto complete features, that is if you have enabled those). Changing syntax highlight in for example Visual Studio Code. How to read a map file? Before we start, this is what we call a node: <tagName></tagName> If we take a closer look to the following map file: <map> <object id="object (bevgrnd03b_law) (1)" interior="0" collisions="true" alpha="255" doublesided="false" model="6094" scale="1" dimension="0" posX="635.234375" posY="-3827.2275390625" posZ="5" rotX="0" rotY="0" rotZ="0"></object> <object id="object (gaz9_law) (1)" interior="0" collisions="true" alpha="255" doublesided="false" model="6133" scale="1" dimension="0" posX="625.49114990234" posY="-3771.6955566406" posZ="11.479743003845" rotX="0" rotY="0" rotZ="0"></object> <object id="object (CE_grndPALCST03) (1)" interior="0" collisions="true" alpha="255" doublesided="false" model="13120" scale="1" dimension="0" posX="573.09802246094" posY="-3847.013671875" posZ="3.6442375183105" rotX="0" rotY="22" rotZ="352"></object> <object id="object (CE_grndPALCST03) (2)" interior="0" collisions="true" alpha="255" doublesided="false" model="13120" scale="1" dimension="0" posX="572.64624023438" posY="-3769.0698242188" posZ="4.9519920349121" rotX="0" rotY="21.99462890625" rotZ="343.24649047852"></object> <object id="object (CE_grndPALCST03) (3)" interior="0" collisions="true" alpha="255" doublesided="false" model="13120" scale="1" dimension="0" posX="669.66534423828" posY="-3856.0627441406" posZ="3.6442375183105" rotX="0" rotY="63.99462890625" rotZ="175.99389648438"></object> </map> > we see in there the map node: <map></map> When the map is loaded <map></map> will become our map element. And inside of the map node we see more nodes: <object id="object (bevgrnd03b_law) (1)" interior="0" collisions="true" alpha="255" doublesided="false" model="6094" scale="1" dimension="0" posX="635.234375" posY="-3827.2275390625" posZ="5" rotX="0" rotY="0" rotZ="0"></object> <object id="object (gaz9_law) (1)" interior="0" collisions="true" alpha="255" doublesided="false" model="6133" scale="1" dimension="0" posX="625.49114990234" posY="-3771.6955566406" posZ="11.479743003845" rotX="0" rotY="0" rotZ="0"></object> In this case these two nodes will become two in-game objects. Tagname <tagName></tagName> Each node in the map file will become an element in game. !important A node has a tag name. In this case I gave it the name: "tagName" This tag name specifies in MTA the element type. For example: If it has the name <object></object>, the element-type is an object. If it has the name <ped></ped>, the element-type is a ped. What if the tag name is not matching with one of these entities? (The list is not complete, the rest can be found in this class list, only if the XML syntax is implemented) Then the elements are considered custom elements. They are not visible in game. Custom elements Custom elements have their own purposes. You often see those custom elements used in game modes, for example stealth: <mercenaryspawn id="mercenaryspawn (1)" posX="635.58117675781" posY="-3770.458984375" posZ="18.97974395752" rotX="0" rotY="0" rotZ="0"></mercenaryspawn> The tagname for this node is "mercenaryspawn". The element that is produced after loading the map, is used as a spawnpoint for in a stealth map. Custom elements are invisible. Custom elements do have an orientation. The getElementsByType function can be used to get custom elements. Attributes Attributes are properties applied to a node. They are used to attach data to an element. Example: <entity name="IIYAMA" age="5" type="device" resolutionX="1920" resolutionY="1080" displaySize="31"></entity> An attribute exist out of two parts: <entity name="value"></entity> Name Value The name specifies if the node has the attribute. <entity name></entity> <entity age></entity> If the name is "name", then the node has the attribute "name". And if the name is "age", then the node has the attribute "age". The value will be used for the data for each attribute. <entity name="IIYAMA" age="5"></entity> Identifiers (ID) Every elements can have an identifier attribute, which is used to make it accessible for scripting functions. <tagName id="identifier"></tagName> The identifier of an element can be used in getElementByID to grant access to it. Even though identifiers normally should be unique for each individual, it is not the end of the world if they are not in MTA. They might also be considered as unnecessary for map files without scripts. Element specific attributes There are some attributes that do more than just applying properties. They will change the element appearance and orientation. For example this object: <object interior="0" collisions="true" alpha="255" doublesided="false" model="6094" scale="1" dimension="0" posX="635.234375" posY="-3827.2275390625" posZ="5" rotX="0" rotY="0" rotZ="0"></object> It will be created in interior 0. It will have collisions. (You can walk on it) Alpha. It's opacity is 100%. It is not doublesided. (When you stand inside of the object you can look through it. If doublesided is enabled the same colors/paint from the other side will be applied.) It's model is 6094. It is scaled 100%. (0.5 = 50%, 2 = 200%) Etc. If you want to know which attributes do have influence on the elements appearance and orientation, you have to look that up on the wiki. Here a small list of some those attributes: Broken map file, what to do? If your map file is broken. Step 1 Make a backup. + Always make a backup when re-editing your map. Settings can get lost! Step 2 The first thing you want to do, is just open it in a text-editor. Just give it a quick look and check for anything strange. The file could be empty or some strange values could be used. Do you want to know all the syntax rules (XML)? You can find a list right here: http://www.adobepress.com/articles/article.asp?p=1179145 Step 3 Remove the editor definition. This definition could cause problems in case of invalid characters. From: <map edf:definitions="COBDEF,editor_main"> <!-- Map elements --> </map> To: <map> <!-- Map elements --> </map> Step 4 If you can't find the problem, then you could validate the file. There are services out there that validate XML files. They can help you to find out where your file is broken. Validation tool by W3C: https://validator.w3.org/#validate_by_input Note: You need to do step 3 first. Else you can't parse the file. Step 5 In case of re-opening map files in the editor, but doesn't want to get open. Make a backup. Remove custom elements. See chapter How to read? Retry to open the file. Editor is bugged, what to do? Your editor could be bugged and you are not able to save the map or open a new one. The first thing you want to do is backup the editor_dump folder in your server. This folder is located between all your resources. server\mods\deathmatch\resources\editor_dump Rename the folder name. editor_dump > my_broken_map Stop the map editor. Check if there is a new editor_dump folder. If there is, rename that one as well. Start the map editor again. Modify your maps outside of MTA Sometimes you want to modify your maps without going back in to the editor. Your text-editor is in most cases the way to go. For example you want to move all objects to a new dimension. In Notepad++: Make a backup! (if you are new to this) Select in your file the part you want to replace: dimension="0" Commando: ctrl + H (replacement overlay) Fill in the replace field: dimension="1" Click on: replace ALL. Moving your map? There is a nice online tool that can help you with that: https://mtaclub.eu/converters Edit your map with the DOM (Document Object Model) Knowing JavaScript? Your browser inspector can be used to modify your maps at a higher level. (If you so desire) Extra links: Parent, child and how this is reflected in MTA https://wiki.multitheftauto.com/wiki/XML https://wiki.multitheftauto.com/wiki/Element_tree Elementdata <sync_map_element_data /> https://wiki.multitheftauto.com/wiki/Meta.xml Load maps (manually + including in meta.xml) https://wiki.multitheftauto.com/wiki/Meta.xml https://wiki.multitheftauto.com/wiki/LoadMapData Save maps https://wiki.multitheftauto.com/wiki/SaveMapData
    1 point
  45. Hello. I want to present you my game mode based on Counter Strike. The server with this game mode was not popular and died. I get some break and now I decided to continue this project and release for Multi Theft Auto community. Features interface based on CS: Source full dynamic and easy customizable weapons & shop (including grenades as flashbang, decoy; nightvision goggles etc.) own damage system carrying weapons on the back, C4 in the hands spectator mode with freecam and "wallhacking" friends from your team and weapons on ground weapon drop planting & defusing bomb hostages server Message of The Day, global news, new version notification and auto update master server list Rock The Vote and nominating maps to the next vote; auto vote after 30 rounds support for different languages (standard is english and polish) Screenshots (click me) Videos (click me) Download Community: https://community.multitheftauto.com/?p ... s&id=10487 Thanks to Ren712 - ped wall shader & mapfix shader
    1 point
  46. Get everything in the file as a string and put it on a variable. Get the position where you want to write and remove everything infront of that position and put that onto another variable. When you writed, paste the strings together and put them into a file (create a new file, overwrite it IF succeed) and save it. I think there better ways to do it, but atleast you are sure it won't overwrite is if you do it like this...
    1 point
×
×
  • Create New...