cbaseentity
IClientEntity is base class
Enumerations
EMoveType
Indentificators
MOVETYPE_NONE
MOVETYPE_ISOMETRIC
MOVETYPE_WALK
MOVETYPE_STEP
MOVETYPE_FLY
MOVETYPE_FLYGRAVITY
MOVETYPE_VPHYSICS
MOVETYPE_PUSH
MOVETYPE_NOCLIP
MOVETYPE_LADDER
MOVETYPE_OBSERVER
Functions
GetLocalPlayer
ℹ️ Note: GetLocalPlayer()
is static class member function constructing color, it doesn't requires to call .new()
Returns:
Type
Description
CBaseEntity*
local player entity
Code:
local pLocal = CBaseEntity.GetLocalPlayer()
GetWeapon
Returns:
Type
Description
active weapon entity
Code:
local pWeapon = pLocal:GetWeapon()
GetSequenceActivity
Parameters:
Name
Type
Description
iSequence
int
index of sequence to get activity of
Returns:
Type
Description
int
sequence activity
Code:
local iActivity = pLocal:GetSequenceActivity()
IsAlive
Returns:
Type
Description
bool
true if entity's lifestate equals alive
Code:
local bIsAlive = pLocal:IsAlive()
IsPlayer
Returns:
Type
Description
bool
true if entity is player
Code:
local bIsPlayer = pLocal:IsPlayer()
IsEnemy
Parameters:
Name
Type
Description
pEntity
CBaseEntity*
entity to check for enmity with current entity
Returns:
Type
Description
bool
true if given entity is enemy for current entity
Code:
local bIsEnemy = pLocal:IsEnemy(pEntity)
IsVisible
Parameters:
Name
Type
Description
pEntity
CBaseEntity*
entity to check for visibility with current entity
bSmokeCheck
bool
additional check is line goes through smoke
Returns:
Type
Description
bool
true if given entity is visible for current entity
Code:
local bIsVisible = pLocal:IsVisible(pEntity, pEntity:BonePosition(8), true)
GetSimulationTime
Returns:
Type
Description
float
time when entity was in simulation
Code:
local flSimulationTime = pLocal:GetSimulationTime()
GetOldSimulationTime
Returns:
Type
Description
float
previous time when entity was in simulation
Code:
local flOldSimulationTime = pLocal:GetOldSimulationTime()
GetSpawnTime
Returns:
Type
Description
float
time point when player was spawned
Code:
local flSpawnTime = pLocal:GetSpawnTime()
GetMoveType
Returns:
Type
Description
current type of entity movement
Code:
local nMoveType = pLocal:GetMoveType()
GetEyePosition
Returns:
Type
Description
eye position origin in world space
Code:
local vecEyePosition = pLocal:GetEyePosition()
GetBonePosition
Parameters:
Name
Type
Description
iBone
int
index of bone you want get position of
Returns:
Type
Description
bone origin in world space
Code:
local vecHeadOrigin = pLocal:GetBonePosition(8)
GetHitGroupPosition
Parameters:
Name
Type
Description
iHitGroup
int
index of hitgroup you want get position of
Returns:
Type
Description
hitgroup origin in world space
Code:
local vecHeadOrigin = pLocal:GetHitGroupPosition(1)
Last updated
Was this helpful?