Skip to content

target_selection_context_t

Info

target selection context can only be retrieved via the TARGET_SELECTION callback in all examples below ctx is the target selection context

local function on_target_selection(ctx, cmd, unpredicted_data)
    ctx:ignore_target(2) -- ignore target with index 2
end

callbacks.add(e_callbacks.TARGET_SELECTION, on_target_selection)

Functions#

prioritize_target#

prioritize the desired target with an arbitrary score

void prioritize_target(<int> player_index, [optional] <int> priority_value = 100)

Example

ctx:prioritize_target(player:get_index(), 500)

force_target#

forces the target selection to scan the desired target

Warning

if you force an invalid target the aimbot will not shoot at all, consider using prioritize_target instead

void force_target(<int> player_index)

Example

ctx:force_target(player:get_index())

ignore_target#

forces the target selection to ignore the desired target

void ignore_target(<int> player_index)

Example

ctx:ignore_target(player:get_index())