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
| Key | Button | Default ranks |
|---|---|---|
announcement | Make Announcement | god, admin |
admin_tag | Admin Tag above your head | god, admin |
revive_all | Revive All Players | god, admin |
kick_all | Kick All Players | god |
delete_all_vehicles | Delete All Vehicles | god, admin |
delete_all_objects | Delete All Objects | god, admin |
delete_all_peds | Delete All Peds | god, admin |
player_names | Show Player Names | god, 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.
| Key | Button | Default ranks |
|---|---|---|
revive | Revive | god, admin, moderator |
heal | Heal | god, admin, moderator |
freeze_unfreeze | Freeze/Unfreeze | god, admin |
give_armor | Give Armor | god, admin, moderator |
give_money | Give Money | god |
bring | Bring | god, admin |
teleport | Teleport | god, admin, moderator |
give_item | Give Item | god, moderator |
openClothing | Open Clothing Menu | god |
give_weapon | Give Weapon | god |
change_job | Change Job | god |
screenshot | Screenshot | god, admin |
open_inventory | Open Inventory | god |
kick | Kick Player | god, admin |
ban | Ban Player, also offline bans from the Staff Menu | god |
In the default config moderator has give_item and admin does not. Check this line before you go live.
Vehicles
| Key | Button | Default ranks |
|---|---|---|
delete_vehicle | Delete This Car | god, admin |
repair_vehicle | Repair Car | god, admin |
spawn_vehicle | Spawn Car | god, admin |
god_mode | Vehicle God Mode | god, admin |
drift_mode | Drift Mode | god, admin |
flip_vehicle | Flip Car | god, admin |
delete_database_vehicle | Delete Database Car | god |
add_database_vehicle | Add Database Car | god |
Staff, weapons and other tabs
| Category | Key | Button | Default ranks |
|---|---|---|---|
staff | god_mode | God Mode for yourself | god, admin |
staff | invisible | Invisible | god, admin |
staff | copy_cord | Copy Coordinates | god, admin |
staff | noclip | Noclip | god |
weapon | delete_weapon | Delete Weapon | god, admin |
weapon | add_component | Add Components | god, admin |
bannedPlayers | unban | Unban in Banned Players | god |
liveConsole | sendCommand | Send a command in Live Console | god |
tickets | send_message | Not checked in this version, every staff rank can reply to tickets | god, 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.