🎯Targets

UNIQUE FEATURES


Core Focus primaraly uses exactly the same export structure as in qb-target. There are a couple new variables that can be used when registering targets using core_focus, ox_target, qtarget exports. Usually put after options table besides distance variable.

Variable
Type
Description

forceColor

string (hex code)

Forces the "dot" and radial menu use this defined color.

forceSeperate

bool (true or false)

Forces the given options to form another "dot" and not merge with existing options

EXPORTS


AddCircleZone

Adds a circular zone that players can interact with

Usage :

exports.core_focus:AddCircleZone("police_armory", vector3(452.6, -980.0, 30.6), 1.5, {
  name = "police_armory",
  debugPoly = false,
  useZ = true -- optional
  }, {
  options = {
    {
      num = 1, -- optional
      type = "client",
      event = "police:openArmory",
      icon = "fas fa-archive",
      label = "Open Armory",
      targeticon = "fas fa-gun", -- optional
      item = "police_badge", -- optional
      action = function(entity) -- optional
        if IsPedAPlayer(entity) then return false end
        TriggerEvent("police:openArmoryMenu", entity)
      end,
      canInteract = function(entity, distance, data) -- optional
        return not IsPedAPlayer(entity)
      end,
      job = { ["police"] = 0, ["sheriff"] = 1 }, -- optional
      gang = { ["thelostmc"] = 2 }, -- optional
      citizenid = { ["JFD98238"] = true, ["HJS29340"] = true }, -- optional
      drawDistance = 10.0, -- optional
      drawColor = {255, 255, 255, 255}, -- optional
      successDrawColor = {0, 255, 0, 255} -- optional
    }
  },
  distance = 2.5,
  forceColor = '#3d24ab', -- optional
  forceSeperate = true -- optional
})

AddBoxZone

Adds a rectangular zone that players can interact with

Usage :


AddPolyZone

Adds a custom-shaped polygon zone that players can interact with

Usage :


AddComboZone

Adds a composite zone made up of two or more PolyZones (CircleZone, BoxZone, or PolyZone), treated as a single interactive area

Usage :


AddTargetBone

Adds targetable interaction options to specific bones of entities

Usage :

RemoveTargetBone

Removes targeting options from one or more bones on all applicable entities registered via AddTargetBone

Usage :


AddTargetEntity

Adds interaction options to a specific entity (such as a ped, vehicle, or object)

Usage :

RemoveTargetEntity

Removes specific target options from an entity by label(s).

Usage :


AddEntityZone

Adds a target zone that is dynamically attached to a specific entity. Useful for treating an entity like a movable zone (e.g. attaching interaction to a ped or vehicle)

Usage :

RemoveEntityZone

Removes a previously registered entity-based zone

Usage :


AddTargetModel

Adds interaction options to one or more models, allowing players to interact with all entities of those models (e.g. specific ped, vehicle, or prop types)

Usage :

RemoveTargetModel

Removes interaction options from one or more models.

Usage :


AddGlobalPed

Adds interaction options that apply to all peds in the world. Useful for universal interactions like restraining or identifying NPCs

Usage :

RemoveGlobalPed

Removes global interaction options from all peds.

Usage :


AddGlobalVehicle

Adds interaction options to all vehicles globally.

Usage :

RemoveGlobalVehicle

Removes global options from all vehicles.

Usage :


AddGlobalObject

Adds interaction options to all static world objects globally.

Usage :

RemoveGlobalObject

Removes global options from all world objects.

Usage :


AddGlobalPlayer

Adds interaction options to all player entities globally

Usage :

RemoveGlobalPlayer

Removes global options that apply to all player entities.

Usage :

Last updated