| description | IClientEntity is base class |
|---|
| Indentificators |
|---|
| MOVETYPE_NONE |
| MOVETYPE_ISOMETRIC |
| MOVETYPE_WALK |
| MOVETYPE_STEP |
| MOVETYPE_FLY |
| MOVETYPE_FLYGRAVITY |
| MOVETYPE_VPHYSICS |
| MOVETYPE_PUSH |
| MOVETYPE_NOCLIP |
| MOVETYPE_LADDER |
| MOVETYPE_OBSERVER |
ℹ 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()Returns:
| Type | Description |
|---|---|
| CBaseCombatWeapon* | active weapon entity |
Code:
local pWeapon = pLocal:GetWeapon()Parameters:
| Name | Type | Description |
|---|---|---|
| iSequence | int | index of sequence to get activity of |
Returns:
| Type | Description |
|---|---|
| int | sequence activity |
Code:
local iActivity = pLocal:GetSequenceActivity()Returns:
| Type | Description |
|---|---|
| bool | true if entity's lifestate equals alive |
Code:
local bIsAlive = pLocal:IsAlive()Returns:
| Type | Description |
|---|---|
| bool | true if entity is player |
Code:
local bIsPlayer = pLocal:IsPlayer()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)Parameters:
| Name | Type | Description |
|---|---|---|
| pEntity | CBaseEntity* | entity to check for visibility with current entity |
| vecEnd | Vector | end position of visibility check |
| 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)Returns:
| Type | Description |
|---|---|
| float | time when entity was in simulation |
Code:
local flSimulationTime = pLocal:GetSimulationTime()Returns:
| Type | Description |
|---|---|
| float | previous time when entity was in simulation |
Code:
local flOldSimulationTime = pLocal:GetOldSimulationTime()Returns:
| Type | Description |
|---|---|
| float | time point when player was spawned |
Code:
local flSpawnTime = pLocal:GetSpawnTime()Returns:
| Type | Description |
|---|---|
| int | current type of entity movement |
Code:
local nMoveType = pLocal:GetMoveType()Returns:
| Type | Description |
|---|---|
| Vector | eye position origin in world space |
Code:
local vecEyePosition = pLocal:GetEyePosition()Parameters:
| Name | Type | Description |
|---|---|---|
| iBone | int | index of bone you want get position of |
Returns:
| Type | Description |
|---|---|
| Vector | bone origin in world space |
Code:
local vecHeadOrigin = pLocal:GetBonePosition(8)Parameters:
| Name | Type | Description |
|---|---|---|
| iHitGroup | int | index of hitgroup you want get position of |
Returns:
| Type | Description |
|---|---|
| Vector | hitgroup origin in world space |
Code:
local vecHeadOrigin = pLocal:GetHitGroupPosition(1)