πŸ”§Installation

Learn how to install LuxuAdmin

1. Install Depencies

  • LuxuModules (Found in your Keymaster) Installation

  • ox_lib (requires v3.10.0+) (Download only the release version. ❌ not the source code ❌)

Your FiveM Server needs to be version 6464+ Windows: https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/ Linux: https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/

2. Install LuxuAdmin

  • Download and Extract LuxuAdmin from keymaster your resources folder.

  • Execute the SQL inside the SQL folder in your database.

  • Open discord.lua and change the discord channel webhook.

  • Open Config and check if you need to change anything.

Before you start LuxuAdmin, open the config.lua and change the default Open Menu keybinding, by default it's set to F6. P.S. Once the admin menu is started, all players online, will get this key, you defined, registered to their FiveM. Players need to individualy go to the PAUSE MENU -> GTA Settings -> Keybindings -> FiveM -> And search for LuxuAdmin

If you own LuxuDiscordBot

LuxuAdmin/config.lua
Config.LuxuDiscordBot = {
      enabled = true,
      resourceName = 'luxudiscord'
}

Add the scripts to server.cfg Please respect the resources orderπŸ‘‡ (framework starts first)

server.cfg
# if you have esx
ensure es_extended
#if you have qbcore
ensure qb-core

ox_lib
LuxuModules
LuxuAdmin

3. Setup Permissions (DON'T SKIP THIS)

In order to have acces to the admin menu you need to give yourself permission.

  1. Add this to your server.cfg

server.cfg
add_ace resource.ox_lib command.add_ace allow
add_ace resource.ox_lib command.remove_ace allow
add_ace resource.ox_lib command.add_principal allow
add_ace resource.ox_lib command.remove_principal allow

  1. Menu Access

There are 2 ways to configure permissions.

  1. Using Config.IdentifiersAlwaysAllowed, this will allow you to add a list of identifiers with full access to the menu.

  2. Using ace permissions, this will allow you to add permissions to specific ace groups. (recommended)

    • If you are not familiar with ace permissions, you can learn more here

πŸ”΅ Method 1 - Config.IdentifiersAlwaysAllowed

This method will only allow you to give full access to individual players. Finding your identifier

Example usage:

Config.IdentifiersAlwaysAllowed = {'license:3131313213','fivem:32324','discord:131313214'}

Using this, will ignore any ace group for that specific license player.

Use this only for trusted admins.

πŸ”΅ Method 2 - Ace permissions | Learn more

Ace permissions are the recommended way to configure permissions. They allow you to give access to specific features to specific ace groups.

Most of the time you will want your ace permissions stored inside server.cfg.

Generate your permissions with this tool

server.cfg | Examples

add_ace group.god luxuadmin allow
add_ace group.admin luxuadmin.openmenu allow

add_ace group.admin luxuadmin.revive allow

add_ace group.admin luxuadmin.reviveplayer allow

add_ace group.admin luxuadmin.kick allow

add_ace group.admin luxuadmin.ban allow
add_ace group.admin luxuadmin.explodeplayer deny

Common Problems ❌

  1. Weather ☁️ not working and errors in the console.

    • Easy: You are probably an ESX user, so please join our discord server and check the LuxuAdmin snippets channel to download a modified weather script for your server.

    • Experienced: If you want to adapt your own, please check LuxuModules sv_utils.lua or server.lua and search for the Time and Weather functions

  2. I don't see players in the menu!

    1. Please check if you have correctly chosen the framework in LuxuModules, the only options are 'esx' or 'qb' .

    2. If you use an old version of ESX make sure to change the LuxuModules Config

      Config.ESX_Version = 'old'

Advanced configuration βš™οΈ

Teleport to interiors

You can add more interiors on nui/interiors.json

Add more vehicles, Peds, Weapons and Ammo

Open LuxuAdmin/shared and there you will see a few files. Peds - pedhashes.lua Vehicles - vheicles.lua Weapons - weapons.lua Ammo - ammo.lua You can add more options to these files, just make sure you follow the same syntax.

Custom Buttons βž•

This was meant for Experience Developers only.

You can add custom buttons with custom logic to the script.

Open custom_functions folder inside LuxuAdmin, and there you will have client.lua and server.lua

  1. Define a new button categories: 'players' | 'master'

    Custom_buttons = {
              { name = 'Example Button', event = 'LuxuAdmin:ExampleCustomButton',  category = 'players' },
    }
  2. Create a NUI callback with the event from above πŸ‘† for when the player clicks the button. πŸ‘‡ In this example I am checking if the player has permission to use this button πŸ‘‡ ( 'luxuadmin.custombutton' , you change the permission name for whatever you want)

RegisterNUICallback('LuxuAdmin:ExampleCustomButton', function(data, cb)     
     local target_server_id = data
      -- Check if the player has permission to use this button
      if not CheckPerm('luxuadmin.custombutton') then
            cb(false)
            return
      end

      print(string.format('Example function, Target Player Server ID: %s', target_server_id))
      cb(true)
end)
  1. That's it! Now you can add whatever logic you want. ( You can create server events in the server.lua)

Information about the script

Tp to coords πŸ—ΊοΈ

This allows you to teleport a player to the specified coords.

The script can read a few diferent syntaxes:

  • Vector3(x,y,z) - e.g: Vector3(12424,6464,-23)

  • (x:x,y:y,z:z) - e.g: (x:424,y:636:z:-231)

  • (x=x,y=y,z=z) - e.g: (x=424,y=636=z=-231)

Last updated