Compatibility
CU Enhanced Target is built on ox_target and includes full compatibility layers for qtarget and qb-target, making it a drop-in replacement for existing servers.
Supported Target Systems
- ox_target - Full API compatibility
- qtarget - Complete compatibility layer
- qb-target - Complete compatibility layer
Framework Support
CU Enhanced Target works with these frameworks to provide additional features:
ox_core
- Job/gang restrictions via
groupsoption - Item requirements via
itemsoption - Full player state integration
ESX / ESX Legacy
- Job restrictions via
groupsoption - Item requirements via
itemsoption - Compatible with both ESX 1.2 and Legacy versions
QBCore / QBox
- Job/gang restrictions via
groupsoption - Item requirements via
itemsoption - Full metadata support
- Compatible with both QBCore and QBox
Note: Framework integration is optional. CU Enhanced Target works standalone without any framework.
Drop-in Replacement Guide
Option 1: Rename the Resource (Recommended)
To use as a complete drop-in replacement:
-
Rename the
cu_enchanced_targetfolder to match your current target system:ox_target- if you use ox_targetqb-target- if you use qb-targetqtarget- if you use qtarget
-
Update your
server.cfg:
# If renamed to ox_target
ensure ox_lib
ensure ox_target
# If renamed to qb-target
ensure ox_lib
ensure qb-target- All existing exports will continue working without code changes:
exports.ox_target:addSphereZone({...})
exports['qb-target']:AddBoxZone(...)
exports.qtarget:AddTargetModel(...)Option 2: Update Export Calls
Keep the folder name as cu_enchanced_target and update your scripts:
-- Before
exports.ox_target:addSphereZone({...})
-- After
exports.cu_enchanced_target:addSphereZone({...})API Compatibility
ox_target API
Full compatibility with all ox_target functions:
addSphereZone,addBoxZone,addPolyZoneremoveZone,zoneExistsaddGlobalPed,addGlobalPlayer,addGlobalVehicle,addGlobalObjectaddModel,addEntity,addLocalEntityremoveGlobalPed,removeGlobalPlayer,removeGlobalVehicle,removeGlobalObjectremoveModel,removeEntity,removeLocalEntityaddGlobalOption,removeGlobalOptiondisableTargeting,isActivegetTargetOptions
qb-target API
Compatibility layer for QBCore servers:
-- All qb-target functions work
exports['qb-target']:AddBoxZone(...)
exports['qb-target']:AddCircleZone(...)
exports['qb-target']:AddTargetModel(...)
exports['qb-target']:AddTargetEntity(...)
exports['qb-target']:RemoveZone(...)
-- etc.qtarget API
Compatibility layer for qtarget:
-- All qtarget functions work
exports.qtarget:AddBoxZone(...)
exports.qtarget:AddCircleZone(...)
exports.qtarget:AddTargetModel(...)
exports.qtarget:Vehicle(...)
exports.qtarget:Ped(...)
-- etc.Migration Notes
From ox_target
- No changes required - API is identical
- Optionally configure additional themes
- Enable target hints if desired
From qb-target
- Rename folder to
qb-targetor update export calls - All existing zones and targets will work
- Consider using ox_target style options for new code (more features)
From qtarget
- Rename folder to
qtargetor update export calls - All legacy functions work through compatibility layer
- Can use modern ox_target API for new features
Configuration Compatibility
Convars
Uses standard ox_target convars for compatibility:
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 1These work regardless of folder name.
Known Differences
From ox_target
- Additional themes - More UI theme options
- Target hints - Optional targeting tooltip system
- Extended config - Additional configuration options in config.lua
From qb-target/qtarget
- Performance - Built on ox_target architecture for better performance
- Modern API - Access to full ox_target feature set
- Better zones - More precise zone types (poly zones, etc.)
- Framework agnostic - Works without QB framework
Testing Compatibility
After migration, test these scenarios:
- Zones - Verify all existing zones still appear
- Models - Check model-based targets (ATMs, props, etc.)
- Global options - Test global ped/vehicle/object options
- Framework features - Verify job restrictions and item checks work
- Events - Ensure all event triggers function correctly
Troubleshooting
Exports not found
- Ensure you renamed the folder correctly
- Restart the entire server (not just
ensure) - Check for typos in export calls
Features not working
- Verify
ox_libis installed and starts first - Check server console for errors
- Ensure your framework is properly detected
Performance issues
- qb-target/qtarget compatibility layers may have slight overhead
- Consider migrating to native ox_target API for best performance
- Disable unused features in config