Jump to content

Forums

  1. Multi Theft Auto: San Andreas 1.x

    1. Support for MTA:SA 1.x

      HELP! HELP! Need help? Post here.

      55.5k
      posts
    2. User Guides

      These guides are a good place to start learning how to achieve certain things within MTA in an efficient and well mannered way.

      11
      posts
    3. Open Source Contributors

      This space is for contributors to discuss the development of MTA. No user suggestions/support.

      1.3k
      posts
    4. Suggestions

      Suggestions and requests go here. Please note that actual feature requests must be filed on our GitHub.

      7.7k
      posts
    5. [Read-Only] Ban appeals

      We have stopped accepting ban appeals for MTA. You can find more about this at our newspost: https://forum.multitheftauto.com/topic/139550-cheater-reports-ban-appeals-in-2023/

      4.6k
      posts
  2. General MTA

    1. News

      News and updates on Multi Theft Auto.

      9.8k
      posts
    2. Media

      User-made screens and movies go here.

      4.5k
      posts
    3. Site/Forum/Discord/Mantis/Wiki related

      Share your comments & concerns about our services.

      5.7k
      posts
    4. MTA Chat

      MTA related chat that is NOT support related!

      2.2k
      posts
    5. 330.9k
      posts
  3. MTA Community

    1. Scripting

      All Lua scripting topics related to Multi Theft Auto.

      261.8k
      posts
    2. Maps

      Discussions for maps on various gamemodes.

      13.5k
      posts
    3. Resources

      Everything else about resources.

      28.8k
      posts
    4. Other Creations & GTA modding

      This section includes things such as GUI themes, forum userbars, user-created MTA logos, etc. Also contains topics which cover general GTA modding areas that can be used in MTA, such as modelling.

      2.5k
      posts
    5. Competitive gameplay

      Discussions about various MTA-related competitive gameplay events. Also gang (clan) forums.

      26.7k
      posts
    6. Servers

      Looking for a server to play on? Looking for someone to host your server? Looking for a place to discuss with other server owners? Here's where to look.

      15.8k
      posts
  4. Other

    1. General

      Non-MTA discussions. Anything you want.

      38.1k
      posts
    2. Multi Theft Auto 0.5r2

      Discussion regarding Multi Theft Auto 0.5r2 for GTAIII and Vice City.

      685
      posts
    3. Third party GTA mods

      Showcase for single player mods and requests.

      814
      posts
  5. Archive

    1. 144k
      posts
    2. Trash

      These posts have broken forum rules. They are stored here temporarily so offending users can see what they have done wrong.

      3.5k
      posts
  • Posts

    • The F1 "anim" panel doesnt apply the animations anymore and i dont know why. Upon further investigation and using debug mode 3, i got this error after trying to apply the animations: WARNING: freeroam\fr_server.lua:616: Bad argument @ 'setPedAnimation' [Expected number at argument 4, got boolean (true)] I've tried editing the Freeroam files and upgrading everything through console, but no success.
    • 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.
    • my debug is showing this (Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean]), whenever a player passes through the gate. local gate = createObject(2933, 1334.8000488281, -1334.1999511719, 14 ,0, 0, 89.504455566406)  --13188 local marker = createMarker(1334.8000488281, -1334.1999511719, 14, "cylinder", 8, 0, 0, 0, 0)   function moveGate(thePlayer)      if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)) , aclGetGroup("PMESP")) then           moveObject(gate, 1500, 1334.8000488281, -1334.1999511719, 10)      end end addEventHandler("onMarkerHit", marker, moveGate)   function move_back_gate()      moveObject(gate, 2000, 1334.8000488281, -1334.1999511719, 14) end addEventHandler("onMarkerLeave", marker, move_back_gate) What did I do wrong?
    • 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.

Twitter Feed

×
×
  • Create New...