description |
---|
Base class of all entities, inherited into CBaseEntity, CBaseCombatWeapon classes |
🚧 API of this file is not finished yet and could be changed in any time
Returns:
Type | Description |
---|---|
CBaseHandle | reference of current entity handle |
Code:
local hHandle = pEntity:GetRefEHandle()
Returns:
Type | Description |
---|---|
Vector | render origin |
Code:
local vecRenderOrigin = pEntity:GetRenderOrigin()
Returns:
Type | Description |
---|---|
QAngle | render view point |
Code:
local angRenderViewPoint = pEntity:GetRenderAngles()
Returns:
Type | Description |
---|---|
bool | true if entity have dormancy |
Code:
local bIsDormant = pEntity:IsDormant()
Returns:
Type | Description |
---|---|
int | entity index |
Code:
local nIndex = pEntity:GetIndex()
Returns:
Type | Description |
---|---|
Vector | absolute origin |
Code:
local vecAbsOrigin = pEntity:GetAbsOrigin()
Returns:
Type | Description |
---|---|
QAngle | absolute view point |
Code:
local angAbsViewPoint = pEntity:GetAbsAngles()
Parameters:
Name | Type | Description |
---|---|---|
vecAbsOrigin | Vector | absolute origin to set |
Code:
pEntity:SetAbsOrigin(Vector.new(0.0, 0.0, 0.0))
Parameters:
Name | Type | Description |
---|---|---|
angAbsViewPoint | QAngle | absolute angles to set |
Code:
pEntity:SetAbsAngles(QAngle.new(0.0, 0.0, 0.0))
Parameters:
Name | Type | Description |
---|---|---|
nModelIndex | int | override model index to set |
Code:
GetPropertyBool, GetPropertyInt, GetPropertyFloat, GetPropertyVector, GetPropertyVector2D, GetPropertyQAngle, GetPropertyHandle
Parameters:
Name | Type | Description |
---|---|---|
szNetwordVariable | string | class and network variable name to get |
Returns:
Type | Description |
---|---|
bool, int, float, Vector, QAngle, CBaseHandle | value of given network variable in networked data table (class), type depends by function |
Code:
local bSpotted = pEntity:GetPropertyBool("CBaseEntity->m_bSpotted")
local iArmor = pLocal:GetPropertyInt("CCSPlayer->m_ArmorValue")
local flAnimationTime = pLocal:GetPropertyFloat("CBaseEntity->m_flAnimTime")
local angRotation = pEntity:GetPropertyQAngle("CBaseEntity->m_angRotation")
local vecMins = pEntity:GetPropertyVector("CBaseEntity->m_vecMins")
local hOwner = pEntity:GetPropertyHandle("CBaseEntity->m_hOwnerEntity")
SetPropertyBool, SetPropertyInt, SetPropertyFloat, SetPropertyVector, SetPropertyVector2D, SetPropertyQAngle, SetPropertyHandle
Parameters:
Name | Type | Description |
---|---|---|
szNetwordVariable | string | class and network variable name to set |
value | bool, int, float, Vector, QAngle, CBaseHandle | value to set for given network variable in networked data table (class), type depends by function |
Code:
pEntity:SetPropertyBool("CBaseEntity->m_bSpotted", true)
pLocal:GetPropertyInt("CCSPlayer->m_ArmorValue", 100)
pLocal:GetPropertyFloat("CBaseEntity->m_flAnimTime", 0.0)
pEntity:GetPropertyQAngle("CBaseEntity->m_angRotation", QAngle.new())
pEntity:GetPropertyVector("CBaseEntity->m_vecMins", Vector.new())
pEntity:GetPropertyHandle("CBaseEntity->m_hOwnerEntity", 0)