How to Install and Manage Resources in MTA:SA — Complete Guide

Learn how to install, configure, and manage resources in MTA:SA: meta.xml, dependencies, ACL, start/stop/refresh commands, and gamemode organization.

Resources are the fundamental unit of any Multi Theft Auto: San Andreas server. Everything that runs on the server — gamemodes, maps, admin systems, custom scripts, visual assets — is packaged as a resource. Understanding how to install, organize, and manage these packages is what separates a server that works from one that breaks on every deploy.

This tutorial is for anyone setting up or customizing an MTA:SA server who needs to add third-party resources (community.multitheftauto.com), build their own, or reorganize a resources/ folder that has become a mess. We will cover folder structure, meta.xml syntax, dependency management, ACL, and the operational commands you will use every day. Estimated execution time: 25 to 40 minutes, depending on how many resources you need to configure.

Assumption: you already have an MTA:SA server installed and running, with access to the console (terminal or panel) and to the server files via SSH, SFTP, or management panel.

Prerequisites

What you need before starting

MTA:SA server version 1.5.9 or higher already installed. Access to the server console (SSH terminal or panel). Read/write access to the mods/deathmatch/resources/ folder. A text editor that respects UTF-8 encoding (VSCode, Notepad++, nano). Basic knowledge of XML.

Resources folder mods/deathmatch/resources/
Server config mods/deathmatch/mtaserver.conf
ACL mods/deathmatch/acl.xml
Default port 22003

Structure of a resource

An MTA:SA resource is simply a folder inside mods/deathmatch/resources/ that contains, at minimum, a meta.xml file. The folder name becomes the resource identifier — it is the name you use in start, stop, refresh, and in any reference via getResourceFromName().

The minimal structure looks like this:

mods/deathmatch/resources/
├── my-resource/
│   ├── meta.xml
│   ├── server.lua
│   ├── client.lua
│   └── files/
│       └── image.png

The meta.xml declares three things: metadata (author, version, description), files that compose the resource (scripts, maps, client files), and dependencies (other resources that must be running before).

01

Create your resource folder inside mods/deathmatch/resources/:

cd /path/to/server/mods/deathmatch/resources
mkdir my-resource
cd my-resource

The folder name is case-sensitive on Linux. Convention: use kebab-case or snake_case, with no spaces and no special characters.

02

Create the meta.xml with the minimal declaration:

<meta>
    <info author="YourName" version="1.0.0" type="script"
          description="Short description of the resource" />
    <script src="server.lua" type="server" />
    <script src="client.lua" type="client" />
</meta>

The type attribute on the <info> element accepts: script (default), gamemode, map, misc. Use gamemode only for resources that control the main game logic — it appears in the gamemode command list and blocks other gamemodes from running simultaneously.

03

Declare client-side files that need to be downloaded by the player with <file>:

<file src="files/image.png" />
<file src="sounds/effect.wav" />

These files are transferred to the client when they join the server. Client-side scripts (type="client") are also transferred automatically, but any asset (image, sound, model) requires an explicit <file> entry or it will not reach the player.

Managing dependencies between resources

Resources rarely live in isolation. An admin system may depend on a UI lib; a gamemode may depend on a scoreboard system. Declaring dependencies correctly avoids the classic scenario: resource A starts, calls an exported function from resource B, and B has not finished loading yet.

01

Declare the dependency in the consuming resource’s meta.xml:

<meta>
    <info author="YourName" version="1.0.0" type="script" />
    <script src="server.lua" type="server" />
    <include resource="scoreboard" />
    <include resource="mysql-lib" />
</meta>

The <include> element ensures that scoreboard and mysql-lib are started before the current resource loads. If a dependency fails to start, the dependent resource also fails — desired behavior, it avoids partial states.

02

To call exported functions from another resource, use the exports syntax:

-- server.lua of the consuming resource
local success = exports["scoreboard"]:addScoreboardColumn("Kills")

if not success then
    outputDebugString("Failed to add scoreboard column", 1)
end

The function must be declared as exported in the provider resource’s meta.xml with <export function="addScoreboardColumn" type="server" />. Without that export, the call returns nil silently.

Startup order matters

Resources listed in mtaserver.conf with startup="1" load in file order. Put libs and dependencies at the top, gamemodes and high-level features at the bottom. Reversing the order causes “function not found” errors that disappear after a refreshall, masking the real bug.

Day-to-day operational commands

All resource control runs through the server console (the terminal where mta-server64 is running, or the console tab in the game server management panel). These commands do not require a server restart — changes are applied live.

CommandWhat it does
start <name>Starts a specific resource
stop <name>Stops a specific resource
restart <name>Stops and starts again (reloads meta.xml)
refreshDetects new/removed resources without restarting
refreshallRefresh + reloads scripts of every running resource
gamemode <name>Sets the resource as the active gamemode
info <name>Shows metadata and state of the resource
resourcesLists every detected resource
01

After adding a new resource to the resources/ folder, force the server to detect it:

refresh

Expected output: Refresh completed. Found X new resources, Y removed. If your resource does not appear in the count, check whether the meta.xml is valid (malformed XML causes the resource to be silently ignored).

