Main Config

This guide will help you understand and modify the configuration for the Police Training training system, a tactical police training resource for FiveM servers.

Table of Contents


Basic Settings

Debug Mode

Config.Debug = false
  • Purpose: Enables debug logging and additional console output

  • Values: true or false

  • Recommendation: Keep false in production

Routing Bucket

  • Purpose: The routing bucket players are placed in after completing training

  • Values: Any integer

  • Note: Most servers should keep this as 0 (default world)


Police & Permission Settings

Police Jobs

  • Purpose: Defines which job names can access the training system

  • Format: Table of strings

  • Example: Add more jobs like { 'police', 'sheriff', 'state' - set to false to disable.

Minimum Grade Requirement

  • Purpose: Minimum job grade required to access training for all jobs defined in Config.PoliceRole

Discord Role Verification (Optional)

  • Purpose: Additional permission layer using Discord roles for those starting the match

  • Setup: Set DiscordRoleCheck = true and add your Discord role names, you'll need to set this up with your own role check script in config-client.lua under the function roleCheck()


Game Mechanics

Hostage Behaviour

  • Purpose: Percentage chance (0-100) that a hostage will become hostile when players attempt to cuff them

  • Balance: Higher values = more challenging scenarios

Hostage Death Consequences

  • Purpose: Adds a consequence to killing a hostage who is not hostile

  • Options:

    • 'mask' - Replaces player's mask as punishment

    • 'death' - Kills the player

    • false - No consequence

Mask Punishment Settings (if using 'mask' option)


Player & NPC Configuration

Default Guard/Hostage Stats

  • Health: 1-200 (100 = full health)

  • Armor: 0-100 (0 = no armor)

  • Accuracy: 0-100 (affects AI accuracy)

NPC Guard Models

  • Purpose: Random selection of guard/enemy models

  • Format: Valid GTA V ped model names

Default Weapons


UI & Notifications

Radio Settings

  • useRadio: Enable/disable automatic radio channel assignment

  • defaultRadio: Channel number to assign players

  • Radio Script: Will need to implement your own radio script functionality in config-client.lua.

Notification Settings


Weapons Configuration

The weapons table defines available weapons in the training system:

Adding New Weapons


Map Selection System


Best Practices

Performance Optimization

  • Keep enemy counts reasonable (15-30 for most maps)

  • Use polyZones to limit map boundaries

  • Test maps with multiple players

Balance Considerations

  • Outdoor maps can handle more enemies

  • Indoor maps should have fewer enemies but more tactical complexity

  • Consider sightlines and cover when placing enemies

Testing New Maps

  1. Load the map with debug enabled

  2. Test with minimum and maximum enemy counts

  3. Verify all spawn points are accessible

  4. Check that polyZone boundaries work correctly

  5. Test with multiple players

Troubleshooting Common Issues

Players spawning in walls/ground:

  • Check Z coordinate accuracy

  • Ensure findZ = true for external maps if needed

Enemies not spawning:

  • Verify coordinate format (vector4 with heading)

  • Check that coordinates are within the map boundaries

Menu not displaying maps:

  • Confirm menuId matches between map and menu configuration

  • Verify all required fields are present

Performance issues:

  • Reduce enemy counts

  • Optimize polyZone point count

  • Check for overlapping spawn points


Support & Resources

  • Coordinates: Use in-game coordinate tools or scripts

  • Icons: Font Awesome icons (fa-solid, fa-regular, etc.)

  • Models: GTA V ped and vehicle spawn names

  • IPL: bob74_ipl documentation for interior configuration

Remember to restart your resource after making configuration changes!

Last updated