CU Enhanced Target
Compatibility

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 groups option
  • Item requirements via items option
  • Full player state integration

ESX / ESX Legacy

  • Job restrictions via groups option
  • Item requirements via items option
  • Compatible with both ESX 1.2 and Legacy versions

QBCore / QBox

  • Job/gang restrictions via groups option
  • Item requirements via items option
  • 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:

  1. Rename the cu_enchanced_target folder to match your current target system:

    • ox_target - if you use ox_target
    • qb-target - if you use qb-target
    • qtarget - if you use qtarget
  2. 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
  1. 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, addPolyZone
  • removeZone, zoneExists
  • addGlobalPed, addGlobalPlayer, addGlobalVehicle, addGlobalObject
  • addModel, addEntity, addLocalEntity
  • removeGlobalPed, removeGlobalPlayer, removeGlobalVehicle, removeGlobalObject
  • removeModel, removeEntity, removeLocalEntity
  • addGlobalOption, removeGlobalOption
  • disableTargeting, isActive
  • getTargetOptions

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

  1. No changes required - API is identical
  2. Optionally configure additional themes
  3. Enable target hints if desired

From qb-target

  1. Rename folder to qb-target or update export calls
  2. All existing zones and targets will work
  3. Consider using ox_target style options for new code (more features)

From qtarget

  1. Rename folder to qtarget or update export calls
  2. All legacy functions work through compatibility layer
  3. 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 1

These 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:

  1. Zones - Verify all existing zones still appear
  2. Models - Check model-based targets (ATMs, props, etc.)
  3. Global options - Test global ped/vehicle/object options
  4. Framework features - Verify job restrictions and item checks work
  5. 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_lib is 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