Skip to content

Getting Started

Owain edited this page Jun 6, 2020 · 10 revisions

Installing

Installing xAdmin is like installing any other addon. You simply drag and drop the folder into your addons folder. There is no extra library required. If you want to store your data in MySQL, you will need to install MySQLoo. You can find install instructions on their GitHub repo.

Setup

[If you're running MYSQL] Next, go to xadmin/core/sv_db.lua and set up your database credentials. If you're on a managed server host, they will most likely provide you with one. I suggest going to their FAQ or checking creation emails you have received from them and looking. Otherwise, you can find MySQL database hosts for quite cheap elsewhere (Or host your own). Input the provided IP address, username, password and database in the provided config. It is suggested that you create a database specifically for xAdmin if you're running several servers. The ban archive table is used globally by all servers if they share a database, this makes things like ban walls easy to implement as all the ban archives are in the same table.

Configuration

Now, go to xadmin/_config/sh_config.lua. This is the basic configuration provided by xAdmin. Here you can create ranks, set the default rank, define power levels and even change the ban message.

If you wish the change the power needed by commands, go to xadmin/commands. In here is all the files containing commands. Open the file holding the command you want to edit. In this example, we will edit mute. Find the mute function. You will see a function with 4 arguments. An example being: xAdmin.Core.RegisterCommand("mute", "Mute a user", 50, function(admin, args) This functions 4 arguments are as follows:

  • The command - mute
  • The description - Mute a user
  • The power level - 50
  • The action - A function

If you wish to change the command needed to run this, change "mute". If you wish to change the description, change "Mute a user". If you wish to change the power level needed to run the command, change 50. If you wish to change how the command works (Lua knowledge needed), edit the function. You can find more advanced documentation inside this wiki. If you want a full list of functions that are provided with xAdmin, you can find that here.

Clone this wiki locally