Admin the server

Adding administrators

It is strongly recommended to add at least one administrator to your server in order to make use of the built-in webserver to easily maintain and configure your server. This administrator will then also be able to log-in from within the game and control the server.

To add an administrator to your server, follow these steps:

  1. While the server is running, add a new account by typing addaccount name passwordinto the server window. For example, to add user BennyLava you could type:
    addaccount BennyLava 123password

    Note: If you do not have access to the server window, and the 'admin' resource is running, you can add the example account by issuing the chatbox command /register BennyLava 123password

  2. The server should display a message confirming the account has been added.
  3. Next, shutdown the server by typing shutdown into the server window.
  4. Make sure your server is stopped; if your server is still running, the following changes you make will be overwritten
  5. Open the file 'mods/deathmatch/acl.xml' with any text editor
  6. Add the account to the Admingroup by using the XML-syntax below
    <acl>
      ...
      <group name="Admin">
        <acl name="Admin"/>
        ...
        <object name="user.BennyLava" />
      </group>
      ...
    </acl>

    You're done! You can add as many administrators or users as you want this way, take a look at some of the other groups and ACLs for example. The ACL is also accessible through the Lua scripting engine.

    It is recommended to take a look at the web interface, we will explain how to do this below.

Note: There are also ways to add accounts and edit rights for the server while it's running. "addaccount <user> <password>" is an internal command to add accounts, but you will have to use the web interface to add these accounts to specific groups/ACLs!

Using the web interface

The dedicated server comes with a few Lua resources that provide a nice little web interface to your server. This can be used to easily maintain your server, as it allows you to add users, start/stop resources, and more.

The web interface resources are enabled by default and are served through the built-in HTTP web server. To make sure the built-in HTTP web server runs on a port you like (22005 by default), follow these steps:

  1. Make sure your server is stopped
  2. Open the file 'mods/deathmatch/mtaserver.conf' with any text editor
  3. Verify that the HTTP server is enabled:
    <httpserver>1</httpserver>
  4. Change the HTTP server port to your liking:
    <httpport>22005</httpport>
  5. Save and close the configuration file
  6. Start your server
  7. If you happened to have changed the start-up resources in your configuration file, make sure the following resources are started:
    1. resourcebrowser
    2. resourcemanager
    3. webadmin
    4. webmap
    These are automatically started in the default configuration file, in case you just installed your server.
  8. Open a web browser (Internet Explorer 6 or 7 are NOT supported; use Mozilla Firefox, Google Chrome, Apple Safari, Opera or others) and navigate to the HTTP server URL: http://server:port/. For example, If you are running a local server on HTTP port 22005, use http://127.0.0.1:22005/.
  9. Enter the username and password of the administrator you added in the previous section.


You should now be able to maintain your server from the web interface.

Installing/Updating resources on your server

Resources can come in two formats, either a ZIP format or just a normal folder with the script files inside it. The MTA:SA server supports both these methods.

  1. Move or copy the new resource to your <SERVER>\mods\deathmatch\resources folder.
  2. In the server window type in the command refresh, this will re-scan the resources folder and update the live resources where necessary.

Uninstalling resources

Resources can easily be removed from your server if you no longer want them.

  1. Delete the ZIP file or the folder of the resource you wish to uninstall
  2. In the server window type in the command "refresh" (without the quotes), this will re-scan the resources folder and update the live resources where necessary.

Administrating your server

You can start resources by typing the command "start resourcename" in the server console, or stop ones with "stop resourcename".

It's also possible to execute these and other admin commands from the in-game console (which you can bring up with the ` key or F8); for this to work, you first need to log in with the command "login username password". Additionally, you can press the p key to bring up the admin panel: this is a graphical interface which allows you to easily kick or ban misbehaving players, among others.

For further commands, type help in a console.

  • 5 Користувачі, які знайшли це корисним
Ця відповідь Вам допомогла?