This type represents a base game entity.
This type may be returned for any other abstract entity class, but internally will point to the correct type.
Function
Attemps to search for a field in this class.
Arguments
Name
Type
Description
name
string
Field name.
Returns
Type
Description
Accessor instance or pointer accessor instance
Example
Function
Returns schema class name.
Returns
Type
Description
string
Name. Returns nil
when failed.
Example
Function
Safe-casts the entity to cs2_weapon_base_gun, returns nil if not a weapon_base_gun
Returns
Type
Description
cs2_weapon_base_gun?
Casted entity. Returns nil
if the cast failed.
Example
Function
Safe-casts the entity to cs2_weapon_base, returns nil if not a weapon_base
Returns
Type
Description
cs2_weapon_base?
Casted entity. Returns nil
if the cast failed.
Example
Function
Safe-casts the entity to cs2_player_pawn, returns nil if not a player_pawn
Returns
Type
Description
cs2_player_pawn?
Casted entity. Returns nil
if the cast failed.
Example
Function
Safe-casts the entity to cs2_player_controller, returns nil if not a player_controller
Returns
Type
Description
cs2_player_controller?
Casted entity. Returns nil
if the cast failed.
Example
This type represents a special structure that references a certain field in the entity object.
Do not ever store an instance of this type anywhere but in a scope of an event because entity might be removed.
Returns the value.
Arguments
None.
Returns
Type
Description
<type>
Value.
Example
Sets the value.
Arguments
Name
Type
Description
value
<type>
Value.
Returns
Nothing.
Example
This type represents a CCSWeaponBaseGun
class.
Returns the absolute origin (the one that is used for rendering).
Arguments
None.
Returns
Type
Description
Origin.
Example
Returns the maximal player speed when holding this weapon.
Arguments
None.
Returns
Type
Description
float
Max speed, in UPS.
Example
Returns the current inaccuracy value.
Arguments
Name
Type
Description
Returns
Type
Description
float
Inaccuracy value.
Example
Returns the current spread value.
Arguments
Name
Type
Description
Returns
Type
Description
float
Inaccuracy value.
Example
Returns the weapon ID.
Arguments
None.
Returns
Type
Description
Weapon ID.
Example
Returns the weapon type.
Arguments
None.
Returns
Type
Description
Weapon type.
Example
Returns the weapon static data.
Arguments
None.
Returns
Type
Description
Weapon data.
Example
Returns true
if this weapon is a firearm.
Arguments
None.
Returns
Type
Description
bool
true
if a firearm.
Example
Returns true
if you can attack with this weapon.
Arguments
None.
Returns
Type
Description
bool
true
if can attack.
Example
Returns true
if this weapon has a secondary attack mode.
Arguments
None.
Returns
Type
Description
bool
true
if has the secondary attack mode.
Example
Returns true
if this weapon has spread (e.g. knives do not have any spread).
Arguments
None.
Returns
Type
Description
bool
true
if has spread.
Example
This type represents a C_CSPlayerPawn
class.
Returns true
if the game will draw this player on screen.
Arguments
None.
Returns
Type
Description
bool
true
if will.
Example
Returns true
if left-hand mode is enabled.
Arguments
None.
Returns
Type
Description
bool
true
if left-handed.
Example
Returns the absolute origin (the one that is used for rendering).
Arguments
None.
Returns
Type
Description
Origin.
Example
Returns the absolute angles (the one that is used for rendering).
Arguments
None.
Returns
Type
Description
Angles.
Example
Method
Returns the absolute velocity.
Arguments
None.
Returns
Type
Description
Velocity.
Example
Sets the new absolute origin.
Arguments
Name
Type
Description
Returns
Nothing.
Example
Sets new absolute angles.
Arguments
Name
Type
Description
Returns
Nothing.
Example
Method
Sets new absolute velocity.
Arguments
Name
Type
Description
Returns
Nothing.
Example
Returns true
if the player is alive.
Arguments
None.
Returns
Type
Description
bool
true
if alive.
Example
Returns true
if this player is an enemy to the local player.
Arguments
None.
Returns
Type
Description
bool
true
if an enemy.
Example
Returns whether this player is an enemy to another entity.
Arguments
Name
Type
Description
Returns
Type
Description
bool
true
if an enemy.
Example
Returns the active weapon.
Arguments
None.
Returns
Type
Description
Weapon instance.
Example
Returns the sanitized player name.
Arguments
None.
Returns
Type
Description
string
Player's name.
Example
Returns the player's view offset (eye location relative to the player's origin).
Arguments
None.
Returns
Type
Description
View offset.
Example
Returns the player's eye position.
Arguments
None.
Returns
Type
Description
Eye position.
Example
This type represents a CCSPlayerController
class.
Returns true
if this player is an enemy to the local player.
Arguments
None.
Returns
Type
Description
bool
true
if an enemy.
Example
Returns the sanitized player name.
Arguments
None.
Returns
Type
Description
string
Player's name.
Example
Returns the pawn attached to this controller.
Arguments
None.
Returns
Type
Description
Pawn instance.
Example
Returns the active weapon.
Arguments
None.
Returns
Type
Description
Weapon instance.
Example
Returns the observer pawn used for this controller.
Arguments
None.
Returns
Type
Description
Entity.
Example
Returns the pawn this controller is currently observing.
Arguments
None.
Returns
Type
Description
Entity.
Example
Returns the current observer mode.
Arguments
None.
Returns
Type
Description
Observer mode.
Example
This type represents a CCSWeaponBase
entity.
Returns the absolute origin (the one that is used for rendering).
Arguments
None.
Returns
Type
Description
Origin.
Example
Returns the weapon ID.
Arguments
None.
Returns
Type
Description
Weapon ID.
Example
Returns the weapon type.
Arguments
None.
Returns
Type
Description
Weapon type.
Example
Returns the weapon static data.
Arguments
None.
Returns
Type
Description
Weapon data.
Example
This type represents a grenade projectile.
Returns the absolute origin (the one that is used for rendering).
Arguments
None.
Returns
Type
Description
Origin.
Example
Returns the grenade type.
Arguments
None.
Returns
Type
Description
int
Grenade type.
Example