Skip to content

player_esp_context_t

Info

player esp context can only be retrieved via the PLAYER_ESP callback in all examples below ctx is the player esp context

local function on_player_esp(ctx)
    if ctx.dormant then
        return
    end

    ctx:add_flag("FLAG")
    ctx:add_flag("COLOR FLAG", color_t(255, 0, 0))
end

callbacks.add(e_callbacks.PLAYER_ESP, on_player_esp)

Fields#

Field Description
player
entity_t
player entity that is being rendered right now
alpha_modifier
float
alpha multiplier of the esp (range 0ยทยทยท1)
dormant
bool
whether new information about this player isnt being networked right now
render_origin
e_hitboxes
world coordinates of the player
bbox_start
e_hitboxes
2d coordinates of the esp bbox
bbox_size
e_hitboxes
2d size of the esp bbox
mode
int
team mode of this player; 1 = enemy, 0 = friendly

Functions#

add_flag#

adds a flag to the right side of the player
if no color is supplied, it will use the default flags color

void add_flag(<string> flag_name, [optional] <color_t> color)

Example

ctx:add_flag("FLAG")
ctx:add_flag("COLOR FLAG", color_t(255, 0, 0))

set_font#

overrides the main font for this player

void set_font(<font_t> font)

Example

ctx:set_font(font)

set_small_font#

overrides the small font for this player (e.g. used for flags)

void set_small_font(<font_t> font)

Example

ctx:set_small_font(font)