Skip to content
KS-Target

KS-Target

Installation

  1. Unzip the delivered archive into your resources/ folder, under the name ks-target.
  2. Import the provided install.sql file into your database.
  3. Add ensure ks-target to your server.cfg, after oxmysql and qb-core.
  4. Restart your server.

Configuration

Config.MaxDistance = 2.5      -- portée de détection, en mètres
Config.CursorFrequency = 5    -- fréquence de rafraîchissement du raycast (Hz)
Config.CompatMode = true      -- active la couche de compatibilité qb-target / ox_target

Lower CursorFrequency on a busy server to save resources — the effect on aiming precision stays negligible below 10 Hz.

Registering a new interaction

A targetable zone is declared with the same syntax as ox_target, for an immediate migration:

exports['ks-target']:AddBoxZone('atm_1', vector3(-1040.9, -2745.6, 20.2), 1.0, 1.0, {
  options = {
    { label = "Retirer de l'argent", icon = "fa-solid fa-money-bill", action = function() end },
  },
})

Existing zones declared through qb-target or ox_target are picked up automatically when Config.CompatMode is on — no migration needed for scripts already in place.

Common issues

My old qb-target scripts no longer show any options. Check that Config.CompatMode is set to true and that ks-target starts after your old target script in server.cfg — the compatibility layer intercepts its exports at startup.

Mouse-aim targeting doesn’t trigger. The free cursor needs SetMouseCursorActiveThisFrame active — check that no other script is permanently capturing NUI focus (an always-open menu, for instance).

Something not covered here? Join our Discord.