🛡️Ez Admin Authority

Menus by accessible by commands for admins to manage players in server. Allows you to ban, kick, warn and send player to community service with a whole community service script for rule breakers.

STEP 1 - Unzip and Add Script To Server

Unzip the script folder within your server resources folder. Ensure script in server.cfg ... "ensure ez_admin".

STEP 2 - Script Configuration

Script config located in config.lua allows you to...

  • Modify command names.

  • Revise permission-checking methods for command access (Defaults to ACE permissions).

  • Fully customize community service, including task locations and text UI functions.

  • Update the script's language entirely.

To update webhooks to view logs of what your admins are doing, go to the file sconfig.lua.

STEP 3 - Community Service Framework Support

To ensure compatibility with other frameworks, we've created a trigger. This trigger should be called when a player loads in (selects a character) and when they load out (e.g., for admins using /logout or players at apartments). Our script already supports the following frameworks:

  • QBCore

  • ESX

  • VORP (RedM)

If you're using any of these, you can skip this step. You can modify various features through the configuration for community service, as previously mentioned. This is the only feature that requires framework interaction to know when a player has spawned or logged out, facilitating the start and stop of community service tasks (coms).

For Client Side:

TriggerEvent("ez_admin:isLoadedIn", bool) -- bool: true for load in | else false

For Server Side:

Step 4 - Permissions

When integrating the the script with your server, it is crutial to edit the permission function within config file to allow admins to use the menus.

Permission = function(source, type) -- Type is the command type from above ("banPlayer", "kickPlayer", "warnPlayer", "comsPlayer", "manageBans", "manageComs")
    if source == 0 then
        return false -- server side txadmin cannot open menu
    end
    return IsPlayerAceAllowed(source, "ez_admin:"..type)
end,

This is the default check if user has permissions to open (i.e. admin). It uses ace therefor within your server.cfg you are required to allocate users the permissions. Here is an example of code which would allow users of group.admin...

add_ace group.admin ez_admin:banPlayer allow # allow to ban players
add_ace group.admin ez_admin:kickPlayer allow # allow to kick players
add_ace group.admin ez_admin:warnPlayer allow # allow to warn players
add_ace group.admin ez_admin:comsPlayer allow # allow to comserve player
add_ace group.admin ez_admin:manageBans allow # allow to manage bans
add_ace group.admin ez_admin:manageComs allow # allow to manage community service

Last updated