Notes
Credits & Attribution
CU Enhanced Target is based on ox_target (opens in a new tab) by Community Ox (opens in a new tab).
We extend our gratitude to the Community Ox team for their excellent work on the ox_target foundation.
Licensing
This resource includes:
- ox_target base - Licensed under GPL-3.0 (see
LICENSE) - Proprietary enhancements - See
LICENSE.PROPRIETARYfor details
What's Proprietary?
The following enhancements are proprietary:
- Additional UI themes beyond ox_target's defaults
- Target hint system and tooltip features
- Custom configuration extensions
- Branding and visual customizations
What's Open Source?
The core ox_target functionality remains under GPL-3.0:
- All base targeting functions
- Zone creation and management
- Entity targeting system
- Framework integrations
- Core API
Upstream Project
- Original Project: ox_target (opens in a new tab)
- Documentation: ox_target docs (opens in a new tab)
- Community: Community Ox Discord (opens in a new tab)
Reporting Issues
For ox_target Related Issues
If you encounter issues with core targeting functionality:
- Check ox_target documentation (opens in a new tab)
- Search ox_target issues (opens in a new tab)
- Report to Community Ox if it's an upstream bug
For CU Enhanced Target Issues
For issues specific to CU Enhanced Target enhancements (themes, hints, etc.):
- Contact CodeUniverse support
- Check this documentation
- Review your configuration
Performance Considerations
Optimization Tips
- Limit global options - Each global option is checked on every entity
- Use specific bones - Bone targeting is more precise than entity-wide
- Set appropriate distances - Larger distances increase processing
- Optimize canInteract - Avoid expensive operations in this function
- Disable debug mode - Always disable in production
Benchmarks
Based on ox_target performance:
- Entity checks: < 0.01ms per frame
- Zone checks: < 0.02ms per frame
- Raycast: < 0.05ms per frame
CU Enhanced Target maintains similar performance while adding:
- Theme system: negligible impact
- Target hints: ~0.01ms when enabled
Best Practices
Resource Naming
- Use
ox_targetname for maximum compatibility - Use
qb-targetfor QBCore servers - Use
cu_enchanced_targetfor new projects
Code Organization
-- Group related options together
local atmOptions = {
{
name = 'atm_withdraw',
label = 'Withdraw',
icon = 'fa-solid fa-money-bill',
event = 'bank:withdraw'
},
{
name = 'atm_deposit',
label = 'Deposit',
icon = 'fa-solid fa-piggy-bank',
event = 'bank:deposit'
}
}
exports.cu_enchanced_target:addModel('prop_atm_01', atmOptions)Cleanup
Always clean up targets when resources stop:
AddEventHandler('onResourceStop', function(resourceName)
if GetCurrentResourceName() ~= resourceName then return end
-- Remove all zones
exports.cu_enchanced_target:removeZone('my_zone_1')
exports.cu_enchanced_target:removeZone('my_zone_2')
-- Remove model options
exports.cu_enchanced_target:removeModel('prop_atm_01', 'my_option')
end)Version Compatibility
ox_lib Version
Requires ox_lib v3.0.0 or higher
Framework Versions
- ox_core: Any recent version
- ESX: 1.2+ or Legacy (1.8+)
- QBCore: Latest recommended
- QBox: Latest recommended
Advanced Features
Custom Sprites
You can customize zone sprites via convars:
setr ox_target:customZoneSprite 1
setr ox_target:drawSprite 24 # Sprite dictionary IDDebug Visualization
Enable comprehensive debug mode:
Config.debug = trueShows:
- Raycast hit points (red marker)
- Entity bones (green markers)
- Zone boundaries (colored boxes/spheres)
- Entity outlines
Network vs Local Entities
Network entities:
- Synced across all clients
- Use
addEntitywith network ID - Required for multiplayer interactions
Local entities:
- Client-side only
- Use
addLocalEntitywith entity handle - Good for single-player NPC interactions
Future Updates
CU Enhanced Target is actively maintained and updated with:
- New themes
- Performance improvements
- Bug fixes
- Feature additions
- Upstream ox_target updates
Check documentation regularly for updates.
Community & Support
Resources
- CodeUniverse Documentation
- ox_target Documentation (opens in a new tab)
- FiveM Native Reference (opens in a new tab)
- Font Awesome Icons (opens in a new tab)
Getting Help
- Read this documentation thoroughly
- Check the Usage Examples page
- Review Configuration options
- Contact CodeUniverse support for paid features
- Check Community Ox Discord for ox_target specific issues