🛡️ Admin
Documentation relating to the spooni_admin.
1. Installation
spooni_admin needs spooni_libs (it works alongside your framework through its bridge).
To install spooni_admin:
- Download the resource
- Ensure that all requirements are installed
- Drag and drop the resource into your resources folder
spooni_admin
- Add this ensure in your server.cfg (after spooni_libs and oxmysql)bash
ensure oxmysql ensure spooni_libs ensure spooni_admin # "Restart Server" button (Admin Menu → Server): lets the panel stop the # process so your monitor (txAdmin / Pterodactyl) can bring it back up. add_ace resource.spooni_admin command.quit allow # OPTIONAL — Discord roles (admin grades + whitelist). Shared with spooni_chat, # so you set them once for both. Use "set" (never "sets") so the token stays # on the server. Leave them out to keep every Discord feature off. set spooni_discord_token "YOUR_BOT_TOKEN" set spooni_discord_guild_id "YOUR_DISCORD_SERVER_ID" - Now you can configure and translate the script as you like
config.lualanguage.lua
- At the end, restart the server
TIP
The spooni_admin database table is created automatically on first start — no SQL import needed.
If you have any problems, you can always open a ticket in the Spooni Discord.
2. Usage
Staff open a clean NUI menu from in-game to run the whole server: revive, heal, freeze, kill, spectate, jail, bring and goto players, give money, gold, items and weapons, spawn wagons and horses, toggle noclip and god mode, and manage warns, bans and the connect whitelist.
Players open tickets in-game that staff answer from the panel, while a live dashboard, in-game staff & role management, a built-in staff chat and optional Discord-role authority keep the team organised. Every action is permission-gated by grade and translated into 7 languages.
The Discord bot settings are shared with spooni_chat, so both scripts use the same token and guild ID.
3. For developers
Reference
All exports are server side.
-- the player's resolved admin role (highest from config masters, in-game grades
-- and Discord roles), or false
local role = exports.spooni_admin:GetPlayerRole(source)
-- the list of configured admin grade names (ADMIN / MODERATOR / HELPER ...)
local roles = exports.spooni_admin:GetRoles()
-- the player's Discord role ids (cached), or false — reused by spooni_chat
local droles = exports.spooni_admin:GetPlayerDiscordRoles(source)