Configuration Files
px_admin uses multiple configuration files to keep settings clean, modular, and easy to maintain.
Each file is independent, allowing server owners to customize only what they need.
Actions Configuration
File: config/actions.lua This file controls how admin actions behave, including revive systems and cooldown protections.Session Coordinates
This location is used when:
- Assisting reports
- Moving players into controlled admin areas
- Handling session-based moderation
Revive System
px_admin supports multiple revive methods for compatibility with different frameworks.
This allows px_admin to work with:
- ESX revive systems
- QBCore revive systems
- Custom revive systems
Cooldown System
Cooldowns help prevent abuse of powerful admin actions.
Each cooldown includes:
Settings Configuration
File: config/settings.lua This file controls permissions, debug logging, and Discord integration.Debug Mode
When enabled, useful logs are printed for:
- Permission checks
- Admin actions
- Report handling
- Error tracking
Permission System
px_admin supports two permission methods.Discord Role Permissions
When enabled, permissions are handled through Discord roles.
Permissions are mapped per Discord role ID.
Example permissions include:
- open
- kick
- ban
- offlineban
- unban
- editban
- teleport
- spectate
- freeze
- revive
- kill
- screenshot
- invisibility
- godmode
- noclip
- nametags
- wipe
- reports
ACE Permission Fallback
If Discord permissions are disabled, ACE permissions are used automatically.
These permissions must be granted in:
server.cfg
Example:
add_ace group.admin px_admin.open allow
Language Configuration
File: config/language.lua This file controls all kick, ban, and rejection messages. These messages support placeholders for dynamic values.Supported Placeholders
Messages include:
These messages can be fully customized to match your server branding.
Webhook Configuration
File: config/webhooks.lua This file controls Discord logging for admin activity. Each action uses its own webhook for better organization.
Separate webhooks allow server owners to:
- Route logs into different channels
- Monitor staff activity
- Track moderation history
- Maintain accountability
How It Works
px_admin loads all configuration files during resource startup.Initialization Flow
- Loads settings.lua for permissions and debug mode
- Loads actions.lua for behavior rules
- Loads language.lua for messaging
- Loads webhooks.lua for logging endpoints
Performance
px_admin is designed to remain efficient even on large servers.- Cooldown system prevents action spam
- Permission checks are lightweight
- Webhooks are triggered only when needed
- No unnecessary loops or background processing
Debugging
When Debug is enabled:
Debug mode is recommended during:
- Initial setup
- Permission testing
- Feature validation
- Development environments