Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 19/10/24 in all areas

  1. 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
    20 points
  2. 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
  3. Hi. Here's my latest creation in MTA:SA, an NPC piloted Helicopter Tour activity. Allowing for as many helicopter paths as you want, running at 1-1.5% client CPU. You can setup a flight if one is not already setup, and then your friends or other players can pay to join the flight, allowing a maximum of 4 players to be flown on a selected path around San Andreas. This resource was made possible by @IIYAMA's resource: "servertimesync" @TMTMTL
    6 points
  4. In-Game Lua Editor for MTA:SA - Enhanced Release Hey MTA community! Updated version of the complete Lua code editor that runs directly inside MTA:SA. Edit your server scripts in real-time without leaving the game or dealing with FTP uploads. This is a full development environment with professional features, not just a basic text editor. Complete resource management system included. Key Features: - Command: /editor to open the editor - CodeMirror syntax highlighting Visual Studio Code quality - Real-time file editing and saving - Resource browser with search functionality - Multi-language interface: English, Spanish, Portuguese, Turkish and Arabic - Dark professional theme - Whitelist/Blacklist security system - Admin ACL permission controls - Completely offline no external dependencies - Instant server updates without restarts NEW Resource Management Features: - Create new files directly in editor (client/server/shared) - Delete files with confirmation dialogs - Full meta.xml editing support - Auto meta.xml updates when creating/deleting files - Visual file indicators with color coding - Enhanced security controls - In-panel notification system What it does: Browse all your server resources, create new scripts, delete unwanted files, edit meta.xml configurations, and modify code with proper syntax highlighting. Complete development workflow from within the game. Requirements: - IMPORTANT: Add "Admin" ACL permissions to the resource - Configure your admin group in permissionACL variable - Set up whitelist/blacklist for resource access control - Make sure your account has admin ACL permissions to access the editor Installation: 1. Add resource to your server 2. Give "Admin" ACL permissions to the resource 3. Edit permissionACL variable in editorS.lua with your admin ACL group 4. Start resource and use /editor command Why Im sharing this: I believe in giving back to the MTA community. This enhanced tool has saved me countless hours of development time with its new resource management features. Download it, try it out, and let me know what you think. More contributions coming soon. Developed by BranD - Trident Sky Company Repository in case you want to help me improve the resource https://github.com/TridentSky/LuaEditorMTA/ I appreciate it if you support me by joining my community discord: https://discord.gg/mjWuv7Zbyh DOWNLOAD: https://community.multitheftauto.com/index.php?p=resources&s=details&id=19012 VIDEO DEMO NEW VERSION:
    5 points
  5. Lua Metatables Guide Introduction Hello, I’m Shady, and I’m here with a new tutorial. At the bottom of this section, in the credits, you will find all the links to my other tutorials. Those should be your first priorities. I have prepared a tutorial that will help you explore metatables at an advanced level and set you on your way,The Lua programming language has gained popularity for its simple yet powerful syntax, making it a common choice for both game development and general-purpose programming. This guide will enable you to delve deep into the metatable feature of Lua and demonstrate how to apply object-oriented programming (OOP) concepts using metatables. Metatables are used to customize the behavior of tables in Lua and manage complex data structures. In this guide, we will focus on the following topics: What is a Metatable?: We will understand the concept of metatables and why they are used. Creating Classes with Metatables: We will create a simple Vector class and explore operator overloading methods. Inheritance: We will learn how to implement inheritance and override functions using metatables. Complex Scenarios: We will create more complex structures, such as a character class, using metatables in real-world applications. By the end of this guide, you will learn how to effectively utilize metatables in Lua, enhancing the functionality of your games or applications. So, let's step into the world of Lua metatables! What is Metatable? A metatable is a special table used to change the behavior of tables in Lua. With a metatable, you can inherit between tables and perform special operations. Creating Metatable... First, we need to create a metatable. We can define it as a simple table. myMetatable = {} Using Metatable in a Table To assign a metatable to a table, we use the setmetatable function myTable = {} setmetatable(myTable, myMetatable) Operator Overloading with Metatable Metatables can also be used for operator overloading. For example, let's define the __add function for addition. myMetatable.__add = function(t1, t2) return t1.value + t2.value end Adjusting the Values of Tables We can use the __index and __newindex methods in the metatable to set the values of tables. myMetatable.__index = function(table, key) return "Key not found: " .. key end myMetatable.__newindex = function(table, key, value) rawset(table, key, value) end Example of Use myTable.value = 5 local anotherTable = { value = 10 } setmetatable(anotherTable, myMetatable) local result = myTable + anotherTable print(result) -- 15 Metatable and Mapping Functions Metatables are used to provide functionality and inheritance relationships between tables in Lua. With special keys provided by the metatable, we can map between tables. Operator overloading functions like __index, __newindex, __add, and __sub allow us to change the behavior of tables. An Example in Depth: Vector Class Below, we will create a Vector class. This class will support addition, subtraction, and other vector operations. -- Creating the vector metatable Vector = {} Vector.__index = Vector -- Create a new vector function Vector:new(x, y) local vec = setmetatable({}, Vector) vec.x = x or 0 vec.y = y or 0 return vec end -- Vector addition function Vector:__add(other) return Vector:new(self.x + other.x, self.y + other.y) end -- Vector subtraction function Vector:__sub(other) return Vector:new(self.x - other.x, self.y - other.y) end -- Calculate vector length function Vector:length() return math.sqrt(self.x^2 + self.y^2) end -- Usage example local v1 = Vector:new(3, 4) local v2 = Vector:new(1, 2) local v3 = v1 + v2 print("Sum Vector:", v3.x, v3.y) -- 4, 6 print("Length of Vector 1:", v1:length()) -- 5 Metatables control the operations listed next. Each operation is identified by its corresponding name. The key for each operation is a string with its name prefixed by two underscores, '__'; for instance, the key for operation "add" is the string "__add". The semantics of these operations is better explained by a Lua function describing how the interpreter executes the operation. add": the + operation. The function getbinhandler below defines how Lua chooses a handler for a binary operation. First, Lua tries the first operand. If its type does not define a handler for the operation, then Lua tries the second operand. function getbinhandler (op1, op2, event) return metatable(op1)[event] or metatable(op2)[event] end By using this function, the behavior of the op1 + op2 is function add_event (op1, op2) local o1, o2 = tonumber(op1), tonumber(op2) if o1 and o2 then -- both operands are numeric? return o1 + o2 -- '+' here is the primitive 'add' else -- at least one of the operands is not numeric local h = getbinhandler(op1, op2, "__add") if h then -- call the handler with both operands return (h(op1, op2)) else -- no handler available: default behavior error(···) end end end "sub": the - operation. Behavior similar to the "add" operation. "mul": the * operation. Behavior similar to the "add" operation. "div": the / operation. Behavior similar to the "add" operation. "mod": the % operation. Behavior similar to the "add" operation, with the operation o1 - floor(o1/o2)*o2 as the primitive operation. "pow": the ^ (exponentiation) operation. Behavior similar to the "add" operation, with the function pow (from the C math library) as the primitive operation. "unm": the unary - operation. function unm_event (op) local o = tonumber(op) if o then -- operand is numeric? return -o -- '-' here is the primitive 'unm' else -- the operand is not numeric. -- Try to get a handler from the operand local h = metatable(op).__unm if h then -- call the handler with the operand return (h(op)) else -- no handler available: default behavior error(···) end end end "concat": the .. (concatenation) operation. function concat_event (op1, op2) if (type(op1) == "string" or type(op1) == "number") and (type(op2) == "string" or type(op2) == "number") then return op1 .. op2 -- primitive string concatenation else local h = getbinhandler(op1, op2, "__concat") if h then return (h(op1, op2)) else error(···) end end end "newindex": The indexing assignment table[key] = value. function settable_event (table, key, value) local h if type(table) == "table" then local v = rawget(table, key) if v ~= nil then rawset(table, key, value); return end h = metatable(table).__newindex if h == nil then rawset(table, key, value); return end else h = metatable(table).__newindex if h == nil then error(···) end end if type(h) == "function" then h(table, key,value) -- call the handler else h[key] = value -- or repeat operation on it end end "call": called when Lua calls a value. function function_event (func, ...) if type(func) == "function" then return func(...) -- primitive call else local h = metatable(func).__call if h then return h(func, ...) else error(···) end end end Override and Inheritance We can achieve inheritance using metatables in Lua. By creating subclasses and using the superclass's metatable, we can override some functions. -- 2D Vector Metatable Vector2D = setmetatable({}, Vector) Vector2D.__index = Vector2D -- Create a new 2D vector function Vector2D:new(x, y) local vec = Vector:new(x, y) setmetatable(vec, Vector2D) return vec end -- Rotate the 2D vector function Vector2D:rotate(angle) local cosA = math.cos(angle) local sinA = math.sin(angle) local newX = self.x * cosA - self.y * sinA local newY = self.x * sinA + self.y * cosA return Vector2D:new(newX, newY) end -- Usage example local v2d = Vector2D:new(1, 0) local v2dRotated = v2d:rotate(math.pi / 2) print("Rotated Vector:", v2dRotated.x, v2dRotated.y) -- 0, 1 More Complex scripts Metatables can be used to model complex data structures and behaviors. For example, we can create a class representing the attributes of a game character. -- Character metatable Character = {} Character.__index = Character function Character:new(name, health, power) local char = setmetatable({}, Character) char.name = name or "Unknown" char.health = health or 100 char.power = power or 10 return char end function Character:attack(target) target.health = target.health - self.power print(self.name .. " attacked " .. target.name .. "!") end -- Usage example local hero = Character:new("Hero", 150, 20) local monster = Character:new("Monster", 80, 15) hero:attack(monster) print(monster.name .. " remaining health: " .. monster.health) -- 60 NOT : Metatables form one of the foundations of object-oriented programming in Lua, allowing you to create complex structures and functionalities. In this guide, you learned how to create classes using metatables, inherit from them, and perform operator overloading. Metamethods: metatables and metamethods offer powerful functionality that enhances the flexibility and behavior of tables. Metatables allow you to customize the behavior of tables, while metamethods are functions that define this behavior. This tutorial will explore the fundamentals of these concepts with fun and practical examples,Metamethods are special functions defined within a metatable that get triggered when specific operations occur. Credits and Additional Resources Official Lua Documentation; Explore the official Lua documentation for comprehensive details on Lua features, including metatables. https://www.lua.org/manual/5.4/manual.html#2.4 https://www.lua.org/manual/5.1/manual.html#2.8 Lua 5.1 Reference Manual Lua 5.4 Reference Manual Metatable Events https://devdocs.io/lua~5.1/
    5 points
  6. 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
  7. -> 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
  8. 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!
    3 points
  9. Hey, here's something I started creating a few years ago now but hit a roadblock with. I decided to pick it back up again recently and see what I could do, and here's where I'm up to with it. This script is still a W.I.P.
    3 points
  10. 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
  11. 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
  12. 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
  13. Link: https://payhip.com/TheDarkQ
    2 points
  14. 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
  15. Hey everyone! I've completed a character customization script that works with all gamemode and easy to setup, and I'm excited to share its features! Key Features: Male & Female character models Loads character data directly from SQL Ensures data sync for real-time updates Smooth character loading in the selection screen Extensive customization options, with a wide variety of textures for male and female characters These features let you create a truly unique character with a broad range of personalization options! Additional Features: Integrated clothing store Accessories store Barbershop for detailed character styling Future Plans (V2): Specialized models for Police, Medic, and Mechanic characters (both Male & Female) Important Note: This script isn’t free. If you’re interested or have any questions, feel free to reach out for more information. Thanks for checking it out, and stay tuned for updates as I plan to add even more customization options! Discord: .undrr Discord: .undrr
    2 points
  16. What is Reinc Online? Reinc Online is a full-featured isometric MMORPG playable inside the vanilla MTA client. The game includes everything you’d expect from an MMO action RPG. Classes, talents, abilities, quests, monsters, items, crafting, boss fights, PvP, and much more. Reinc Online is inspired by great ARPGs out there, like Drakensang Online, the Diablo series, Lost Ark, Last Epoch, and others. If you’ve played any of these, you’re already familiar with what Reinc Online can offer, but inside MTA. If this post seems interesting, please make sure to check out the trailer video about the server: Please note that this is a very early access version of Reinc Online. Bugs, missing features, balancing issues, and occasional server shutdowns are likely to occur. Due to the complexity of the project, there may also be unforeseen issues that are expected to be revealed after the release. Also, keep in mind that I am working on this project alone. If you encounter any bugs or errors, please report them using the in-game reporting system or on the Discord server.
    2 points
  17. I don't need to describe Reinc online, because everything is as it appears in the video, so words cannot vouch, I can say that it is the best project and presenter ever in MTA, so a big applause to Danihe as a masterpiece
    2 points
  18. @Dadinho Só é possível mexer no chat nativo para você mesmo. Não é possível alterar via script. Caso queira, vá no menu ESC > Opções > Interface > Lá em baixo em Layout > Então vc tem acesso às opções de posição e tamanho dele, além de fonte.
    2 points
  19. Quick update, project is very much alive and loads of progress has been made since this topic was made. I'll add a new comment soon outlining the work we've done over these 6 years. I usually just do updates on our Discord server but realized that there's possibly a group of people out there that might be trying to get their updates on the project here.
    2 points
  20. Hi!, my name is Laxante101, I'm a .Lua developer, And today I will try to help you understand SQlite WHAT IS SQLITE? SQLite is a relational database management system (RDBMS) that does not require a separate server to function. Unlike database systems like MySQL or PostgreSQL, which need an active server process, SQLite is "embedded" (that is, the database is stored in a local file on disk), and operations with they are made directly within the program that uses it. Luckily for us, SQLite is already built into the MTA. This means that you can use SQLite databases directly in your MTA Lua codes without having to install anything additional "external" or configure an external database server. SQLite support is native to MTA, facilitating the use of databases for persistent storage of in game information. It is normally used on servers that do not use the login panel, they use SQlite so their information that would be saved in accounts is now saved in the .db file. Or on servers that don't use the original game money, they create other types of “money” like diamonds, stars which are all saved every day, well that's usually the case IMPORTANT DETAILS • Simplicity: Doesn't require anything other than a notepad • Portabilidade: Data is stored in a single .db file, which makes backup and migration easier. SQlite Global Structure Connect to Database with dbConnect Execute Queries using dbExec to modify data and dbQuery to recover data. 3. Manipulate Results with dbPoll and process the returned data. Connection to the Database the database file can be created automatically when connecting. The database file is saved in the server's root folder. local db = dbConnect("sqlite", "storage.db") or if you want to automatically create a folder for your file, or to save your .db files, if it is not created it creates it automatically, if it is created it just puts the file in the path. local db = dbConnect("sqlite", "db/storage.db") in this case the "db" folder will be created Creating Tablese data, you first need to create tables in the database. This is done using normal SQL commands like consulta local = [[ CREATE TABLE IF NOT EXISTS players ( id INTEGER PRIMARY KEY AUTOINCREMENT , name TEXT , score INTEGER ) ]] dbExec ( db , query ) Create a player table if it doesn't already exist In this case, we are creating a players table with three columns: ID Name Score Table Structure TEXT: STRINGS INTEGER: STORAGE NUMBERS REAL:STORES FLOATING POINT NUMBERS BLOB: STORES BINARY DATA (images, files). NULL: NIL VALUE If you don't understand what a string or Boolean values are, learn about data types VIDEO HERE Entering Data To add data to the database we use the SQL command INSERT INTO function AddPlayerLX1(name, score) local query = "INSERT INTO jogadores (name, score) VALUES (?, ?)" dbExec(db, query, name, score) end AddPlayerLX1("juninho", 100) The INSERT INTO command inserts a new player with the name "juninho" and score 100 into the players table. Note: The question marks (?) are placeholders for the values that will be passed to dbExec. This helps prevent SQL injection. Deleting Data To remove data from the database, we use the SQL DELETE command DELETE function DeletePlayerLX2(name) local query = "DELETE FROM players WHERE name = ?" dbExec(db, query, name) end DeletePlayerLX2("juninho") Error Handling It is important to verify that database operations were successful. MTA doesn't automatically return detailed errors other than "/debugscript (1, 2, 3)" so let's add checks. function AddPlayerLX3(name, score) local query = "INSERT INTO jogadores (name, score) VALUES (?, ?)" local sucess = dbExec(db, query, name, score) if sucess then outputDebugString("Sucess.") else outputDebugString("Error.") end end IF SUCESS THEN the success variable stores the result of the dbExec function. If the SQL command execution was successful (i.e. the player was added to the database), success will be true. If success is true, the code inside the if block will be executed. else If the success value is false (that is, if the player's insertion fails for some reason, such as an error in the database connection or SQL query), the code inside the else block will be executed Optimizations and Best Practices Optimizations are great for your day-to-day life as a developer, this makes your code more beautiful, less likely to give you server overload errors, etc... Remember to use dbFree to flush queries after use, especially if you are not using dbPoll. local LX4 = dbQuery(db, "SELECT * FROM players") dbFree(LX4) There are several ways to create clean code, I left just one of them Let's be clear: Since the SQLite database is a flat file, you can back it up by simply copying the .db file. To restore the database, simply replace the old file, this is a big advantage of using SQlite instead of using external databases. OBS: All codes were made based on an example of player name and id points, not made in a real project. (just to make it clear That's all I remembered, if there's anything I didn't make clear here you can say it and I'll edit it or respond to you
    2 points
  21. Ayy I used to work on MTA wayyyyy back when it started and everyone was figuring it out. With all the reverse-engineering and hacking, coding etc it was actually a bit of an adventure. I started working on a multiplayer GTA myself because I wanted it so bad (ill equipped but determined), and ended up joining with some of the early team. Really proud of everyone getting it together and keeping it going. I remember when we first got shooting working and we were all shooting each other outside that Vice City club that was the default spawn point for a while. I'll always remember the feeling of being the first people that ever played multiplayer GTA... wanting it so bad we manifested it. - Personally I just kept programming and doing random game dev stuff, I released a game made in Unreal Engine using the voxel plugin: https://store.steampowered.com/app/1079300/Goblin_Keep/ I felt incapable of supporting the game after release but I did it for the same reason at MTA, I just wanted to do it. Thanks to the team for keeping this going, who all did a lot more work on it than me
    2 points
  22. Hello, Effective immediately it's no longer possible to: - Report players to AC team - Appeal any global bans Please do not attempt to report players to MTA staff team, or appeal any bans. A) If you need to report a player, please contact admins on the server they are playing on. Server admins should pay the amount of attention that staff in other multiplayer games (with hosted servers) typically pay, and owners should be mindful of script security and scripted anti-cheat solutions to fill in some cracks that started to be created over the past few years, and continue to do so as a result of lowered manpower within the MTA AC team. B) Appealing bans is no longer needed as permanent bans have been removed last month, and any of the handful of cases not covered aren't meant to ever be appealed, without exception. Temporary bans were never meant to be appealed, although some staff member's intepretation of that (while redirecting users) has varied - if you got a temporary ban, wait for it to expire and surely you got a feeling of what not to do/not to run next time while MTA is opened, to avoid getting banned again. AC team is actively monitoring the reliability & integrity of standard detections that may lead to temporary bans, that's one of the things its manpower still allows it to do, so you can see why we're confident to go this route - any leakage of appeals in places they don't belong/users contacting MTA about their bans anyways, our experience has learned is 99.9% users that know why they got banned but won't accept it and are persistent.. as before, all such inquiries won't lead anywhere, but especially now we said "No appeals anymore" there will be zero interaction and certain behaviors may also lead to removal from the respective platforms where inquiries are made in a persistent or disruptive fashion. We don't want to come across as rude, but there was simply too much spam and people not accepting no for an answer. Finally, regarding cheaters - the level of sophistication that our AC has reached due to years of playing a cat mouse game with cheaters, is a hugely raised border for cheats to be made and will continue to do so (as methods that were used in the past were patched as per the spoilered text in this topic, so they can't be re-used). However, with the loss of dedicated AC developers within AC team, comes that we can no longer keep up as before, this situation has existed for the past 2 years so as of this post nothing is abruptly changing, it's just the point of admitting we won't be tryharding as much as in the past to be known as totally cheater-free game, a reputation we held for long. If you look around in the gaming industry, you'll see that we held up pretty well in comparison, but the cheating industry (due to toxicity demand) has also hardened, and after 20 years we are low on manpower which is fully understandable. We will continue to bring AC improvements and get rid of emerging cheats and cheaters, but at our own pace, without external pressure or too high community expectations, from now on everything is on a best-effort basis and the point is that there may be periods during which we can't make any waves due to manpower constricts. You can see that this topic intends to lower your expectations and respect the amount of free time we (as volunteers) are able to invest, and get off our backs for things being different compared to some years ago. We're also OK to restrict ban appeals and player reports so we can delegate all of the manpower that's left on our new strategy, breaking cheats (patching them) and just preventing them from working to begin with, instead of permanently banning cheat users and having to deal with them "regretting" in ban appeals. We are also OK to restrict reporting cheaters as our focus shifts to breaking the cheats, and to get the required information to break one, we have our own methods and channels so much that we don't need any sort of reports. Due to the state of anticheat and heuristics, we always have a good picture of abnormalities and what cheats are doing, so the main limiting factor is manpower to get to work with what we have & know. Enjoy the game, and remember that player desires make the market for servers - so if you see too many cheaters, ask server owners to invest their time in training server admins to be on the lookout for cheaters and ban them, script protection/alert systems, and after all, have some peace of mind because cheating in MTA will always be a raised border and still won't be as common as in directly competing projects. // Note: using the bug bounty program for security bugs remains possible, end user security will always be among MTA team's top priorities. The program has been frozen for cheats, though, and documentation will soon reflect that.
    2 points
  23. To take away some confusion, understand that the changes being announced here are mostly focussed on cutting out the 'community front' of AC team operations, so that we can optimize limited manpower and rebalance expectations for our users to accept there will be periods we can't make waves, if you were able to move yourself into our perspective on how people always want everything solved, fixed, sorted out immediately on their whim, and how persistent they are in that (and in most cases bring something misconceived/invalid, after which they can't even be convinced otherwise or that would take from our time disproportionally), you'd be straight out scared and quickly stressed out. OP was clarified by adding in this segment 1 day after the topic was made: We will continue to bring AC improvements and get rid of emerging cheats and cheaters, but at our own pace, without external pressure or too high community expectations, from now on everything is on a best-effort basis and the point is that there may be periods during which we can't make any waves due to manpower constricts. You can see that this topic intends to lower your expectations and respect the amount of free time we (as volunteers) are able to invest, and get off our backs for things being different compared to some years ago. We're also OK to restrict ban appeals and player reports so we can delegate all of the manpower that's left on our new strategy, breaking cheats (patching them) and just preventing them from working to begin with, instead of permanently banning cheat users and having to deal with them "regretting" in ban appeals. We are also OK to restrict reporting cheaters as our focus shifts to breaking the cheats, and to get the required information to break one, we have our own methods and channels so much that we don't need any sort of reports. Due to the state of anticheat and heuristics, we always have a good picture of abnormalities and what cheats are doing, so the main limiting factor is manpower to get to work with what we have & know. After all, cheating on MTA will not be left alone, and AC team will disrupt it and raise the border even more whenever manpower allows it to do so. Cheaters should realize that their fun may come to an end at any unexpected moment, and that if they're too used to being able to cheat, they will be very upset to have to adapt to playing normally for as long it takes the cheat devs to catch back up to us again.
    2 points
  24. Hello guys! So after many years of OwlGaming going down, is there any public and published English Roleplay server like OwlGaming used to be? that has a playerbase so we can play on? This is the best server and best game I've played for years and I'm really looking for something good, if you guys could help I'd be more than happy.
    1 point
  25. Vending Machine script inspired from the singleplayer version. Player health will be refilled a bit after each drink. It verifies the money and responds based on that. Works with every vending machine in the map. Video to explain it more: For more information, feel free to join my discord server: https://discord.gg/Nex7e6JUhe Discord account is mehdi4664
    1 point
  26. Looks great, I can definitely say it’s a solid script. There are just a few small things that could make it even better if improved. For example, you could add a dialogue system with Arms Dealers, letting players buy weapons through that. Maybe also throw in some 3D sound effects when purchasing a weapon it’d give the whole thing a richer, more immersive feel.
    1 point
  27. cursorX, cursorY = getCursorPosition() -- showCursor(false) <-- Use Before Then ... -- showCursor(true) <-- Use After Then screenX, screenY = guiGetScreenSize() setCursorPosition(cursorX*screenX, cursorY*screenY)
    1 point
  28. Thanks for your information, IIYAMA!
    1 point
  29. 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
  30. 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
  31. Hello, I can't log into the MTA Province server, the first server, all the others are working, I wrote to the technical specialist. They couldn't help us, so they sent me to you. The error name is CD50. Tech support informed me that my serial number matches the number of another player. I have reinstalled Windows 10, 11 and their different versions from pro to enterprise several times, nothing helped. Rebooting the Internet router, reinstalling the game in different directories and on disks also did not help. serial - F413477538AD07BD3D1F52281F71F1E4
    1 point
  32. Please post an image with the error you're receiving when trying to connect to servers, so we can better understand your issue.
    1 point
  33. Please use English when posting outside language-specific sections, thanks!
    1 point
  34. 1 point
  35. Welcome to our forums, Ahmed! We're sorry you had a bad experience, but we can't handle server bans, so the only thing you can do is find another server to play on. I highly recommend checking out the following topic, as it mentions many well developed, sophisticated and popular servers where you are guaranteed to have a better experience. https://forum.multitheftauto.com/topic/133335-recommended-mtasa-servers/
    1 point
  36. When use the keyword break, it jumps from: for i, p in ipairs(players) do if getElementData(p, "Player.ID") == tonumber(ID) then local x, y, z = getElementPosition(player) setElementPosition(p, x, y, z) break -- FROM HERE else outputChatBox("#000000<#910e07Wise#ffffffRolePlay#000000> #ffffff Rossz ID-t adtál meg.", player, 255, 255, 255, true) end end -- TO HERE The following code prints: A, D for i=1, 10 do if true then print("A") break print("B") else print("C") end end print("D") Run here to test: https://onecompiler.com/lua/42zdspdkb Not sure what exactly the problem is that you are facing, but in your current code you could also use the return keyword to immediately stop the function.
    1 point
  37. Bom dia, tudo bem @Dadinho? Bom, eu dei uma pesquisada sobre e infelizmente não é possível alterar aquele chat por script... (digo o nativo rs) apenas fazendo um novo utilizando funções dx ou até mesmo gui (não recomendo) Ou você pode alterar apenas pra você nas configurações do próprio MTA local... (local onde mudar)
    1 point
  38. Thanks man! We done some multiplayer testing last night and all's well so just a few last things to polish up Thank you! It's possible at the expense of CPU usage, since it's "simulating" physics of upto 16 balls at any time, the longer you are moving them, the higher the CPU usage.
    1 point
  39. Hello everyone! We have prepared a special gift for you to celebrate Multi Theft Auto's 20th Anniversary! Here is an exclusive interview with IJs (also known as IJsVogel), the founder and first developer of the Multi Theft Auto project. Read on to see his thoughts on the project in retrospective. Note: more details about Multi Theft Auto's history and timeline can be found on our Wiki article. What had prompted you to create the very first multiplayer mod for GTA3 - a game that did not offer such a feature out of the box? Wow, it has already been 20 years.. I remember the reasoning behind it very vividly! As I grew up in the 90s I was lucky enough to be surrounded by PCs, early internet and PC games from the very beginning (of myself). I was a very fanatical player of Grand Theft Auto 1 and 2, especially so because these games had a multiplayer mode that I could play at home with my brothers. Then, finally in 2002 when GTA3 came out for PC, I was 13 at the time and completely astounded at the possibilities of this 3D open world version of my favourite game for the first couple of months. After a while, it sinked in that this game was missing any ability at all to play with others, which put a huge dent into my appreciation for the game... At the time, I never really played the storylines of games because it didn't quite fit my youthly attention span (my older brother always left the savegames for me to play) and was usually more into the multiplayer and modding aspects anyway. Two completely coincidental things then sparked the start of an attempt at multiplayer. First, a fake French screenshot was being sent around forums, showing a multiplayer mod for GTA3. This raised my hopes tremendously and I was looking forward to testing this so much. When it turned out to be another hoax, my hopes were in shambles and I began thinking about hacking something together to do it anyway. A screenshot of a fake multiplayer mod in GTA3. Surfaced in July, 2002. Secondly, some coders had just released a trainer/cheat tool for GTA3 including its source code in Visual Basic 5 or 6, which was the only language I knew at that time as I was only 14 by then. I started hacking around with the tool to make a synchronized trainer tool, and figured I might as well synchronize car positions, and a very crude attempt at multiplayer was born and it was dubbed GTA3: Alternative Multiplayer (GTA3AM). It was amazing to see it work, it seemed such a stupidly simple hack! This was the first effective prototype of Multi Theft Auto. A not-so-fake GTA3AM 0.1 Client window, win9x style! February, 2003. Were there other people who shared your idea and wanted to contribute? Was it easy to find them? The initial GTA3AM was posted on a well-known Dutch tech forum, and this raised some attention from people over there. It wasn't so much a conscious decision to find people, people really wanted to contribute and we gathered on IRC, with some people helping out with the website, server donations and coding. This grew organically as the users grew. The first months or so was mostly Dutch techies helping out, including a well-known provider sponsoring our hosting, and after the first year or so the team became very diverse, international and well skilled. I am still very grateful for each and every contributor to this project from the very start and later, also because I was still very young at the time, and the project would not have been able to thrive on my contributions alone. I have had the fortune to meet and work together with some of the most skilled people I've met in my entire life, as well as people who simply loved playing around with our creations. Work on ambitious projects like this typically involves solving tough and unusual problems. What was the most significant one that you and the team had to deal with during your time in MTA? And perhaps, maybe there was a really peculiar problem that you also would like to share? MTA has been an amazing learning curve for me, and I believe many other contributors in its 20 year lifetime, to acquire a very special mix of skills. We have had tremendous fun and also frustration engineering the hell out of all sorts of things, and trying to tie worlds together over a network. There are countless things that were tackled and pioneered (even if only personally) in this project, so it is hard to pinpoint out a single thing. I think one of the most groundbreaking efforts of this project however was to restructure the entire project and release it as open-source to the world. As part of that we spent much effort to restructure everything using git (this upset quite a few developers at the time) and published it in 2009 or so on GitHub when it was still in its infant stage (GitHub even mentioned us on their blog at the time). A bit messy in MTA:SA Racemod internal tests. Some time in the second half of 2005. If you had a chance to start this project again, would it be closed-source as it initially was, or would you prefer it to be open-source like it is now? It would certainly be open-sourced again, probably as early as possible. The facilities for open source projects are much, much better now than 20 years ago as well. The move to GTA:SA kind of left the multiplayer mods for GTA3 and GTA:VC in the dark. While there were some alternative mods developed for these games, they did not really leave a lasting impact in the long run. Have you or the rest of the team ever considered bringing back the support for GTA3 or VC after MTA:SA DM 1.0 was released? I do not think there was ever a strong will to revive the GTA3 or GTA:VC versions, because GTA:SA by all means had a better and more capable engine. Perhaps in today's open source world, where contributors are easy to find, it could have had a better chance. My personal opinion (or fantasy) at the time was to "just" build our own game behind it instead, but that obviously never took off. Development build of MTA:VC Blue. Some time in the second half of 2004. What in your opinion are the strongest points of Multi Theft Auto (be it the original 0.x series or MTA:SA)? What do you think the project especially succeeded in? The critical mass of players and contributors, that never seems to die out, and it keeps surprising me. The incredibly challenging technical issues we have had to solve (and still do), sometimes from the ground up. This makes for a very exciting sandbox to work in as a developer or hacker. And in contrast, do you feel there are any shortcomings in MTA? I think one of the missed opportunities in MTA is that we could have developed a bigger framework or other products on top of all the codebase we had written. A bit messy again, this time during MTA:SA DM internal tests. December, 2007. Thinking back, are there any things in the project that you think you would have done differently nowadays? I would have loved to have set up a much more professional collaboration with the entire team that were around at the time the project was open sourced around 2010, using all the knowledge we had all acquired in the process of making MTA:SA 1.0 when it was still very hot. With the knowledge on startups that I have now, I realize that had I been 5 or 10 years older, I might have had some better idea on how to take it to a level to possibly develop our own game(s) or framework on top of it. But alas, for MTA's sake it turned out good either way! The MTA Community is very large these days and scattered across all continents, but that was not always the case. What was the community like back in your time? As with most (modding) projects you usually start out with a very niche audience. For MTA, this was a direct result of me posting on a Dutch tech forum and as a result, the initial contributors in the first months were mostly (if not all) Dutch and Belgian. With the GTA series obviously being a hit in the Western world, more people wanted to contribute (and play). Nearly all of them came from the US, UK, Central and West Europe and the Nordic countries, with a few notable exceptions. I think this pretty much mirrored the demographics of the GTA series themselves. Let's race! Beta tests of MTA:SA DM. December, 2007. I have noticed that you have been involved with various tech projects after retiring from MTA. What are you up to currently? Was your experience from working on MTA useful in these projects? Among some other startup adventures in the past years, I currently lead an audio software company called KoalaDSP that develops virtual audio plugins, instruments, effects and algorithms for a bunch of very big companies out there. We started this company around two years ago in Amsterdam after some previous endeavours, and with around 10+ people working on some crazy software being used in music and home studios around the world. But Multi Theft Auto has given me a lifetime passion for video game development, and after many years or scribbles and notes, I have finally found the time and people around me to developing my second (..after MTA) game idea using 90s retro graphics and voxels. I feel quite strongly that my experience with Multi Theft Auto has been a unique and once-in-a-lifetime gift of skill, much adventure and lasting connections with others. I can't quite pinpoint it, but it feels special. I hope that also still holds to this day for any contributors out there. A long-running project like MTA also means a lot of memories. Do you have any fond or interesting memories from your time working on the project that you would wish to share? I have so many memories of my time during MTA, it is hard to pick out something! Apart from the early memories of all the excitement, healthy stress and testing with all these people during the very, very early days, there is something I remember from a bit later: There was a pretty far-fetched and secret clandestine plan from some of our developers to put a live editor into one of the first MTA:SA releases. Like often with our features, it was really a coding challenge, a show of skill. Are you skilled enough to build this crazy thing? They figured that, in order for the community to enjoy using our mod, they needed an engaging way to create content. So they started building a complete editor inside the game. It required a tremendous amount of work, but they kept to it, others started contributing, and it ended up as one of the key features of the entire release! Some say that editor served as an inspiration to other mods, possibly other games afterwards. Internal tests of the cancelled MTA: Orange. April, 2010. To wrap things up, is there anything that you would like to say to current MTA Team members and/or to MTA fans? Thanks for putting your enthusiasm (and many wasted hours of gaming!!) into this amazing project. Props to all the contributors, past, present and future. MTA, the way it's meant to be played! Interviewed by jhxp.
    1 point
  40. MTA tarafındaki bir çok host tarafını denemişimdir ancak şunu söylemeliyimki testlerim başarıyla gerçekleştirildi ve harika bir host sağlayıcısılar, benim tavsiyem sizlerinde bir göz atmasındır.
    1 point
  41. Moving this to ban appeals. @Sandroka please provide your serial. You can do so by launching MTA, pressing the console key (F8 by default) and typing 'serial' (without quotes). Paste the string provided there into this topic. Thanks!
    1 point
  42. Introduction Modding is a term used when modifying components, files and what not, in this particular case modifying game installation files in order to achieve unique results not seen in the vanilla game. GTA:SA is 3D era, where modding the game requires special 3D packages. Older games such as GTA:II uses a 2D engine, which means that modding the game was commonly done with image editing applications. We will cover some aspects of modding game textures and models. This guide intends on introducing those inexperienced with modding and 3D as a whole, on how to obtain 3D software and their recommended tools. It also introduces ways to import and export models, basic workflows for 3ds Max, texturing and creating models. TOC 3D packages, helpful tools and how to obtain them Extracting game assets How each type of game model works Limitations - MTA vs GTA Working with 3ds Max Texturing a game-ready cube 3D packages, helpful tools and how to obtain them There are various applications being used for modding. Although some has more tools available, there really isn't one that tops the others. In this section there'll be lists of a few 3D packages and tools used for modding. 3ds Max, arguably the most used program with the greatest amount of third-party plugins and scripts for various games. For GTA:SA, this program is favored by many modders due to it having 3rd party scripts for dealing with animations, collisions, lighting, modeling etcetera. There isn't much that 3ds Max can't, that other programs can, when it comes to GTA:SA modding. Although this can be expensive to run on a longer term, there are education licenses available which last for 3 years. These do not allow commercial use, and is marked purely as "educational use only". View more. Kam's (vanilla) max scripts, the first official script package for modding GTA:SA with 3ds Max. After the release of his scripts, a lot of others has developed scripts of their own, some of which are more optimized and less prone to issues. Even despite Kam's scripts having overseen issues, it is still to this day widely used for tasks such as, but not limited to; IPL map generation and import, collisions, animations, characters, vehicles, environment modeling. View more. Kam's (2018) max scripts, a modified version of Kam's vanilla scripts for 3ds Max. Notable features that were added are; DK22pac's Normal map plugin support, reflection map support for environment models, 2dfx panel for lights such as aircraft lights or street lamps. View more. The Hero's RW importer/exporter, a modern plugin that works extremely well with vehicles and environment models. Due to its simplified layout it is very easy to get used to. It's far recommended to use for vehicle model import/export due to its quality handling and materials, which are based on RW formats (renderware, the engine GTA:SA runs off). With the plugin using different model material formats from Kam's, it comes with a maxscript to convert scene materials from GTA_MTL to RW_MTL and vice versa, if needed by the modeler. View more. Deniska's max scripts, a pack for various types of GTA:SA modding, some features are obsolete for MTA users due to IPL and IDE modification required. Although, the pack does come with a few tools that may be useful to MTA modders, such as prelight tools to set the vertex colors and illumination to fixed values. View more. DexX's 2dfx export script, a standalone 3ds Max script that exports Omni and Dummy informations to .sae file formats, to then be added to the .dff using RW analyzer. With this script it's possible to integrate lights and particles into custom models, e.g flashing aircraft lights, street lights, fire and smoke, etcetera. With the release of Kam's 2018 scripts, this script is used less as using Kam's may be less work for some cases. View more. Blender 3D, a freeware (yes, completely free, no paid watermarks or any limitations), not as favored by modders throughout the years until recently, where a developer has released his script 'DragonFF' on GTAforums. Although it is WIP, modders has already binned 3ds Max and moved permanently to Blender. Although Blender is free, it actually combines several programs into one, allowing a Blender user to sculpt, paint, do lighting, professional rendering and modeling in one. A recent update in 2019 changes the RMB selection to LMB and UI among other things, making for a potential alternative to 3ds Max. View more (Blender). View more (Blender GTA script) Zmodeler, not as commonly used as the aforementioned programs, although it is being used very frequently by modders in various games, most notably for GTA:games. It does not have support for skinned characters, although it is being commonly used for vehicles, and sometimes environment modeling as well. This is a fairly inexpensive solution, but lacks tools for more broad modding. View more. Sketchup, a 3D application that focuses on architecture. For modding, it is a rather uncommon, though has a free and paid version and can be used for seemingly OK modeling. It does not have access to any 3rd party scripts for GTA:SA, hence its only use is modeling and then exporting model files to then import into 3ds Max or Blender. View more. Photoshop, mainly used for graphic design, but can also produce 3D models, video, GIF and textures for assets. Photoshop is the most favored by modders in regards to working with textures e.g paintjobs and retexturing. Although there are alternative image editors in the market, Photoshop definitely hits the top in terms of usable scripts (user-customized scripts as well) and ease of workflow. View more. DFF Viewer, a 3D graphics engine that is used for visualising GTA:SA models and supports .DFF and .TGA formats. Only single dff's can be loaded at a time. Though this is rarely used by those who has access to 3ds Max and Blender, it is commonly used for troubleshooting/testing work that involves retexturing a model e.g changing the clothing textures of a character. This program is entirely free and available from various GTA modding sites. View more. TXD Workshop, a texture dictionary editor that has been around for years, only since recent years to be succeeded by Magic TXD. Though TXD Workshop may not be the best for setting up TXD files, it has a built-in IMG archive editor, allowing one to browse all of the contents of gta3.img. View more. MagicTXD, a new texture dictionary editor with features for mass exporting .TXD contents from folders into image subfolders, texture compression, mipmaps, resizing textures etcetera. This is broadly used for .txd files and almost took over TXD workshop when it comes to working with texture dictionaries. View more. RW Analyze, a multi-use program with notable features being; ability to lock/unlock game files, add data to game models e.g 2dfx and vertex colors information extracted from other DFF files. View more. Extracting game assets In order to start modding GTA, access to the files is required. The files in question are commonly found in parent files that require some sort of program to open. In this case, TXD Workshop or any IMG editor and optionally Magic TXD for later on will work just fine. The below steps shows one way to extract all models and their texture dictionaries. For IMG editors (e.g Alci's IMG Editor): Open the editor. Under File, select Open. Find gta3.IMG stored in GTA SA directory\models. Highlight the first file in the list, then scroll down to the very bottom and SHIFT+LMB click the file on the bottom. This highlights every file in GTA3.IMG. Right click the list of files and select Export. On the popup window, find and select, or create a new folder on desktop called GTA SA ASSETS. Click enter to proceed. ((For cases where specific files are wanted, use the search field to find the necessary files and export them individually)) For TXD Workshop users: Open TXD Workshop. In the toolbar it says Open IMG. Click this, then find and select gta3.IMG stored in GTA SA directory\models. Highlight the first file in the list, then scroll down to the very bottom and SHIFT+LMB click the file on the bottom. This highlights every file in GTA3.IMG. Right click the list of files, select Extract. On the window, find and select, or create a new folder on desktop called GTA SA ASSETS. Click enter to proceed. ((For cases where specific files are wanted, use the search field to find the necessary files)) Now the folder GTA SA ASSETS contains nearly every .dff, .col, .txd and so on used by the game. Assuming one would like having all of the textures in PNG, DDS, TGA or any other common image format, they may follow the below steps using Magic TXD. Inside GTA SA ASSETS create a new folder named IMAGES. Open any .txd file found in GTA SA ASSETS using Magic TXD. Navigate to the toolbar. On Tools, click Mass export. Export settings are as following. Game root = root folder containing TXD's Output root = folder where images goes Image format = self explanatory With texture names only = exports images directly to folder and duplicate named ones gets replaced by one another Pre-pended with TXD name = exports images with TXD prefix In separate folders = makes new folder(s) for every TXD's contents Hit export. This process may take some time. Note that this process is the same for other .IMG archives such as player.img. There are also .txd and .dff files elsewhere, such as \models\generic\generic.txd, which is the vehicle shared texture dictionary file. How each type of game model works Models used on GTA SA uses different rendering techniques and data hierarchy than others. This section will introduce the features that some models has that others don't. Vehicles: Vehicle model components utilises hierarchies, where each component is linked to a dummy (helper) and each dummy is linked to parent dummies e.g chassis_dummy, for them to be registered in the hierarchy. In order for vehicles to not look flat or cartoon, a few steps are made in the model; Diffuse material is given a grunge texture or AO map, this helps telling the depth of the vehicle as well as giving it a feel of realism, so it isn't just clean. A specular lighting image is applied to the vehicle surface material, giving it a fake shine when looking from certain angles. If the vehicle has hard edges (smoothing), this image can increase the visibility of the normals, retaining its original look rather than being flat without visible difference in geometry. An environment (ENV) map is applied to the vehicle surface material, producing a fake reflection that is animated horizontally as the vehicle travels. Vehicles also has a lot of hardcoded features such as headlights, brake lights, emissive lights, taxi/aircraft lights, rotatable components and dynamic collisions for special vehicles like Forklift. Vehicles are also the only dff models that uses baked collisions, which means they are stored in the .dff itself. Below is a detailed hierarchy used for cars, and special components used by a number of vehicles (click the spoiler). Skin characters: Ped skin characters uses bones (dummy objects) that are connected to each other and linked to the character model. These bones are not visible in-game. In order for the bones to know what part of the 3D model they're responsible for, the skin needs to be rigged. Character rigging for GTA:SA is done by applying weigh on vertices. Using heatmap display, colors go through blue-red, low-high respectively. Values go from 0 to 100. If the value is 0, it means that the vertex is not used for any bone. This can cause issues. If the value is < 100, it means that the vertex is used for multiple bones. This results in smooth animations ingame, as the 3D model transitions smoothly through each bone. If the value is 100, it means that the vertex is only responsible for one bone. Skin rigging is generally something that is being avoided by modelers and makes Skin modeling the most difficult on GTA. Bones are as shown: CJ character: Carl Johnson's 3D model is split into several pieces in order to be compatible with the clothing script used to let the player customize CJ. These models uses a function known as multiclump to support 3 meshes per dff; normal, ripped and fat. This is for CJ's health stats to physically show in-game. Other than multiclump and additional bones, modding CJ skin is essentially the same as any other ped skin. Map environment: World objects .dff contains only single models, though they do support omni and dummy objects for 2d effects. These types of models uses Vertex Colors/Face Colors. This requires the modeler to paint colors onto the model which is then stored in the vertex colors channel (daytime) and vertex illumination channel (nighttime). Although uncommonly used by R*, these models do support reflection maps like vehicles use. Goldfish's modified version of Kam's scripts is excellent for exporting with reflection maps. GTA SA utilises multiple collision archives (.col) for every IPL district, being responsible for all of the world objects' collisions. However, on MTA, collision archives are not supported, so custom collision files are single models per .col. Not every object uses collisions though, some merely has their bounding space. These objects can not be selected with MTA map editor, thus requires additional scripting or modding. Limitations - MTA vs GTA Speaking of native support, MTA currently is behind in several places. Notable features that aren't available on MTA, but on GTA are as following. Item Placement (IPL) - another type of mapping file, but contains a lot more functions such as zones for real-time reflections as seen in interiors. Item definition (IDE) - a file used to but not exclusively, define settings for models, enabling alpha flags, disabling backface cull, enable breakable effect and much more. Limit adjuster - a rework of the game that allows for adding more ID's and bypass common limits. This however is being developed by one of MTA's contributors. There are various limitations such as polys per model, max dimensions for models and collisions, (very) strict size limits for collisions and CPU usage that can easily cause issues for modders. Not to mention the majority of the game data files which most MTA servers likes to force original, else the player won't be able to connect. These limits all has potential solutions being developed as with the limit adjuster. Working with 3ds Max As described above, 3ds Max is without a doubt the most common program for GTA modding. It's also used by professionals within architecture and visualisation and film industry. What's amazing about this program is that whatever is created in 3ds Max can ultimately be added to the game. A modeler made a square - it can get added right away, no adjustments required. That's the charm of 3ds Max. There's no need for additional tools to process the model for it to be compatible with GTA. It is also the primary program that Rockstar's developers used for creating the environment in GTA:SA. At a first glance, the program may seem rather intimidating. The main functions of the program that a beginner should be aware of are listed below. Shows the default home screen with 4 viewports. Left, Top, Front and Perspective. The 3 side ones are Orthographic viewports while Perspective is in regular mode. It is also the most common one to use. Highlighting a viewport and pressing (left)ALT W will full screen the viewport. In order to rotate camera view, the user must click and drag the square in the upper right corner. Its face also tells which side the camera is viewing e.g Top. If one wishes to see viewport statistics such as polygons per model, vertex amount etc., clicking: [ + ] icon on the upper left side > Configure Viewport > Statistics > Total + Selection > Apply > Clicking 7 on keyboard shows the statistics. This feature is extremely useful for modelers who are limited in polygons per model, or simply wants to see how many polys a car is. Common keyboard shortcuts F1: Opens Autodesk help section in new browser tab F2: Displays blue overlay on models F3: Displays models in wireframe F4: Displays edges on models F10: Opens render setup 9: Shows viewport statistics Q: Select objects W: Select and move E: Rotate R: Select and (mode) scale U: Orthographic viewport mode P: Perspective viewport mode A: Toggle angle snap S: Enable snap D: Disable viewport G: Enable/disable grid J: Display bounding edges LALT X: Xray mode for model Ctrl Z: Undo action Ctrl Y: Redo action In a heavy program like 3ds Max, being able to change preferences to one's likings is important. Do so by going to Customize > Preferences. Performance, file settings and such can all be configured in there. For GTA:SA modding, knowing how to subdivide and add geometry to existing GTA models is very important. Below is a list with actions that may come in handy. No-brainer: Editable Mesh is inferior to Editable Poly. Use Poly, poly, poly, poly... Editable mesh modeling Vertex selection mode Edit Geometry section Attach: attaches another model in the scene to the selected mesh Chamfer: chamfer selection of vertices; creates additional geometry Weld: merges vertices together within a specified threshold Surface Properties section Edit Vertex Colors: sets the color and illumination of selected vertices Edge selection mode Edit Geometry section Divide: divides an edge, adding a new vertex where it was divided/split Extrude: create and pull a new face out from existing edges (keyboard shortcut: LSHIFT + LMB-drag) Face selection mode Edit Geometry section Divide: creates a new face Extrude: pulls the select face(s) outwards or inwards and creates new geometry off that Bevel: essentially an Extrude followed by scaling of the face Surface Properties section Flip: flips a face 180 degrees Smoothing groups: defines the smoothing of the model. Autosmooth is in many cases OK, but may not fulfil everyone's expectations Editable poly modeling Vertex selection mode Edit Vertices Connect: selecting 4 verts on a box side and using this function will triangulate the side. Edge selection mode Edit Edges Connect: creates an edge between the selected edges, as in a bridge between two cliff sides (use the 'Settings' to choose between multiple or one edge on creation) Polygon selection mode Edit Polygons Inset: places a new polygon inside the selected, allowing to be scaled Bridge: connects two opposing polygons by creating a bridge between them (can be used for walls and gaps) Edit Geometry Slice Plane: enables the user to create a perfect cut on the model, can be rotated by degrees Rendering scene Modelers working on projects for companies or friends might want to show what they've accomplished, but a regular screenshot may not suffice. Talking of a screenshot like this: Instead, the modeler might want to show the scene with textures. Perhaps more than just textures - lighting? reflections? transparency? - this is where 3D rendering comes into play, and can be done by simply pressing SHIFT + Q on the keyboard. This can also by default use alpha channel. However, the quality could improve. The quality of the render depends on the scene assets (models, materials, lights), the Renderer and its settings. By default, 3ds Max utilises Scanline Renderer. This is not a production quality render, but rather meant for test shots and demos. Though the quality isn't great, it's still possible to produce seemingly interesting renders. The following render took merely 8 seconds. Using 3ds Max allows modders to bring GTA:SA into modern graphics, easily comparable or even superior to ENB's. It also enables modelers to share visualizations of their models to help the customer understand how it could potentially look for their game. In the above render, a Skylight is used with Scanline Renderer. A very basic render, though interesting and contains lots of depth. In order to replicate this result, below are the steps to follow: On the Create panel, where one would normally find boxes and spheres, click the toolbar Lights. Where it says Photometric change that to Standard. Click the Skylight and place it in the 3ds Max scene. Settings for Skylight explained Multiplier: intensity of the light Sky color: the color of the light Cast shadows: enable to produce shadows, though this is more of an Ambient Occlusion than actual shadows Rays per sample: quality of the shadow, ideally keep at <5 for tests and 15-20 for final shots In the actual render above, a sample of 5 was used, creating grainy shadows but quick render. Backface culling was enabled to avoid slowing down the render time. Skylight is great light source and is generally used to illuminate an entire scene and not particular models. In the same Lights tab, one may find use of Omni or Free lights, which both works great. These are great point lights, which as opposed to skylight, are able to illuminate parts of the scene e.g acting as street lights. Modifiers When modeling, modifiers can come in use and save the modeler a lot of time. The following modifiers are highly suggested for beginners to know about. Bend: bends the model, effect depends on the differences in the geometry Mirror: copies the mesh and mirrors it on the other side, commonly used for vehicles using symmetrical geometry Smooth: generates and applies smoothing to the model, generally the lower values makes for higher file sizes Symmetry: essentially the same modifier as 'Mirror' Turbosmooth: Smoothens the mesh, adding geometry, uses iterations Unwrap UVW: advanced UV editing, commonly used for preparing textures for models like characters and game assets UVW map: basic UV editing, X/Y/Z projection mapping as well as spherical, box and planar mapping Vertexpaint: allows for painting colors onto vertices and faces, these colors are rendered during either ingame or night time Texturing a game-ready cube Modeling has to start somewhere. Using standard 3D primitives is a good place to start. For the purpose of this guide, a Cube will be created in 3ds Max and textured in Paint.net, a free image editing software. Video tutorial: To start off, navigate to 3ds Max's Create tab on the right hand side panel, as shown below. Shows the Create tab on the panel. For this guide, click on Box (Cube). Use LMB and click and drag the mouse in the viewport to create the cube. Now that the Cube primitive is spawned in the viewport, on the same panel that it was created from, go to Modify tab and set its dimension parameters to 5,0, 5,0, 5,0 and 1 segment for all 3. Convert the model to Editable Poly by right clicking it in the Viewport > Convert to > Editable Poly. Go into Polygon selection mode and scroll down until the following buttons are visible: With viewport selected, on the keyboard press `CTRL A` to select all faces on the cube. Now, where it says `Color`, click the bar and on `Value` set it to 100, then do the same for `Illumination` but value at 35. What this does is it sets the vertex colors so that the model won't be overexposed during day/night time. Exit polygon selection mode and on Modifier List, click that and find Unwrap UVW. This applies a modifier stacked on top of the Editable Poly mesh. Under Edit UVs click Open UV Editor. This allows the user to make changes to the UV coordinates which tells the model how textures are projected onto the model. On the editor, ensure that Polygon selection is enabled. While in the UV editor, press `CTRL A` to select all UV islands. On the top of the editor click Mapping, then Unfold Mapping.... Keep it as Walk to closest face and enable Normalize Clusters. Click OK. The result should remind the user of how a simple cardboard box in real life looks when it's yet to be folded into a box. With the model unwrapped, on the toolbar on the UV editor, click Tools > Render UVW Template. The export settings below are ideal for this particular task. If one wishes to know exact dimensions of each square, enable Seam Edges. After exporting, on the modifier stack, press Collapse to. This saves the new UV's. The width and height should be on a 1:1 ratio to avoid stretching issues. 1024x1024 is more than enough. On the rendered image window, click the Save button and find a location to save it in, name it Cube_unwrapped and use Alpha channel (optionally). Now open Paint.net and insert the image. Once happy with the result, export as cube_diffuse. Diffuse map generated with the help of a UVW template. In order to apply the texture on the model, simply drag and drop the image from file browser onto the model in the Viewport. Although the example above is not textured properly in regards to rotations, it shows what can be done by using UVW templates, and how easy it really is to produce textures for models made from scratch. The model can be directly exported as DFF. Materials are not required to be GTA or RW, they can be standard and still show ingame. Some exporters wants the model in Editable Mesh however, so converting it may be required. Thanks for reading this guide, we hope it helps and we wish you the best of luck with modelling! For questions on modding, please refer to MTA's modding FAQ or MTA discord #modelling channel. KAM_s_GTA_Scripts_Upd_by_GF_v0.3.7.zipKAM_s_GTA_Scripts_Upd_by_GF_v0.3.7.zip
    1 point
  43. Link: http://www.lua.org/gems/sample.pdf I think it should be useful for everyone.
    1 point
  44. 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
  45. Most (if not all) technical issues and crashes experienced on stable releases of MTA are somehow related to the user's PC, such as underlying OS or driver issues, bad mainentance state of the OS, viruses interfering with MTA, etcetera. In this subforum (client support) we have a range of users who are willing to offer you support, of which some have an advanced technical IT background and thus are able to dive deep into said problems, given that they have sufficient information to help you troubleshoot the underlying causal problem. MTADiag makes their job easier, by collecting a set of information that helps them get started in advising you what to do next. Client support information: (open spoiler) - also read this if you're not getting a response to your problem in a timely manner MTADiag is a small open-source console application which will: Read MTA's and GTA's install paths, and MTA's current version - if multiple versions of MTA are installed, it will ask the user to pick one to diagnose Automatically remove compatibility mode settings for GTA and MTA (except for Administrator privileges) Automatically download and launch MTA's latest patch installer Automatically generate a dxdiag log Automatically install necessary certificates for MTA Create a log file with the aforementioned paths, MTA's previous and updated version strings, the generated dxdiag log, a list of currently running processes, the contents of CEGUI.log, core.log, and logfile.txt, directory listings of the MTA, GTA, and GTA\models folders, and some other miscellaneous information which is automatically uploaded to MTA's Pastebin. Current version: 2.9.0 (January 2024) It's a little unfriendly due to the fact that it's a console app, but it will streamline client support topics by aggregating all potentially useful information for our QA and staff to help troubleshoot your issues into the first post, or potentially eliminating the need to create a new topic altogether if removing compatibility mode entries, automatically applied repairs & installing the latest nightly and the DirectX runtimes fixes the user's issue. I've added a download link to MTADiag in the MTA CRASHING? Read here first! sticky thread. Download MTADiag MTADiag is opensource, check out the repository at https://github.com/multitheftauto/mtadiag Instructions to use the tool and request support accordingly: Please download and run MTADiag and follow the instructions. Post any Pastebin URL MTADiag gives you in a new topic you'll create at https://forum.multitheftauto.com/forum/83-client/, after which support can be offered. MTADiag supports Windows XP and newer, but must be run with Administrator privileges on Windows Vista and newer. If MTADiag will not run for you, install Visual C++ 2017 runtimes and try again.
    1 point
×
×
  • Create New...