Skip to content

INSTALLATION.md

Konstantin edited this page Oct 11, 2020 · 1 revision

Installation

amx consists of a binary server module (.dll/.so) and a Lua resource. It will only run on MTA:SA 1.0 and later. Installation steps are lined out below.

Extracting

Extract the "mods" folder into your MTA "server" directory.

Pay attention, we suggest to put all resources into [amx] category. But if you use scriptfiles and plugins put it into MTASERVER\mods\deathmatch\resources\amx\scriptfiles and MTASERVER\mods\deathmatch\resources\amx\plugins

Configuration

  • Open server/mods/deathmatch/mtaserver.conf in a text editor. Add the following line within the <config> node:

    <module src="king.dll"/>

    (Use "king.so" on Linux systems). This will instruct the MTA server to load the module on startup.

  • At this point you can add the amx resource to the autostart list if you want. Doing this will allow you to use SA-MP style rcon commands in the server console as soon as the server is started.

    <resource src="amx" startup="1" protected="0"/>

    Save and close mtaserver.conf.

  • After starting the MTA server you should see the following output:

    Resource ‘amx’ requests some acl rights. Use the command ‘aclrequest list amx’

    Run aclrequest list amx to see what ACL rights are needed, and if you are happy with the request, type aclrequest allow amx all.

Running gamemodes and filterscripts

Before you can run sa-mp modes or filterscripts, you need to start the amx resource. Type this command in the server console or as admin in the ingame console:

start amx

Alternatively you can add it to the autostart list of your server, in mtaserver.conf. Once amx is started you can use the following commands to start and stop gamemodes and filterscripts:

start amx-name
stop amx-name
start amx-fs-name
stop amx-fs-name

Alternatively, you can use the SA-MP style changemode and (un)loadfs commands. At most one gamemode can be running at any time, the number of running filterscripts is unlimited.

Go ahead and try starting the example gamemode (amx-test) and filterscript (amx-fs-test).

Finishing up

  • If you are planning to compile Pawn scripts that use the new native functions provided by amx, place a_amx.inc in your Pawno "include" directory.

  • You are done!

Known problems

  • The module does not start. It can depends on #55. You should download sqlite3.dll (you can find it in the issue) and put it into mods\deathmatch\

  • There is only one hardcoded path for scriptfiles and plugin. If you need to work with scriptfiles and plugin put them into \mods\deathmatch\resources\amx\

Clone this wiki locally