🙋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
Type: entity_list_t<cs2_player_pawn>
Player pawns.
controllers
Type: entity_list_t<cs2_player_controller>
Player controllers.
items
Type: entity_list_t<cs2_weapon_base>
Items (held).
dropped_items
Type: entity_list_t<cs2_weapon_base>
Dropped items.
projectiles
Type: entity_list_t<cs2_grenade_projectile>
Grenade projectiles.
get_local_pawn
Returns the local player's pawn.
Arguments
None.
Returns
Type
Description
Pawn.
Example
local lp = entities.get_local_pawn();
get_local_controller
Returns the local player's controller.
Arguments
None.
Returns
Type
Description
Controller.
Example
local lp_ctrl = entities.get_local_controller();
Last updated