Requirements
- A working FiveM server
- Basic access to your server files and
server.cfg - Permission system (Discord roles or ACE permissions)
- screencapture (https://github.com/itschip/screencapture)
- MugShotBase64 (https://github.com/BaziForYou/MugShotBase64)
Required when Discord permissions are disabled.
Used to generate player mugshot images when Discord avatars are not available.
- Discord bot (only required if using Discord role permissions)
- Webhook URLs (recommended for moderation logging)
Setup
-
Download the
px_adminresource. -
Place the folder into your server’s resources directory.
Example structure:
resources/px_admin -
Open your
server.cfgand add the resource: ensure px_admin - Restart your server or run a refresh and start the resource manually.
Initial Configuration
All behavior is controlled inside: config/ Before using px_admin, you should review the following files:settings.lua
This file controls permissions and debug behavior. If using ACE permissions:- Leave
Discord.enabledset tofalse - Add ACE permissions in your
server.cfg
add_ace group.admin px_admin.kick allow
add_ace group.admin px_admin.ban allow
add_ace group.admin px_admin.revive allow If using Discord permissions:
- Set
Discord.enabledtotrue - Enter your:
- Discord Bot Token
- Guild ID
- Role IDs
actions.lua
This file controls how admin actions behave. Important settings include:- Session teleport location
- Revive system type
- Action cooldown protection
reviveEvent
reviveExportResource
reviveExportName These values allow px_admin to work with nearly any framework.
webhooks.lua (Optional)
Webhook logging is recommended for moderation tracking. Add your Discord webhook URLs for:- Kicks
- Bans
- Reports
- Revives
- Screenshots
- Other admin actions
language.lua
This file controls kick and ban messages shown to players. You can customize:- Kick messages
- Ban messages
- Rejection messages
- Permanent ban messages
How it starts
When the resource loads:- Configuration files are loaded
- Permission system initializes
- Admin systems register events
- Webhook logging becomes available
- Cooldown tracking starts
- Admin menu becomes accessible to authorized users
Troubleshooting
If the resource does not behave as expected:- Make sure the resource name is exactly
px_admin - Confirm it is started after required dependencies
- Verify permissions are properly configured
- Check your server console for debug logs
- Enable Debug in
settings.luaif needed
- Check ACE permissions or Discord role configuration
- Verify correct permission flags are assigned
- Confirm revive settings match your framework
- Verify permission access is granted
- Ensure webhook URLs are valid
- Check server console for webhook errors