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 themedark- Dark mode themenopixel- NoPixel inspiredprodigy- Prodigy inspiredcodegreen- Matrix/green terminal stylestudio- Professional studio themelemon- Bright yellow accentscrimson- Red accentstilt- Angled modern designghost- Minimalist ghost themeqb-core- QBCore themedesx- ESX themedqbox- QBox themedminimal- Clean minimal (default)minimal-blue- Minimal with blue accentsminimal-purple- Minimal with purple accentsminimal-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 markersWhen 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 AltLCONTROL- Left CtrlCAPITAL- Caps Lock
Toggle vs Hold
Toggle targeting on/off instead of holding the key:
setr ox_target:toggleHotkey 00- 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 10- Disable markers1- Show markers (default)
You can also customize the sprite:
setr ox_target:customZoneSprite 1Default Options
Enable built-in targeting options for common actions:
setr ox_target:defaults 10- Disable default options1- 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 00- 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 10- Right click to select1- 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 0config.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 distancePerformance Tips
For optimal performance:
- Disable debug mode in production
- Use specific bones instead of entity-wide targeting when possible
- Set appropriate distances - don't make interaction distances too large
- Use canInteract wisely - avoid heavy operations in canInteract functions
- Limit global options - too many global options can impact performance
Troubleshooting
Can't change hotkey
- Ensure you're using
setr(notset) 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