In-Game Configuration - Admin Menu
If you are stuck, or run into problems. Just review this and ensure you didn't do anything wrong within the config.
Example Config:
--[[
To open the menu, use /admin (can be changed in the config.lua file).
You can use commands or buttons within the menu to perform actions against players.
Commands:
- /ban <id> <duration> <reason> - Bans a player for a specified duration and reason.
- /kick <id> <reason> - Kicks a player for a specified reason.
- /commend <id> <reason> - Commends a player for a specified reason.
- /warn <id> <reason> - Warns a player for a specified reason.
- /trustscore <id> - Shows the trustscore of a player.
- /f <id> - Toggle freeze on a player.
- /s <id> - Summon a player to your location.
- /tp <id> - Teleport to a player.
- /tpv <id> - Teleport into a player's vehicle.
- /ss <id> - Take a screenshot of a player.
- /playernames - Toggle player names on/off.
]]
CONFIG = {
DEBUG = false, -- If you want to see debug messages, set this to true.
URL = 'https://store.hamz.dev/', -- Panel Link, with a "/" at the end of the link
SERVER = 'YOUR SERVER NAME', -- Server name, this is the same name you entered on the panel
TOKEN = 'YOUR SECRET KEY', -- Same token/secretkey from the config.php
DISCORD_LINK = 'https://discord.gg/3DDWp6w', -- Discord link
DISCORD_WEBHOOK = 'https://discord.com/api/webhooks/1234567890/abcdefghijklmnopqrstuvwxyz1234567890', -- Discord webhook
DISCORD_IMAGE = '', -- Just for the logs
DEFAULT_COMMAND = 'admin', -- Default command to open the menu
PERMISSIONS = {
TYPE = 'DISCORD', -- 'DISCORD' or 'ACE'
ACE = {
BAN_PLAYER = 'hamzstaff.banplayer',
KICK_PLAYER = 'hamzstaff.kickplayer',
NOTE_PLAYER = 'hamzstaff.noteplayer',
COMMEND_PLAYER = 'hamzstaff.commendplayer',
WARN_PLAYER = 'hamzstaff.warnplayer',
GET_PLAYERS = 'hamzstaff.getplayers',
SUMMON_PLAYER = 'hamzstaff.summonplayer', -- To summon a player
TELEPORT_PLAYER = 'hamzstaff.teleportplayer', -- To teleport to a player
FREEZE_PLAYER = 'hamzstaff.freezePlayer', -- To freeze/unfreeze a player
TP_IN_PLAYER_VEHICLE = 'hamzstaff.teleportinvehicle', -- To teleport into a player's vehicle
SCREENSHOT_PLAYER = 'hamzstaff.screenshotplayer', -- To screenshot a player
IMMUNE_STAFF = 'hamzstaff.immune' -- Staff that are immune to staff actions
},
DISCORD = {
DISCORD_RESOURCE_NAME = 'Badger_Discord_API',
BAN_PLAYER = {
'1125449225069666377'
},
KICK_PLAYER = {
'1125449225069666377'
},
NOTE_PLAYER = {
'1125449225069666377'
},
COMMEND_PLAYER = {
'1125449225069666377'
},
WARN_PLAYER = {
'1125449225069666377'
},
GET_PLAYERS = {
'1125449225069666377'
},
SUMMON_PLAYER = {'1125449225069666377'}, -- To summon a player
TELEPORT_PLAYER = {'1125449225069666377'}, -- To teleport to a player
FREEZE_PLAYER = {'1125449225069666377'}, -- To freeze/unfreeze a player
TP_IN_PLAYER_VEHICLE = {'1125449225069666377'}, -- To teleport into a player's vehicle
SCREENSHOT_PLAYER = {'1125449225069666377'}, -- To screenshot a player
IMMUNE_STAFF = {'1125449225069666377'} -- Staff that are immune to staff actions
}
},
UI_SETTINGS = {
SHOW_STAFF = false, -- If you want to show the staff tag in the player info, set this to true.
SHOW_INFO_TYPE = false -- If you want "Trustscore"/"Playtime" word to be shown in the info type, set this to true.
},
TELL_THE_WORLD = {
BAN = true, -- If you want to tell the world when a player is banned, set this to true. If not only the target player will see the ban message.
KICK = true, -- If you want to tell the world when a player is kicked, set this to true. If not only the target player will see the kick message.
COMMEND = true, -- If you want to tell the world when a player is commended, set this to true. If not only the target player will see the commendation.
WARN = true -- If you want to tell the world when a player is warned, set this to true. If not only the target player will see the warning.
},
USE_TX_ADMIN_WARNING = {
ENABLED = true, -- If you want to use txAdmins warning message, set this to true.
SHOW_STAFF_NAME = true -- If you want to show the staff name in the warning message, set this to true. If not it will show "Staff Member"
},
KEYBIND = {
ENABLED = true, -- If you want to use the keybind to open the menu, set this to true.
KEY = 'F9' -- Keybind to open the menu (https://docs.fivem.net/docs/game-references/controls/) Use the "Default QWERTY" name.
}
}
CONFIG.OPTIONS = {
{
actions = {
type = 'command',
action = 'playernames'
},
name = 'player_names', -- This is the name of the option, it is used to save the state of the option
title = 'Player Names (DISCORD PERMS)',
description = 'Toggle player names on/off.',
args = {},
submit = 'Execute',
permissions = {'1125449225069666377'}
},
{
actions = {
type = 'command',
action = 'playernames'
},
name = 'player_names_ace',
title = 'Player Names (ACE PERMS)',
description = 'Toggle player names on/off.',
args = {},
submit = 'Execute',
permissions = {'hamzstaff.playernames'}
},
{
actions = {
type = 'event',
event = 'server',
action = 'admin:invisible'
},
name = 'invisible',
title = 'Toggle Cloak',
description = 'Toggle your visibility.',
args = {},
submit = 'Execute',
permissions = {'1125449225069666377'}
}
}
CONFIG.SCREENSHOT = {
SCREENSHOT_RESOURCE_NAME = 'screenshot-basic', -- The resource name for the screenshot
CLIENT_SCREENSHOT_WEBHOOK = 'https://discord.com/api/webhooks/1234567890/abcdefghijklmnopqrstuvwxyz1234567890', -- Webhook for the client screenshot, make a hidden channel or a channel in another server. Just in case someone abuses it
SERVER_SCREENSHOT_WEBHOOK = 'https://discord.com/api/webhooks/1234567890/abcdefghijklmnopqrstuvwxyz1234567890' -- The webhook that is shown to staff, this is the main webhook
}Things to be aware of
Debug
URL
Server Name
UI Settings
Tell The World
TxAdmin Warning
Permissions
Discord Resource Name
Keybind
Screenshot
Options
Adding a command:
Last updated