02

Start the resource:

start my-resource

Expected result: my-resource: Resource started. If a missing dependency message appears, start the dependency first.

03

To make the resource load automatically on every server boot, edit mods/deathmatch/mtaserver.conf and add:

<resource src="my-resource" startup="1" protected="0" />

The protected="1" attribute prevents clients from downloading the resource source code (useful for resources with anti-cheat logic). Use protected="0" only on purely client-side or community resources.

ACL — Access Control List

Resources that try to use administrative functions (kickPlayer, banPlayer, setElementData on other players, internal database access) need explicit ACL permission. Without it, the function returns false and emits a warning in the console.

01

When a resource requests permission, the console shows:

ACL: aclrequest list <resource-name>
ACL: aclrequest allow <resource-name> all

List the requested permissions:

aclrequest list admin-system

Example output: Pending ACL requests for admin-system: function.kickPlayer, function.banPlayer, general.ModifyOtherObjects.

02

Approve the permissions after reviewing what the resource is asking for:

aclrequest allow admin-system all

Approve all only for resources from a trusted source (known community authors, or your own). Resources of unknown origin asking for general.ModifyOtherObjects in bulk should be audited line by line before approval.

Careful with aclrequest allow all on third-party resources

Approving every permission gives the resource access to kick/ban players, modify data of other resources, and in some cases execute commands on the server shell. Read the code before approving — especially server.lua files and any call to executeCommandHandler or runcode.

Verification

Confirm that everything is working:

info my-resource

Expected output includes State: Running, list of active scripts, and export count. If the state is Loaded but not Running, the resource loaded but failed to start — check the console for Lua errors.

To validate client-side scripts, join the server with the MTA:SA client, open the in-game console (F8), and run:

debugscript 3

Level 3 shows errors, warnings, and debug messages from the client side. Errors in client files often appear only here, not in the server console.

Troubleshooting

Resource does not appear on refresh

Most common cause: malformed meta.xml. XML does not tolerate unclosed tags or attributes without quotes. Validate with any online parser or open it in VSCode with the XML extension. Secondary cause: folder name containing a space or special character (accent, cedilla) — rename to pure ASCII.

Error “Couldn’t find file ‘file.lua’ for resource”

The meta.xml references a file that does not exist or has a typo in the name. Remember that Linux is case-sensitive: Server.lua and server.lua are different files. List the folder contents with ls -la and compare exactly with the src= value in meta.xml.

Resource starts but functions do not work

Usually this is an ACL issue (admin function without permission) or a dependency issue (provider resource not running). Run info <name> on the consumer to see pending ACL requests, and resources to confirm the provider is Running.

”Unable to start resource X (dependencies not met)”

The dependency declared in <include> does not exist in the resources/ folder or failed to start. Download and install the dependency first, or remove the <include> if the dependency is not actually required.

Next steps

With resources operational, it pays to go deeper on three fronts: automated backups of the resources/ folder before each deploy, version control via Git (commit the whole folder excluding logs and cache), and exception monitoring via outputDebugString centralized in a logging resource.

If you are putting an MTA:SA server into production with many concurrent players, a Hostini VPS already comes with latency optimized for the Americas and edge DDoS protection — a noticeable difference on servers with 50+ slots where the host’s lag freezes everything. For frequent deploys, consider automating via a webhook that runs git pull on the resources/ folder and triggers refreshall in the server console.

Frequently asked questions

What is the difference between a gamemode and a resource in MTA:SA?

Every gamemode is a resource, but not every resource is a gamemode. A resource is any package (scripts, maps, mods, libs). A gamemode is a special resource declared with <info type="gamemode"> in meta.xml and launched via the gamemode command instead of a plain start.

Why does my resource start but the client-side scripts don't run?

The script is probably not exported correctly in meta.xml. Add type="client" to the <script> element and confirm the file is inside the resource folder. Also check /debugscript 3 on the client to see runtime errors that don't show up in the server console.

How do I make a resource load automatically when the server starts?

Add the resource name to <resource src="name" startup="1" /> inside mods/deathmatch/mtaserver.conf. Resources with startup="1" load in file order, so respect dependencies (the lib first, the gamemode after).

Can I edit a resource while the server is running?

Yes. Edit the files and run refresh or refreshall in the console — MTA detects changes without requiring a server restart. For meta.xml changes, restart the resource by name to guarantee a clean reload of declarations.

What is the ACL and why does my resource ask for permission?

ACL stands for Access Control List — it controls which administrative functions (kick, ban, setElementData on players, etc.) each resource can call. Edit mods/deathmatch/acl.xml or use aclrequest allow in the console to grant pending requests.

How do I organize resources into categories?

Create subfolders inside mods/deathmatch/resources/ with a [bracket] prefix, such as [gamemodes], [admin], [maps]. MTA scans recursively and treats the contents the same way — it simplifies maintenance without affecting behavior.

Topics:
Next steps VPS, dedicated or managed panel for FiveM, SAMP, MTA, Tibia and more.Host your game server with Hostini →
Was this tutorial helpful?
Chat on WhatsApp