Skip to content

entitylist

get

entitylist.get(idx_or_user_id: number, is_user_id?: boolean): entity_t

Name Type Description
idx_or_user_id number Index or User ID of the player
is_user_id boolean Optional. Defaults to false. Is value a user ID

get_local_player

entitylist.get_local_player(): entity_t


get_entities

entitylist.get_entities(class_name_or_id: string|number|nil, include_dormant: boolean): entity_t[]

Name Type Description
class_name_or_id string|number|nil Name or ID of the class. nil to get all entities
include_dormant boolean Whether to include dormant entities or not

entitylist.get_entities(class_name_or_id: string|number|nil, include_dormant: boolean, callback: function)

Name Type Description
class_name_or_id string|number|nil Name or ID of the class. nil to get all entities
include_dormant boolean Whether to include dormant entities or not
callback function Callback function, that receives entity_t as an argument
1
2
3
entitylist.get_entities("CCSPlayer", false, function(entity)
    render.circle_fade_3d(entity:get_origin(), 50, color_t.new(1, 0, 0, 0.5), color_t.new(1, 0, 0, 0))
end)