CU Enhanced Target
Configuration

Configuration

CU Enhanced Target can be configured using both config.lua and server convars.

config.lua

Located in the resource root: config.lua

Theme

Choose from multiple UI themes:

Config.Theme = "minimal"

Available themes:

  • light - Clean light theme
  • dark - Dark mode theme
  • nopixel - NoPixel inspired
  • prodigy - Prodigy inspired
  • codegreen - Matrix/green terminal style
  • studio - Professional studio theme
  • lemon - Bright yellow accents
  • crimson - Red accents
  • tilt - Angled modern design
  • ghost - Minimalist ghost theme
  • qb-core - QBCore themed
  • esx - ESX themed
  • qbox - QBox themed
  • minimal - Clean minimal (default)
  • minimal-blue - Minimal with blue accents
  • minimal-purple - Minimal with purple accents
  • minimal-mint - Minimal with mint accents

Target Hint

Configure the target hint tooltip:

Config.TargetHint = {
  enabled = true,        -- Enable/disable target hint
  requireAlt = true,     -- Require holding Alt key to show hint
  altControl = 19,       -- Control ID for Alt key (19 = Left Alt)
  pedBone = 'SKEL_Head'  -- Bone to show hint on for peds
}

Debug Mode

Enable debug visualizations:

Config.debug = false  -- Set to true to see debug markers

When enabled, you'll see:

  • Raycast hit points
  • Entity bones
  • Zone boundaries

Server Convars

Add these to your server.cfg for runtime configuration. These convars are compatible with ox_target.

Default Hotkey

Change the key to activate targeting:

setr ox_target:defaultHotkey "LMENU"

See FiveM Input Mapper Parameter IDs (opens in a new tab) for key codes.

Common keys:

  • LMENU - Left Alt (default)
  • RMENU - Right Alt
  • LCONTROL - Left Ctrl
  • CAPITAL - Caps Lock

Toggle vs Hold

Toggle targeting on/off instead of holding the key:

setr ox_target:toggleHotkey 0
  • 0 - Hold key to target (default)
  • 1 - Press key to toggle targeting on/off

Draw Sprite

Show visual markers at zone centroids:

setr ox_target:drawSprite 1
  • 0 - Disable markers
  • 1 - Show markers (default)

You can also customize the sprite:

setr ox_target:customZoneSprite 1

Default Options

Enable built-in targeting options for common actions:

setr ox_target:defaults 1
  • 0 - Disable default options
  • 1 - Enable default options (default)

Default options include:

  • Vehicle doors (open/close each door)
  • Vehicle trunk
  • Vehicle hood
  • Vehicle seats (get in specific seat)

Debug Mode

Enable debug mode via convar:

setr ox_target:debug 0
  • 0 - Debug disabled (default)
  • 1 - Debug enabled

When enabled:

  • Shows entity outlines
  • Displays raycast indicators
  • Shows zone boundaries
  • Logs additional information

Left Click Selection

Choose which mouse button selects options:

setr ox_target:leftClick 1
  • 0 - Right click to select
  • 1 - Left click to select (default)

Complete Example Configuration

server.cfg

# Target System Configuration
setr ox_target:defaultHotkey "LMENU"
setr ox_target:toggleHotkey 0
setr ox_target:drawSprite 1
setr ox_target:defaults 1
setr ox_target:debug 0
setr ox_target:leftClick 1
setr ox_target:customZoneSprite 0

config.lua

Config = {}
 
-- UI Theme
Config.Theme = "minimal"
 
-- Target Hint Configuration
Config.TargetHint = {
  enabled = true,
  requireAlt = true,
  altControl = 19,
  pedBone = 'SKEL_Head'
}
 
-- Debug Mode
Config.debug = false
 
-- Additional Options
Config.EnableTargetHints = true
Config.MaxDistance = 7.0  -- Maximum targeting distance

Performance Tips

For optimal performance:

  1. Disable debug mode in production
  2. Use specific bones instead of entity-wide targeting when possible
  3. Set appropriate distances - don't make interaction distances too large
  4. Use canInteract wisely - avoid heavy operations in canInteract functions
  5. Limit global options - too many global options can impact performance

Troubleshooting

Can't change hotkey

  • Ensure you're using setr (not set) in server.cfg
  • Restart the server completely after changing convars
  • Check console for any errors

Theme not applying

  • Verify theme name is spelled correctly (case-sensitive)
  • Check config.lua for syntax errors
  • Ensure resource restarted after config changes

Debug mode not working

  • Try both config.lua and convar methods
  • Ensure you've restarted the resource
  • Check if other resources are conflicting