🙋entities
This table represents an internal entity list.
Never store any entities in the global scope! Any entity might get deleted, and you will no longer have a valid instance of that entity, which will inevitably lead to a crash. If you need to globally store an entity somewhere, we strongly recommend you store an instance of chandle, and use it's get method to retrieve the entity again, when needed.
players
Field
Type: entity_list_t<cs2_player_pawn>
Player pawns.
controllers
Field
Type: entity_list_t<cs2_player_controller>
Player controllers.
items
Field
Type: entity_list_t<cs2_weapon_base>
Items (held).
dropped_items
Field
Type: entity_list_t<cs2_weapon_base>
Dropped items.
projectiles
Field
Type: entity_list_t<cs2_grenade_projectile>
Grenade projectiles.
get_local_pawn
Function
Returns the local player's pawn.
Arguments
None.
Returns
Type
Description
Pawn.
Example
local lp = entities.get_local_pawn();get_local_controller
Function
Returns the local player's controller.
Arguments
None.
Returns
Type
Description
Controller.
Example
local lp_ctrl = entities.get_local_controller();Last updated