Figma → Lua MTA

Open Source · MIT · v1

From Figma design straight to MTA as Lua code

The Figma to Lua MTA Converter turns your layouts into ready-to-use Lua code for Multi Theft Auto:SA. Generate dxDrawRectangle, dxDrawText and dxDrawImage automatically, with adaptive scaling and pixel-perfect colors.

Read the full guide →

100%
Automatic
Ready to run
Complete MTA resource
Open Source
MIT license
✦ Features

Features

Everything you need to take your interface from Figma straight to your MTA server.

  • Rectangles

    Rectangles become dxDrawRectangle with position, size and color preserved.

  • Rounded rectangles

    Rounded corners become dxDrawRoundedRectangle keeping the original radius.

  • Texts

    Texts become dxDrawText with mapped font and faithful colors.

  • Images and vectors

    Images, icons, vectors, ellipses and gradients are exported as PNG and become dxDrawImage.

  • Adaptive scaling

    The code adapts to any resolution with centered zoom, just like your design.

  • Color fidelity

    Translucent colors are composited over the background exactly as in Figma.

  • Font mapping

    Figma fonts are converted to their MTA equivalents automatically.

  • Clean code

    Empty containers generate no code and duplicate calls are removed automatically.

  • ZIP export

    Generates ProjetoGerado.lua, meta.xml and assets in a ZIP ready for MTA.

  • Colorful text

    Different colors within the same text become #RRGGBB using dxDrawText colorCoded.

⚡ How it works

How it works

From Figma to your server in a few steps, without writing a single line of code by hand.

  1. Install the plugin

    Search for "Conversor de Figma para Lua MTA" on Figma Community and click Install.

  2. Open your design

    Open your project or create a new frame with the interface you want to convert.

  3. Run the plugin

    Right-click → Plugins → Conversor de Figma para Lua MTA.

  4. Configure the background

    The "Background Name" field defines the base resolution frame (default: Background). It is excluded from the code.

  5. Select what to convert

    No selection converts the whole project. With a selected frame, only it is converted.

  6. Download the ZIP

    Click "CONVERT AND DOWNLOAD ZIP" and receive the complete ProjetoGerado.zip.

  7. Run it on MTA

    Extract the ZIP into the server resources/ folder and run /start ProjetoGerado.

⇄ Figma → Lua mapping

Figma → Lua mapping

Every element of your design becomes the corresponding dxDraw function in MTA.

Figma elements and their Lua functions in MTA
Figma element Generated Lua code
Rectangle dxDrawRectangle
Rounded rectangle dxDrawRoundedRectangle
Text dxDrawText
Image / Icon / Vector / Ellipse / Gradient dxDrawImage
Image / Icon / Vector / Ellipse / Gradient: PNG exported automatically
🔤 Font mapping

Font mapping

Figma fonts are automatically converted to their MTA equivalents.

Figma fonts and their MTA equivalents
Figma font MTA font
Inter default
Arial arial
Bebas Neue pricedown
Other fonts Mapped by equivalence

Different colors within the same text become #RRGGBB using dxDrawText colorCoded.

📦 Installation & usage

Installation & usage

Get the plugin running on Figma and load the resource on your MTA server.

On your MTA server

  1. Install the plugin from the Figma Community page.

  2. Open the design and run the plugin from the Plugins menu.

  3. Click CONVERT AND DOWNLOAD ZIP.

  4. Extract ProjetoGerado.zip into the server resources/ folder.

  5. Run /start ProjetoGerado in the server console.

/start ProjetoGerado

Plugin development

  1. Clone the repository and run npm install.

  2. Run npm run build to compile src/ → code.js.

  3. Use npm run watch to recompile on save.

  4. In Figma Desktop: Menu → Plugins → Development → Import plugin from manifest.

  5. Select the project's manifest.json file.

npm install && npm run build

Licensed under MIT — MIT

? Frequently asked questions

Frequently asked questions

Common questions about the Figma to Lua MTA Converter.

What exactly does the plugin generate?

The plugin generates a ZIP with ProjetoGerado.lua, meta.xml and the assets/images folder with exported PNGs. The content is a complete resource, ready to run on MTA.

How does the code adapt to different resolutions?

The code uses adaptive scaling with zoom = math.min(sW/resW, sH/resH), centering the design at any player screen resolution, just like Figma.

Do I need to select something before converting?

No. Without a selection the plugin converts the whole project. If you select a frame, only it is converted. The frame defined as Background sets the base resolution and is excluded from the code.

Which fonts are supported?

Figma fonts are mapped automatically to their MTA equivalents. Examples: Inter → default, Arial → arial and Bebas Neue → pricedown.

Is the plugin free?

Yes. The project is open source under the MIT license, free to use including for commercial purposes.

How can I contribute or report issues?

The code is on GitHub at SrTermax/Conversor-de-Figma-para-Lua-MTA. Open an issue or send a pull request.

Ready to convert?

Install the plugin on Figma, convert your interface and run it on your MTA server in minutes.