Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 28/01/25 in all areas

  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. UPDATE: I figured that it was an acl issue, that I had to enable HTTP for everyone, so the created API can be available for everyone, even the ones who don't have any auth But I will be needing help on ACL, since I am creating a new form scratch gamemode, I will need to write my own and custom acl as well. Or perhaps use the current account system of MTA as well since I can't edit to create my own And I appreciate a lot for the helps IIYAMA gave me during this issue with the stuff I had with CEF and how they should communicate.
    1 point
  15. Добрый день! При присоединении к серверу появляется данная ошибка "АС#4 Malicious activity". Переустановка Windows не помогла. В чем может быть проблема?
    1 point
  16. Hey there, As you may know, I am currently working on a futuristic / cyberpunk-style, old-school concept map, and the project is still a work in progress. I will be sharing more updates, previews, and details on Discord I would also like to make this project more community-driven. If you’re interested, you can share your digital artwork, drawings, or designs with me here on the forum or via Discord DM. Selected artworks may be featured directly inside the map, for example as: * Signboards * Billboards * Holograms Posters or other cyberpunk-themed visuals [Caption] There are tons of other holograms and billboards around the map but I didn't want to show it all at once Your art will become part of the city itself, helping shape the overall atmosphere and identity of the map. Every submitted artwork that is used will be carefully showcased in the end credits section, with proper recognition given to its creator. If you’d like to see your work showcased in a cyberpunk environment, feel free to reach out. I’m excited to see what the community can bring to this world! Yours sincerely,
    1 point
  17. Yeah, I worked on something similar some time ago, but I ran into many challenges when converting Figma designs into MTA Lua scripting. While the editor does offer a way to create layouts based on Figma templates, that approach is still very limited and quite basic. Because of that, I decided to build this app. It allows you to design the entire interface directly within the application and export a complete, ready-to-test MTA resource with ease. Thanks for your comment!
    1 point
  18. https://wiki.multitheftauto.com/wiki/SetAircraftMaxVelocity
    1 point
  19. i'm planning to purchase a snapdragon X powered laptop which is ARM based, will i face problem playing mta or gta sa?
    1 point
  20. I just found some old screenshots from 2012 I can't remember what the server name was. at some point in my MTA life, I actually enjoyed playing DD and I was a member of the [HiVi] DD/DM clan. even though I sucked at DD/DM, all that mattered was the friendship. (shoutout to David, Belmin and Kyle) 2012, a private server with zombies 2012, private server. we didn't need much to have fun back then. a private server and an admin panel was all we needed to have fun around this time, I had discovered the map editor and built some sort of a greenzone on LS Observatory 2012 as well. I can't remember which mod it was but it allowed you to literally carpet bomb :~. I found these on Facebook by accident. I wish I had saved more pictures. I'm not sure if Imgur existed back then, but all the images I uploaded were uploaded to tinypic (from 2008) and they are long gone.
    1 point
  21. PRO|Race Slipstream DRS System | Advanced Aerodynamics for MTA:SA Developed by Hunterix and AI ------------------------------------------------------------------------------------------ PRO|Race Slipstream DRS, a fully custom Drag Reduction System designed to bring tactical depth and realism to MTA racing servers. Unlike standard nitro scripts, this system manipulates the vehicle's physical handling and aerodynamics in real-time. How it Works: 1. Kinetic Energy Recovery (Slipstream Charging) The system encourages aggressive close-range racing. The DRS battery only charges when you are drafting behind another opponent. Requirements: You must be traveling above 150 km/h and maintain a distance of less than 10 meters from the car ahead. Visual Feedback: As you draft, the custom 3D light bar on the rear of the car creates a dynamic gradient, shifting smoothly from Red (Empty) to Yellow, and finally Green (Ready). 2. Active Aerodynamics & Physics Once the battery is fully charged (Green), the system is primed. Activation: Pressing 'X' engages the DRS. Visuals: The rear wing physically rotates 90 degrees to an open position to reduce air resistance. The light bar begins a rapid strobe effect to indicate active discharge. Physics: The script modifies the vehicle's dragCoeff (Drag Coefficient) in real-time. This effectively removes air resistance, allowing the car to break its natural top speed limit without unrealistic acceleration boosts. 3. Safety & Strategy Just like in Formula 1, the system is designed for straights, not corners. Brake Cut-off: Touching the brakes immediately deactivates the DRS, closes the wing, and restores normal downforce to ensure cornering stability. Dynamic Consumption: The charge drains while active, shifting the light bar color back from Green to Red, forcing players to strategically decide when to deploy their boost for the perfect overtake. Technical Features: Custom 3D Wing & Light Bar models. HLSL Shaders: Dynamic texture coloring with alpha blending and neon glow effects. Vector Math: Precise slipstream detection using dot products and velocity vectors. Custom Audio effects for activation and deactivation. https://www.youtube.com/watch?v=mvPintb-5GU Download : https://www.mediafire.com/file/ptmdt6rcjquq4rz/ProRaceDRS.zip/file https://discord.gg/PM6axzEZ
    1 point
  22. The arms dealer script is something I made recently, this script can be used in different game modes. Dealers can be found in various locations around Los Santos. Here's a preview video For more information, feel free to join my discord server: https://discord.gg/Nex7e6JUhe Discord account is mehdi4664
    1 point
  23. 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
  24. Red Line: Purple Line: Red Line Download Link Purple Line Download Link
    1 point
  25. # 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
  26. Eagle Loader – Streamlined Custom Map Processing for MTA:SA GitHub: https://github.com/BlueEagle12/MTA-SA---Eagle-Loader What is Eagle Loader? Eagle Loader is an efficient and lightweight map processing resource for Multi Theft Auto: San Andreas. It simplifies the loading of custom maps and objects using a custom .definition system and a customized .map format tailored for performance and flexibility. Key Features Easy Custom Map Loading Load complex custom maps with minimal performance overhead. Definition File System Handle map data, models, effects, and LODs through structured .definition files and customized .map files. String-Based Custom Model IDs One of Eagle Loader’s standout features is the ability to assign string-based IDs to custom models instead of numeric ones—making it significantly easier to manage and organize assets. Optimized for Speed Designed for fast loading and smooth integration with the MTA:SA engine. Demo Map – MTA: Vice City Want to see Eagle Loader in action? Check out this fully functional Vice City map port: MTA: Vice City – Demo Map How to Load the Vice City Map Download the Resources Clone or download both repositories: Eagle Loader MTA: Vice City Place in Your Server Resources Folder Drop both folders inside your resources/ directory. Start Eagle Loader First start eagleLoader Start the Vice City Map Resource start viceCity With just a few simple steps, you’ll be walking through Vice City inside MTA:SA — powered by Eagle Loader. Download & Docs: Eagle Loader on GitHub Feedback & Contributions are welcome!
    1 point
  27. 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
  28. LINK: https://payhip.com/TheDarkQ Specification: Low poly ✔ Full lighting Day/Night ✔ Materials ✔ Optimization ✔ Lighting effects [lamps] ✔ LOD ✔ Any question contact me on discord: TheDarkQ#1707
    1 point
  29. This is the new Los Santos East, Office building version Aka K.Rosenberg & Co Building ! This version contains : Main floor " Reception hall, Chilling area" + 1st Floor "Private office, Meeting room, Open office area, Small reception" + 2st Floor "Private office'Rosenberg office' , 2Meeting room, Open office area, Small reception". Open Interior! Low Poly! Day/Night Prelight ! Combination of Native Objects and a Custom Model! This Model is for sale on my patreon "Exclusive Mod Membership" ! "patreon.com/Skann"
    1 point
  30. Use setPlayerNametagShowing
    1 point
  31. This is perfect, thank you Burak.
    1 point
  32. The warning occurs because onMarkerHit can be triggered by other elements like vehicles, not just players. This means you're sometimes passing a non-player element to getPlayerAccount, which results in returning false instead of an account. You should check if thePlayer is actually a player element before doing anything: function moveGate(thePlayer) if getElementType(thePlayer) == "player" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)) , aclGetGroup("PMESP")) then moveObject(gate, 1500, 1334.8000488281, -1334.1999511719, 10) end end end addEventHandler("onMarkerHit", marker, moveGate) You should do the same in the move_back_gate function, otherwise, it will execute twice when a player enters with a vehicle, for example.
    1 point
  33. I edited owl vehicle system so if someone want and reading this post you can use this: Using NewModels Here is github where you find edited vehicle system: https://github.com/Reynikk/OwlGaming-MTA-Addon-Models-Without-Replacing
    1 point
  34. I never got to know you, but it's sad to see someone leave MTA. But I have "left MTA" long ago and I still visit here all the time, so leaving doesn't have to be what it looks like. Your post serves as a wake-up call reminding me that I should find some time to script on MTA for once. Whatever path in the life you're taking, I hope it's for the better
    1 point
  35. When you set the property, it stays frozen. So for example if you call getWorldProperty and then pass its return value to setWorldProperty, that value will stay until you call resetWorldProperty. But some of those functions (including getSkyGradient) are limited because they can only return the values previously assigned by script - meaning you can't get the unmodified value and assign it to freeze it. It seems that smooth transition is possible for color filter, because getColorFilter has isOriginal argument, allowing you to take the values that would be there if they weren't overridden by script so you can know exactly what values to interpolate to. But it doesn't help much when the same can't be done to other parameters.
    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. Olá. Verifique na seção de Tutoriais em Geral deste fórum. Você encontrará esse tópico que pode ser útil:
    1 point
  38. Thank you for your support to the community, it was an honor to have met you and I hope we meet again one day. I wish you the best of luck!
    1 point
  39. 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
  40. The truth, I had abandoned this project and did not have the opportunity to try your script. But today out of curiosity I asked chatGPT to write me the script and this is the result local vehicleTimers = {} -- Memorizza i timer dei veicoli -- Funzione per controllare se il veicolo è in aria function checkVehicleAir(vehicle) if not isElement(vehicle) then return end if isVehicleOnGround(vehicle) then resetExplosionTimer(vehicle) else startExplosionTimer(vehicle) end end -- Avvia il timer di esplosione function startExplosionTimer(vehicle) if vehicleTimers[vehicle] then return end -- Evita più timer sullo stesso veicolo vehicleTimers[vehicle] = setTimer(function() if isElement(vehicle) and not isVehicleOnGround(vehicle) then blowVehicle(vehicle) -- Esplode il veicolo! vehicleTimers[vehicle] = nil end end, 5000, 1) -- 5 secondi di tempo end -- Resetta il timer se il veicolo tocca il suolo function resetExplosionTimer(vehicle) if vehicleTimers[vehicle] then killTimer(vehicleTimers[vehicle]) -- Ferma il timer vehicleTimers[vehicle] = nil end end -- Controlla lo stato dei veicoli in un loop function monitorVehicles() for _, vehicle in ipairs(getElementsByType("vehicle")) do if getVehicleController(vehicle) then -- Controlla solo i veicoli con giocatori dentro checkVehicleAir(vehicle) end end end setTimer(monitorVehicles, 1000, 0) -- Controlla ogni secondo -- Quando un veicolo esplode, rimuove il timer associato addEventHandler("onVehicleExplode", root, function() vehicleTimers[source] = nil end) chatGPT can write all kinds of functions, it's amazing
    1 point
  41. Thanks IIYAMA, FindRotation3D worked for the getting rotation. Did not achieve the desired result with a rocket projectile (19) though. Even after rotating it directly at point_B the projectile eventually starts heading out in a different direction, not exactly sure whats up with that. I think an easy way to fix that is using createObject along with moveObject and stuff, but in this case, what should I use to properly send projectiles from point A to point B since createProjectile only has starting position arguments to work with?
    1 point
  42. I have this problem too, is there any way to get a good answer?
    1 point
  43. Não oferecemos suporte para scripts de terceiros, lamento. Entre em contato com o autor do resource e peça uma correção. Além disso, a maioria dos elementos do HUD estão com tamanho e posição fixa, o que dará alteração em resoluções diferentes. Sobre esse problema de distorção, isso acontece por uma questão de proporção (aspect ratio) e não de resolução. Como ele foi feito na resolução 1600 x 900 (proporção 16:9), isso significa que qualquer resolução que esteja nessa mesma proporção irá funcionar normalmente (1280 x 720 também é proporção 16:9, por isso que funciona normalmente nele também). Porém a resolução 800 x 600 tem proporção 4:3, ela é mais quadrada. O que causa distorção no HUD mesmo usando posições e tamanhos relativos. Para corrigir isso, existe a função DxSetAspectRatioAdjustmentEnabled que deve ser chamada dentro da função do onClientRender e antes das linhas do dxDraw.
    1 point
  44. We are planning to open source Sphene around Q4 of 2025. I'd like to set some expectations: Sphene is still heavily in development, by no means will Sphene be something you can just run and enjoy on a server. While a lot of features have been added to Sphene, a lot of the storyline is not fully playable yet. There are still a lot of glitches, and missing functionality. You WILL run into major issues. We are working through some of the last hurdles that kept us from open sourcing the project. We will only provide support on getting Sphene to run to those with clear intent to help its development. By open sourcing the project later this year, we hope to accelerate its development. We hope to work together as a community to better understand how the underlying game code operates and how to implement missing functionality into Sphene. We look forward to working together with all of you!
    1 point
  45. What is GizmoPack? it is a modular package of objects that extends the mapping capabilities of the MTA. Update List: List of films from updates and presentations: Download link: GizmoPack Legacy (Latest version) Authors: THEGizmo (Modeler, the main originator) i XeN (help with the project, editor of the texture editor)
    1 point
  46. Correct me if I'm wrong but I'm assuming all you're wanting here is that when the player hits the hunter then he gets the hunter bonus ? If this is the case then the only issue with your code is that in your getHunter function, you need to change addWinnerBonus to addHunterBonus
    1 point
  47. В первую очередь тема будет полезна всем, кто только что вошел в скриптинг. ВНИМАНИЕ! Изучение языка Lua должно быть первым шагом в MTASA скриптинге, а не вторым или третьим, поэтому в этой теме я буду в первую очередь делать упор на русские доки по Lua, и во вторую - на доки по MTASA скриптингу. Желающие могут делиться ссылками, которые потом будут добавлены в этот пост. У новичков, обычно, возникают вопросы по языку Lua и по его применению в MTASA скриптинге. Но литературы на русском языке на этот предмет не так уж и много. Все, что касается скриптинга, можно узнать из вики - https://wiki.multitheftauto.com/. Там есть и русские документы, но их все равно мало по сравнению с английской версией, поэтому непонятные моменты можно уточнить здесь на форуме. Ну а что касается самого языка LUA - читаем дальше. Итак начнем просматривать нашу онлайн библиотеку.. Ссылки от юзера MX_Master, т.е. мои рекомендации : --- http://lua.ru/ http://lua.ru/doc/ Вторая ссылка - перевод официального справочника по языку Lua на русский язык. Очень мало пояснительной инфы и перевод местами сильно косноязычный. Дешево и сердито. Помогает уловить общий смысл, но тестировать все придется самому, т.к. примеров немного. http://ilovelua.narod.ru/ http://ilovelua.narod.ru/about_lua.html http://ilovelua.wordpress.com/ Ресурсы одного и того же автора. Все объясняется в самой что ни на есть доступной форме. Даже первоклассник программирования сможет это понять (: Вторая ссылка дает практически 70% того, что должен знать MTASA скриптер по языку Lua. Рекомендую. http://w3d.wiki-site.com/index.php/%D0%9E%D1%81%D0%BD%D0%BE%D0%B2%D1%8B_Lua Основы Lua. Простые и понятные примеры. Рекомендую. http://ru.wikipedia.org/wiki/Lua Куда же мы денемся без инфы в википедии. http://ltwood.wikidot.com/scripting:lua-lang Весьма понятный мануал. Примеров также много как и в официальном справочнике. http://steps3d.narod.ru/tutorials/lua-tutorial.html Мануальчик с небольшим игровым уклоном, в котором даже больше (вроде) инфы чем в официальном справочнике. Описания функций и примеры к особо непонятным функциям и конструкциям. http://netsago.org/ru/docs/1/4/ Введение в Lua. Небольшое. http://www.script-coding.com/Lua.html Введение. Общее инфо. Много простых примеров. http://xgm.ru/page/400 Немножко про LUA. http://luagml.ucoz.ru/doc/lua/lua.html Своеобразная копия http://lua.ru/doc/. Возможно, кому-то такой вид больше нравится. Cсылки от юзера Kenix : --- http://www.rldp.ru/mysql/mysqldev/glava04.htm - Нормальный перевод официального справочника на русский язык. Рекомендую. Примечание: в этом доке версия Lua 4.0, а не 5.1 как в МТА. Поэтому многие вещи могут отличаться. http://cortexcommandru.3dn.ru/forum/9-801-1 - В середине вся суть. http://progopedia.ru/language/lua/ http://big.vip-zone.su/doc/devel/lua.xml Cсылки от юзера CrazyDude : --- http://gta-rating.ru/forum/showthread.php?t=1370 Cсылки от юзера Kernell : --- Регулярные выражения в Lua http://www.lua.ru/forum/posts/list/57.page#408 Объектно-Ориентированное Программирование (ООП) в Lua http://mydc.ru/topic1429.html Основы декларативного программирования на Lua http://habrahabr.ru/blogs/development/77413/ Cсылки от юзера Elengar : --- Lua за 60 минут. http://zserge.wordpress.com/2012/02/23/lua Cсылки от юзера nikitafloy : --- http://www.cronos.ru/kb-cronospro-lua.html А еще у нас в подфоруме есть целый раздел с туторами по Lua/MTASA: viewforum.php?f=153
    1 point
  48. Info: After finding the awesome "snow" script by R3mp i just had the idea to make a winter map ..and here it is: a winter version of my "green valley" map with snow textures and falling snow(thanks a lot to R3mp who made this script and allowed me to use it). Features: - falling snow (by R3mp) - custom snow textures for objects and skins (by SATAN) Supported Gamemodes: - Stealth Download: https://community.multitheftauto.com/index.php?p=resources&s=details&id=611 ------------------------------------------------------------------------------------------------------------ Check out R3mp's resources: https://community.multitheftauto.com/index.php?p=profile&id=454
    1 point
×
×
  • Create New...