STG ScriptsDocumentation
Admin Menu

Permissions

How to make someone staff in STG Admin Menu, with permanent admins in the config or ranks given in game, and what each rank may do.

A player is staff when one of their identifiers has a rank. There are two ways to give one: Config.Admins in stg-admin/config.lua, or the Rank Management tab in game. Both are saved in the stg_admin table. Framework groups and ACE permissions are not read, so a player only gets into the menu through one of these two.

Permanent admins

Config.Admins = {
    {
        id = "license:YOUR_LICENSE",
        rank = "god",
    },
    {
        id = "discord:YOUR_DISCORD_ID",
        rank = "admin",
    },
}

Prop

Type

The list is read when the resource starts. A new entry is added to the database, and an entry you delete from the list is removed from the database on the next start. Permanent admins cannot be removed from the menu, only from this list.

Changing the rank of an entry that is already saved does not update it. Remove the entry, restart the resource, then add it back with the new rank and restart again.

Put at least one god here, since only god can hand out ranks in game. You can find a player's identifiers in txAdmin, in the player's info window.

Ranks given in game

Staff with the god rank can manage other staff from the Rank Management tab:

Press Rank Add To Player, enter the rank key (for example admin or moderator) and the player's server id. The player must be online.

The rank is saved under the player's license: identifier, so it stays after a restart. If the player had the menu open, it closes and they open it again with their new rank.

To change someone's rank, select them in the admin list, press Remove Rank From Player, then give the new rank. A player who already has a rank cannot get a second one.

Nobody can remove their own rank, and permanent admins from Config.Admins cannot be removed here.

What only god can do

The god rank key is special, whatever you set in its perms:

  • Give and remove ranks in Rank Management.
  • Run commands in the Live Console. Commands run on the server console, so they can do anything the console can.

Keep the key god for your owners. You can change its label.

Rank permissions

Config.Permissions = {
    ["god"] = {
        label = "God",

        perms = {
            dashboard = {
                announcement = true,
                -- ...
            },
            players = {
                revive = true,
                -- ...
            },
            -- ...
        }
    },
    -- ...
}

Each rank has a label, shown in the menu, and a perms table with one switch per button. Set a switch to false, or leave it out, and that rank gets a no permission message when they press the button. Every action is also refused while the staff member is off duty.

The player entry has no perms and is the label shown for players without a rank. Keep it in the list.

Dashboard

KeyButtonDefault ranks
announcementMake Announcementgod, admin
admin_tagAdmin Tag above your headgod, admin
revive_allRevive All Playersgod, admin
kick_allKick All Playersgod
delete_all_vehiclesDelete All Vehiclesgod, admin
delete_all_objectsDelete All Objectsgod, admin
delete_all_pedsDelete All Pedsgod, admin
player_namesShow Player Namesgod, admin, moderator

Players

These keys also cover the matching buttons in the Staff Menu and the Weapons tab, for example Give Item, Give Money, Change Job and Give Weapon for yourself.

KeyButtonDefault ranks
reviveRevivegod, admin, moderator
healHealgod, admin, moderator
freeze_unfreezeFreeze/Unfreezegod, admin
give_armorGive Armorgod, admin, moderator
give_moneyGive Moneygod
bringBringgod, admin
teleportTeleportgod, admin, moderator
give_itemGive Itemgod, moderator
openClothingOpen Clothing Menugod
give_weaponGive Weapongod
change_jobChange Jobgod
screenshotScreenshotgod, admin
open_inventoryOpen Inventorygod
kickKick Playergod, admin
banBan Player, also offline bans from the Staff Menugod

In the default config moderator has give_item and admin does not. Check this line before you go live.

Vehicles

KeyButtonDefault ranks
delete_vehicleDelete This Cargod, admin
repair_vehicleRepair Cargod, admin
spawn_vehicleSpawn Cargod, admin
god_modeVehicle God Modegod, admin
drift_modeDrift Modegod, admin
flip_vehicleFlip Cargod, admin
delete_database_vehicleDelete Database Cargod
add_database_vehicleAdd Database Cargod

Staff, weapons and other tabs

CategoryKeyButtonDefault ranks
staffgod_modeGod Mode for yourselfgod, admin
staffinvisibleInvisiblegod, admin
staffcopy_cordCopy Coordinatesgod, admin
staffnoclipNoclipgod
weapondelete_weaponDelete Weapongod, admin
weaponadd_componentAdd Componentsgod, admin
bannedPlayersunbanUnban in Banned Playersgod
liveConsolesendCommandSend a command in Live Consolegod
ticketssend_messageNot checked in this version, every staff rank can reply to ticketsgod, admin, moderator

liveConsole.sendCommand only works for the god rank, even when another rank has it set to true.

Adding a rank

Copy a rank block in Config.Permissions, give it a new key (for example ["helper"]) and a label.

Set each switch in its perms to true or false.

Restart the resource, then give the rank in Config.Admins or from the Rank Management tab.

A changed label is updated for every saved staff member when the resource starts.

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page