LuaBeans Duty
LuaBeans Duty provides the in-game menu interface for the duty system, allowing players to access vehicles, uniforms, loadouts, and locations while on duty.
Overview
LuaBeans Duty is the UI layer that works alongside LuaBeans Bridge to provide a complete duty system experience. It includes:
Duty menu for selecting departments and going on/off duty
Vehicle spawning menu
Uniform selection menu
Loadout selection menu
Location markers and waypoints
Installation
Prerequisites
LuaBeans Duty requires LuaBeans Bridge to be installed and running first.
Step 1: Copy Resource
Copy the luabeans_duty resource folder into your FiveM server's resources directory:
cp -r /path/to/luabeans_duty fivem-server/resources/Step 2: Configure Server
Add to your server.cfg (after luabeans):
Important: luabeans_duty must be started after luabeans.
Step 3: Verify Installation
Ensure both resources start without errors
Join server and test
/dutycommandVerify menu appears when using commands
Commands
/duty
Open duty selection menu and go on duty.
Usage: /duty
Behavior:
Shows menu with available departments
Player selects department
Confirmation prompt appears
Player goes on duty after confirmation
/dutyrefresh
Refresh player profile data from web panel.
Usage: /dutyrefresh
Behavior:
Fetches latest departments and ranks
Updates permissions cache
Refreshes duty options
/duty_menu
Open the duty management menu.
Usage: /duty_menu
Behavior:
Opens menu with options:
Vehicles
Uniforms
Loadouts
Locations
Go Off Duty
Events
Client Events
luabeans_duty:client:duty_menu
Open the duty menu programmatically.
luabeans_duty:client:duty
Open duty selection menu programmatically.
Server Events
You can listen to duty events from LuaBeans Bridge (see Bridge documentation).
Menu System
LuaBeans Duty uses a custom menu system built with FiveM's native UI. The menus are:
Duty Selection Menu
Displays when using /duty command:
Lists available departments
Shows department names and icons
Allows department selection
Shows confirmation before going on duty
Main Duty Menu
Accessible via /duty_menu command:
Vehicles - Spawn department vehicles
Uniforms - Change into department uniforms
Loadouts - Get department loadouts
Locations - View department locations
Go Off Duty - End duty session
Vehicle Menu
Lists available vehicles for the player's rank:
Vehicle categories (if configured)
Vehicle names and spawn codes
Rank requirements
Spawn location
Uniform Menu
Lists available uniforms for the player:
Gender-specific options (male/female/both)
Uniform categories
Rank requirements
Preview information
Loadout Menu
Lists available loadouts:
Weapons and items
Rank requirements
Loadout categories
Equipment details
Locations Menu
Shows department locations:
Location types (duty, garage, armory, locker)
Coordinates
Set waypoints
Location markers
Configuration
Edit config.lua to customize behavior:
ACE Permissions on Duty
Grant ACE permissions automatically when players go on duty:
Menu Customization
You can customize menu appearance and behavior in config.lua:
Integration with Custom Menu Systems
If you use a custom menu system (like qb-menu or ox_lib), you can replace the default menu system:
Using ox_lib
Replace client/menu.lua with your custom implementation:
Duty Confirmation
When a player selects a department to go on duty, a confirmation prompt appears:
This prevents accidental duty toggling.
Troubleshooting
Menu Not Appearing
Issue: /duty_menu doesn't show menu
Solutions:
Verify player is on duty (use
/dutyfirst)Check LuaBeans Bridge is running
Verify player has department assigned
Check console for errors
No Vehicles/Uniforms Showing
Issue: Menu is empty or missing options
Solutions:
Verify items are configured in web panel
Check player's rank meets requirements
Verify department has vehicles/uniforms configured
Refresh player data:
/dutyrefresh
Commands Not Working
Issue: Commands don't respond
Solutions:
Verify resource is started:
ensure luabeans_dutyCheck command registration in console
Verify player has access
Check resource dependencies (LuaBeans Bridge)
Permission Errors
Issue: Player can't access certain options
Solutions:
Check rank permissions in web panel
Verify player's rank meets requirements
Check department assignment
Refresh player data
Menu System Conflicts
Issue: Menu conflicts with other resources
Solutions:
Adjust menu positioning in
config.luaChange keybinds if conflicts exist
Customize menu implementation
Coordinate with other menu resources
Features by Department Type
LEO Departments
Full vehicle spawning
Uniform management
Loadout system
Location markers
Rank-based access
Staff Departments
Basic vehicle access
Uniform selection
Location markers
Simplified loadouts
Business Departments
Vehicle access (business vehicles)
Uniform options (if configured)
Location markers
Custom permissions
Advanced Configuration
Custom Vehicle Spawning
Override default vehicle spawning behavior:
Custom Uniform Application
Override uniform application:
Custom Loadout Application
Override loadout application:
Performance Considerations
Menus are client-side only
Minimal server impact
Data is cached by LuaBeans Bridge
Efficient native menu rendering
Requirements
LuaBeans Bridge - Required dependency
Discord Identifiers - Required for all players
FiveM Server - Latest recommended build
Support
For issues with LuaBeans Duty:
Check LuaBeans Bridge is running
Verify configuration in
config.luaCheck console for errors
Review Troubleshooting section
See Bridge documentation for API issues
Related Documentation
LuaBeans Bridge - Core integration resource
LEO Duty System - Web panel configuration
FiveM Configuration - Complete FiveM setup guide
Last updated
