[DEV/TF2/(OrangeBox?)] IClientEntity (Not fully recorded, but will be fixed soon)

Post Python examples to help other users.
User avatar
Sam
Senior Member
Posts: 131
Joined: Tue Jul 03, 2018 3:00 pm
Location: Russian Federation
Contact:

[DEV/TF2/(OrangeBox?)] IClientEntity (Not fully recorded, but will be fixed soon)

Postby Sam » Fri May 22, 2020 4:06 pm

Syntax: Select all

from core import get_interface
from memory.manager import Type
from memory.manager import manager
from memory.manager import CustomType
from memory import Convention
from memory import DataType


class VEngineClient(CustomType, metaclass=manager):
# VEngineClient013
GetIntersectingSurfaces = manager.virtual_function(0, [DataType.POINTER, DataType.POINTER, DataType.FLOAT, DataType.BOOL, DataType.POINTER, DataType.INT], DataType.INT, Convention.THISCALL)
GetLightForPoint = manager.virtual_function(1, [DataType.POINTER, DataType.BOOL], DataType.POINTER, Convention.THISCALL)
TraceLineMaterialAndLighting = manager.virtual_function(2, [DataType.POINTER, DataType.POINTER, DataType.POINTER, DataType.POINTER], DataType.POINTER, Convention.THISCALL)
ParseFile = manager.virtual_function(3, [DataType.STRING, DataType.STRING, DataType.INT], DataType.STRING, Convention.THISCALL)
CopyLocalFile = manager.virtual_function(4, [DataType.STRING, DataType.STRING], DataType.BOOL, Convention.THISCALL)
GetScreenSize = manager.virtual_function(5, [DataType.POINTER, DataType.POINTER], DataType.VOID, Convention.THISCALL)
ServerCmd = manager.virtual_function(6, [DataType.STRING, DataType.BOOL], DataType.VOID, Convention.THISCALL)
ClientCmd = manager.virtual_function(7, [DataType.STRING], DataType.VOID, Convention.THISCALL)
GetPlayerInfo = manager.virtual_function(8, [DataType.INT, DataType.POINTER], DataType.BOOL, Convention.THISCALL)
GetPlayerForUserID = manager.virtual_function(9, [DataType.INT], DataType.INT, Convention.THISCALL)
TextMessageGet = manager.virtual_function(10, [DataType.STRING], DataType.POINTER, Convention.THISCALL)
Con_IsVisible = manager.virtual_function(11, [], DataType.BOOL, Convention.THISCALL)
GetLocalPlayer = manager.virtual_function(12, [], DataType.INT, Convention.THISCALL)
LoadModel = manager.virtual_function(13, [DataType.STRING, DataType.BOOL], DataType.POINTER, Convention.THISCALL)
Time = manager.virtual_function(14, [], DataType.FLOAT, Convention.THISCALL)
GetLastTimeStamp = manager.virtual_function(15, [], DataType.FLOAT, Convention.THISCALL)
GetSentence = manager.virtual_function(16, [DataType.POINTER], DataType.POINTER, Convention.THISCALL)
GetSentenceLength = manager.virtual_function(17, [DataType.POINTER], DataType.FLOAT, Convention.THISCALL)
IsStreaming = manager.virtual_function(18, [DataType.POINTER], DataType.BOOL, Convention.THISCALL)
GetViewAngles = manager.virtual_function(19, [DataType.POINTER], DataType.VOID, Convention.THISCALL)
SetViewAngles = manager.virtual_function(20, [DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetMaxClients = manager.virtual_function(21, [], DataType.INT, Convention.THISCALL)
Key_LookupBinding = manager.virtual_function(22, [DataType.STRING], DataType.STRING, Convention.THISCALL)
Key_BindingForKey = manager.virtual_function(23, [DataType.INT], DataType.STRING, Convention.THISCALL)
StartKeyTrapMode = manager.virtual_function(24, [], DataType.VOID, Convention.THISCALL)
CheckDoneKeyTrapping = manager.virtual_function(25, [DataType.INT], DataType.BOOL, Convention.THISCALL)
IsInGame = manager.virtual_function(26, [], DataType.BOOL, Convention.THISCALL)
IsConnected = manager.virtual_function(27, [], DataType.BOOL, Convention.THISCALL)
IsDrawingLoadingImage = manager.virtual_function(28, [], DataType.BOOL, Convention.THISCALL)
Con_NPrintf = manager.virtual_function(29, [DataType.INT, DataType.STRING], DataType.VOID, Convention.THISCALL)
Con_NXPrintf = manager.virtual_function(30, [DataType.POINTER, DataType.STRING], DataType.VOID, Convention.THISCALL)
IsBoxVisible = manager.virtual_function(31, [DataType.POINTER, DataType.POINTER], DataType.INT, Convention.THISCALL)
IsBoxInViewCluster = manager.virtual_function(32, [DataType.POINTER, DataType.POINTER], DataType.INT, Convention.THISCALL)
CullBox = manager.virtual_function(33, [DataType.POINTER, DataType.POINTER], DataType.BOOL, Convention.THISCALL)
Sound_ExtraUpdate = manager.virtual_function(34, [], DataType.VOID, Convention.THISCALL)
GetGameDirectory = manager.virtual_function(35, [], DataType.STRING, Convention.THISCALL)
WorldToScreenMatrix = manager.virtual_function(36, [], DataType.POINTER, Convention.THISCALL)
WorldToViewMatrix = manager.virtual_function(37, [], DataType.POINTER, Convention.THISCALL)
GameLumpVersion = manager.virtual_function(38, [DataType.INT], DataType.INT, Convention.THISCALL)
GameLumpSize = manager.virtual_function(39, [DataType.INT], DataType.INT, Convention.THISCALL)
LoadGameLump = manager.virtual_function(40, [DataType.INT, DataType.STRING, DataType.INT], DataType.BOOL, Convention.THISCALL)
LevelLeafCount = manager.virtual_function(41, [], DataType.INT, Convention.THISCALL)
GetBSPTreeQuery = manager.virtual_function(42, [], DataType.POINTER, Convention.THISCALL)
LinearToGamma = manager.virtual_function(43, [DataType.POINTER, DataType.POINTER], DataType.VOID, Convention.THISCALL)
LightStyleValue = manager.virtual_function(44, [DataType.INT], DataType.FLOAT, Convention.THISCALL)
ComputeDynamicLighting = manager.virtual_function(45, [DataType.POINTER, DataType.POINTER, DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetAmbientLightColor = manager.virtual_function(46, [DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetDXSupportLevel = manager.virtual_function(47, [], DataType.INT, Convention.THISCALL)
SupportsHDR = manager.virtual_function(48, [], DataType.BOOL, Convention.THISCALL)
Mat_Stub = manager.virtual_function(49, [DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetChapterName = manager.virtual_function(50, [DataType.POINTER, DataType.INT], DataType.VOID, Convention.THISCALL)
GetLevelName = manager.virtual_function(51, [], DataType.STRING, Convention.THISCALL)
GetLevelVersion = manager.virtual_function(52, [], DataType.INT, Convention.THISCALL)
GetVoiceTweakAPI = manager.virtual_function(53, [], DataType.POINTER, Convention.THISCALL)
EngineStats_BeginFrame = manager.virtual_function(54, [], DataType.VOID, Convention.THISCALL)
EngineStats_EndFrame = manager.virtual_function(55, [], DataType.VOID, Convention.THISCALL)
FireEvents = manager.virtual_function(56, [], DataType.VOID, Convention.THISCALL)
GetLeavesArea = manager.virtual_function(57, [DataType.INT, DataType.INT], DataType.INT, Convention.THISCALL)
DoesBoxTouchAreaFrustum = manager.virtual_function(58, [DataType.POINTER, DataType.POINTER, DataType.INT], DataType.BOOL, Convention.THISCALL)
SetAudioState = manager.virtual_function(59, [DataType.POINTER], DataType.VOID, Convention.THISCALL)
SentenceGroupPick = manager.virtual_function(60, [DataType.INT, DataType.POINTER, DataType.INT], DataType.INT, Convention.THISCALL)
SentenceGroupPickSequential = manager.virtual_function(61, [DataType.INT, DataType.POINTER, DataType.INT, DataType.INT, DataType.INT], DataType.INT, Convention.THISCALL)
SentenceIndexFromName = manager.virtual_function(62, [DataType.STRING], DataType.INT, Convention.THISCALL)
SentenceNameFromIndex = manager.virtual_function(63, [DataType.INT], DataType.STRING, Convention.THISCALL)
SentenceGroupIndexFromName = manager.virtual_function(64, [DataType.STRING], DataType.INT, Convention.THISCALL)
SentenceGroupNameFromIndex = manager.virtual_function(65, [DataType.INT], DataType.STRING, Convention.THISCALL)
SentenceLength = manager.virtual_function(66, [DataType.INT], DataType.FLOAT, Convention.THISCALL)
ComputeLighting = manager.virtual_function(67, [DataType.POINTER, DataType.POINTER, DataType.BOOL, DataType.POINTER, DataType.POINTER], DataType.VOID, Convention.THISCALL)
ActivateOccluder = manager.virtual_function(68, [DataType.INT, DataType.BOOL], DataType.VOID, Convention.THISCALL)
IsOccluded = manager.virtual_function(69, [DataType.POINTER, DataType.POINTER], DataType.BOOL, Convention.THISCALL)
SaveAllocMemory = manager.virtual_function(70, [DataType.INT, DataType.INT], DataType.POINTER, Convention.THISCALL)
SaveFreeMemory = manager.virtual_function(71, [DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetNetChannelInfo = manager.virtual_function(72, [], DataType.POINTER, Convention.THISCALL)
DebugDrawPhysCollide = manager.virtual_function(73, [DataType.POINTER, DataType.POINTER, DataType.POINTER], DataType.VOID, Convention.THISCALL)
CheckPoint = manager.virtual_function(74, [DataType.STRING], DataType.VOID, Convention.THISCALL)
DrawPortals = manager.virtual_function(75, [], DataType.VOID, Convention.THISCALL)
IsPlayingDemo = manager.virtual_function(76, [], DataType.BOOL, Convention.THISCALL)
IsRecordingDemo = manager.virtual_function(77, [], DataType.BOOL, Convention.THISCALL)
IsPlayingTimeDemo = manager.virtual_function(78, [], DataType.BOOL, Convention.THISCALL)
GetDemoRecordingTick = manager.virtual_function(79, [], DataType.INT, Convention.THISCALL)
GetDemoPlaybackTick = manager.virtual_function(80, [], DataType.INT, Convention.THISCALL)
GetDemoPlaybackStartTick = manager.virtual_function(81, [], DataType.INT, Convention.THISCALL)
GetDemoPlaybackTimeScale = manager.virtual_function(82, [], DataType.FLOAT, Convention.THISCALL)
GetDemoPlaybackTotalTicks = manager.virtual_function(83, [], DataType.INT, Convention.THISCALL)
IsPaused = manager.virtual_function(84, [], DataType.BOOL, Convention.THISCALL)
IsTakingScreenshot = manager.virtual_function(85, [], DataType.BOOL, Convention.THISCALL)
IsHLTV = manager.virtual_function(86, [], DataType.BOOL, Convention.THISCALL)
IsLevelMainMenuBackground = manager.virtual_function(87, [], DataType.BOOL, Convention.THISCALL)
GetMainMenuBackgroundName = manager.virtual_function(88, [DataType.POINTER, DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetVideoModes = manager.virtual_function(89, [DataType.POINTER, DataType.POINTER], DataType.VOID, Convention.THISCALL)
SetOcclusionParameters = manager.virtual_function(90, [DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetUILanguage = manager.virtual_function(91, [DataType.POINTER, DataType.INT], DataType.VOID, Convention.THISCALL)
IsSkyboxVisibleFromPoint = manager.virtual_function(92, [DataType.POINTER], DataType.INT, Convention.THISCALL)
GetMapEntitiesString = manager.virtual_function(93, [], DataType.STRING, Convention.THISCALL)
IsInEditMode = manager.virtual_function(94, [], DataType.BOOL, Convention.THISCALL)
GetScreenAspectRatio = manager.virtual_function(95, [], DataType.FLOAT, Convention.THISCALL)
REMOVED_SteamRefreshLogin = manager.virtual_function(96, [DataType.STRING, DataType.BOOL], DataType.BOOL, Convention.THISCALL)
REMOVED_SteamProcessCall = manager.virtual_function(97, [DataType.POINTER], DataType.BOOL, Convention.THISCALL)
GetEngineBuildNumber = manager.virtual_function(98, [], DataType.UINT, Convention.THISCALL)
GetProductVersionString = manager.virtual_function(99, [], DataType.STRING, Convention.THISCALL)
GrabPreColorCorrectedFrame = manager.virtual_function(100, [DataType.INT, DataType.INT, DataType.INT, DataType.INT], DataType.VOID, Convention.THISCALL)
IsHammerRunning = manager.virtual_function(101, [], DataType.BOOL, Convention.THISCALL)
ExecuteClientCmd = manager.virtual_function(102, [DataType.STRING], DataType.VOID, Convention.THISCALL)
MapHasHDRLighting = manager.virtual_function(103, [], DataType.BOOL, Convention.THISCALL)
GetAppID = manager.virtual_function(104, [], DataType.INT, Convention.THISCALL)
GetLightForPointFast = manager.virtual_function(105, [DataType.POINTER, DataType.BOOL], DataType.POINTER, Convention.THISCALL)
ClientCmd_Unrestricted = manager.virtual_function(106, [DataType.STRING], DataType.VOID, Convention.THISCALL)
SetRestrictServerCommands = manager.virtual_function(107, [DataType.BOOL], DataType.VOID, Convention.THISCALL)
SetRestrictClientCommands = manager.virtual_function(108, [DataType.BOOL], DataType.VOID, Convention.THISCALL)
SetOverlayBindProxy = manager.virtual_function(109, [DataType.INT, DataType.POINTER], DataType.VOID, Convention.THISCALL)
CopyFrameBufferToMaterial = manager.virtual_function(110, [DataType.STRING], DataType.BOOL, Convention.THISCALL)
ChangeTeam = manager.virtual_function(111, [DataType.STRING], DataType.VOID, Convention.THISCALL)
ReadConfiguration = manager.virtual_function(112, [DataType.BOOL], DataType.VOID, Convention.THISCALL)
SetAchievementMgr = manager.virtual_function(113, [DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetAchievementMgr = manager.virtual_function(114, [], DataType.POINTER, Convention.THISCALL)
MapLoadFailed = manager.virtual_function(115, [], DataType.BOOL, Convention.THISCALL)
SetMapLoadFailed = manager.virtual_function(116, [DataType.BOOL], DataType.VOID, Convention.THISCALL)
IsLowViolence = manager.virtual_function(117, [], DataType.BOOL, Convention.THISCALL)
GetMostRecentSaveGame = manager.virtual_function(118, [], DataType.STRING, Convention.THISCALL)
SetMostRecentSaveGame = manager.virtual_function(119, [DataType.STRING], DataType.VOID, Convention.THISCALL)
StartXboxExitingProcess = manager.virtual_function(120, [], DataType.VOID, Convention.THISCALL)
IsSaveInProgress = manager.virtual_function(121, [], DataType.BOOL, Convention.THISCALL)
OnStorageDeviceAttached = manager.virtual_function(122, [], DataType.UINT, Convention.THISCALL)
OnStorageDeviceDetached = manager.virtual_function(123, [], DataType.VOID, Convention.THISCALL)
ResetDemoInterpolation = manager.virtual_function(124, [], DataType.VOID, Convention.THISCALL)
SetGamestatsData = manager.virtual_function(125, [DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetGamestatsData = manager.virtual_function(126, [], DataType.POINTER, Convention.THISCALL)
# GetMouseDelta (skip)
ServerCmdKeyValues = manager.virtual_function(127, [DataType.POINTER], DataType.VOID, Convention.THISCALL)
IsSkippingPlayback = manager.virtual_function(128, [], DataType.BOOL, Convention.THISCALL)
IsLoadingDemo = manager.virtual_function(129, [], DataType.BOOL, Convention.THISCALL)
IsPlayingDemoALocallyRecordedDemo = manager.virtual_function(130, [], DataType.BOOL, Convention.THISCALL)
Key_LookupBindingExact = manager.virtual_function(131, [DataType.STRING], DataType.STRING, Convention.THISCALL)
AddPhonemeFile = manager.virtual_function(132, [DataType.STRING], DataType.VOID, Convention.THISCALL)
GetPausedExpireTime = manager.virtual_function(133, [], DataType.FLOAT, Convention.THISCALL)
StartDemoRecording = manager.virtual_function(134, [DataType.STRING, DataType.STRING], DataType.BOOL, Convention.THISCALL)
StopDemoRecording = manager.virtual_function(135, [], DataType.VOID, Convention.THISCALL)
TakeScreenshot = manager.virtual_function(136, [DataType.STRING, DataType.STRING], DataType.VOID, Convention.THISCALL)
# VEngineClient014
GetProtocolVersion = manager.virtual_function(137, [], DataType.UINT, Convention.THISCALL)
IsWindowedMode = manager.virtual_function(138, [], DataType.BOOL, Convention.THISCALL)
FlashWindow = manager.virtual_function(139, [], DataType.VOID, Convention.THISCALL)
GetClientVersion = manager.virtual_function(140, [], DataType.INT, Convention.THISCALL)
IsActiveApp = manager.virtual_function(141, [], DataType.BOOL, Convention.THISCALL)
DisconnectInternal = manager.virtual_function(142, [], DataType.VOID, Convention.THISCALL)
GetInstancesRunningCount = manager.virtual_function(143, [], DataType.INT, Convention.THISCALL)

class IClientEntityList(CustomType, metaclass=manager):
GetClientNetworkable = manager.virtual_function(0, [DataType.INT], DataType.POINTER, Convention.THISCALL)
GetClientNetworkableFromHandle = manager.virtual_function(1, [DataType.POINTER], DataType.POINTER, Convention.THISCALL)
GetClientUnknownFromHandle = manager.virtual_function(2, [DataType.POINTER], DataType.POINTER, Convention.THISCALL)
GetClientEntity = manager.virtual_function(3, [DataType.INT], DataType.POINTER, Convention.THISCALL)
GetClientEntityFromHandle = manager.virtual_function(4, [DataType.POINTER], DataType.POINTER, Convention.THISCALL)
NumberOfEntities = manager.virtual_function(5, [DataType.BOOL], DataType.INT, Convention.THISCALL)
GetHighestEntityIndex = manager.virtual_function(6, [DataType.BOOL], DataType.INT, Convention.THISCALL)
SetMaxEntities = manager.virtual_function(7, [DataType.INT], DataType.VOID, Convention.THISCALL)
GetMaxEntities = manager.virtual_function(8, [], DataType.INT, Convention.THISCALL)

p_gClientEntityList = get_interface('client', 'VClientEntityList003')
ClientEntityList = make_object(IClientEntityList, p_gClientEntityList)
p_gEngineClient = get_interface('engine', 'VEngineClient014')
EngineClient = make_object(VEngineClient, p_gEngineClient)

class IClientEntity(CustomType, metaclass=manager):
# C_BaseEntity variables
m_pfnThink = manager.instance_attribute(Type.POINTER, 0x18)
m_pfnTouch = manager.instance_attribute(Type.POINTER, 0x28)
index = manager.instance_attribute(Type.INT, 0x38)
m_nRenderFX = manager.instance_attribute(Type.UCHAR, 0x3C)
m_nRenderFXBlend = manager.instance_attribute(Type.UCHAR, 0x3D)
m_EntClientFlags = manager.instance_attribute(Type.USHORT, 0x3E)
m_clrRender = manager.instance_attribute(Type.INT, 0x40)
model = manager.instance_attribute(Type.POINTER, 0x44)
m_flAnimTime = manager.instance_attribute(Type.FLOAT, 0x48)
m_flOldAnimTime = manager.instance_attribute(Type.FLOAT, 0x4C)
m_flSimulationTime = manager.instance_attribute(Type.FLOAT, 0x50)
m_flOldSimulationTime = manager.instance_attribute(Type.FLOAT, 0x54)
m_flCreateTime = manager.instance_attribute(Type.FLOAT, 0x58)
m_ubInterpolationFrame = manager.instance_attribute(Type.UCHAR, 0x5C)
m_ubOldInterpolationFrame = manager.instance_attribute(Type.UCHAR, 0x5D)
m_fEffects = manager.instance_attribute(Type.INT, 0x60)
m_nRenderMode = manager.instance_attribute(Type.UCHAR, 0x64)
m_nOldRenderMode = manager.instance_attribute(Type.UCHAR, 0x65)
m_hRender = manager.instance_attribute(Type.USHORT, 0x66)
m_bReadyToDraw = manager.instance_attribute(Type.BOOL, 0x68)
m_nNextThinkTick = manager.instance_attribute(Type.INT, 0x6C)
m_nLastThinkTick = manager.instance_attribute(Type.INT, 0x70)
m_nModelIndex = manager.instance_attribute(Type.SHORT, 0x74)
m_nModelIndexOverrides = manager.static_instance_array(Type.INT, 0x78, 4)
m_takedamage = manager.instance_attribute(Type.UCHAR, 0x88)
m_lifeState = manager.instance_attribute(Type.UCHAR, 0x89)
m_iHealth = manager.instance_attribute(Type.INT, 0xA8)
m_flSpeed = manager.instance_attribute(Type.FLOAT, 0xAC)
m_iTeamNum = manager.instance_attribute(Type.INT, 0xB0)
m_PredictableID = manager.instance_attribute(Type.POINTER, 0xB4)
PredictionContext = manager.instance_attribute(Type.POINTER, 0xB8)
touchStamp = manager.instance_attribute(Type.INT, 0xBC)
m_nFXComputeFrame = manager.instance_attribute(Type.INT, 0xC0)
m_RefEHandle = manager.instance_attribute(Type.POINTER, 0xC4)
m_bEnabledInToolView = manager.instance_attribute(Type.BOOL, 0xC8)
m_bToolRecording = manager.instance_attribute(Type.BOOL, 0xC9)
m_ToolHandle = manager.instance_attribute(Type.UINT, 0xCC)
m_nLastRecordedFrame = manager.instance_attribute(Type.INT, 0xD0)
m_bRecordInTools = manager.instance_attribute(Type.BOOL, 0xD4)
m_pPhysicsObject = manager.instance_attribute(Type.POINTER, 0xD8)
m_bPredictionEligible = manager.instance_attribute(Type.BOOL, 0xDC)
m_nSimulationTick = manager.instance_attribute(Type.INT, 0xE0)
m_aThinkFunctions = manager.instance_attribute(Type.POINTER, 0xE4)
m_iCurrentThinkContext = manager.instance_attribute(Type.INT, 0xF8)
m_vecViewOffset = manager.instance_attribute('Vector', 0xFC)
m_vecVelocity = manager.instance_attribute('Vector', 0x108)
m_iv_vecVelocity = manager.instance_attribute(Type.POINTER, 0x114)
m_vecAbsVelocity = manager.instance_attribute('Vector', 0x144)
m_vecAngVelocity = manager.instance_attribute('QAngle', 0x150)
m_bDormantPredictable = manager.instance_attribute(Type.BOOL, 0x15C)
m_nIncomingPacketEntityBecameDormant = manager.instance_attribute(Type.INT, 0x160)
m_flSpawnTime = manager.instance_attribute(Type.FLOAT, 0x164)
m_flLastMessageTime = manager.instance_attribute(Type.FLOAT, 0x168)
m_vecBaseVelocity = manager.instance_attribute('Vector', 0x16C)
m_flGravity = manager.instance_attribute(Type.FLOAT, 0x178)
m_ModelInstance = manager.instance_attribute(Type.USHORT, 0x17C)
m_ShadowHandle = manager.instance_attribute(Type.USHORT, 0x17E)
m_flProxyRandomValue = manager.instance_attribute(Type.FLOAT, 0x180)
m_hThink = manager.instance_attribute(Type.POINTER, 0x184)
m_iEFlags = manager.instance_attribute(Type.INT, 0x188)
m_MoveType = manager.instance_attribute(Type.UCHAR, 0x18C)
m_MoveCollide = manager.instance_attribute(Type.UCHAR, 0x18D)
m_iParentAttachment = manager.instance_attribute(Type.UCHAR, 0x18E)
m_iOldParentAttachment = manager.instance_attribute(Type.UCHAR, 0x18F)
m_nWaterLevel = manager.instance_attribute(Type.UCHAR, 0x190)
m_nWaterType = manager.instance_attribute(Type.UCHAR, 0x191)
m_bDormant = manager.instance_attribute(Type.BOOL, 0x192)
m_bPredictable = manager.instance_attribute(Type.BOOL, 0x193)
m_pMoveParent = manager.instance_attribute(Type.POINTER, 0x194)
m_pMoveChild = manager.instance_attribute(Type.POINTER, 0x198)
m_pMovePeer = manager.instance_attribute(Type.POINTER, 0x19C)
m_pMovePrevPeer = manager.instance_attribute(Type.POINTER, 0x1A0)
m_hNetworkMoveParent = manager.instance_attribute(Type.POINTER, 0x1A4)
m_hOldMoveParent = manager.instance_attribute(Type.POINTER, 0x1A8)
m_ModelName = manager.instance_attribute(Type.POINTER, 0x1AC)
m_Collision = manager.instance_attribute(Type.POINTER, 0x1B0)
m_Particles = manager.instance_attribute(Type.POINTER, 0x23C)
m_flElasticity = manager.instance_attribute(Type.FLOAT, 0x25C)
m_flShadowCastDistance = manager.instance_attribute(Type.FLOAT, 0x260)
m_ShadowDirUseOtherEntity = manager.instance_attribute(Type.POINTER, 0x264)
m_hGroundEntity = manager.instance_attribute(Type.POINTER, 0x268)
m_flGroundChangeTime = manager.instance_attribute(Type.FLOAT, 0x26C)
m_flFriction = manager.instance_attribute(Type.FLOAT, 0x270)
m_vecAbsOrigin = manager.instance_attribute('Vector', 0x274)
m_angAbsRotation = manager.instance_attribute('QAngle', 0x280)
m_vecOldOrigin = manager.instance_attribute('Vector', 0x28C)
m_vecOldAngRotation = manager.instance_attribute('QAngle', 0x298)
m_vecOrigin = manager.instance_attribute('Vector', 0x2A4)
m_iv_vecOrigin = manager.instance_attribute(Type.POINTER, 0x2B0)
m_angRotation = manager.instance_attribute('QAngle', 0x2E0)
m_iv_angRotation = manager.instance_attribute(Type.POINTER, 0x2EC)
m_rgflCoordinateFrame = manager.instance_attribute('Matrix3x4', 0x31C) # Fix me!
m_vecNetworkOrigin = manager.instance_attribute('Vector', 0x34C)
m_angNetworkAngles = manager.instance_attribute('QAngle', 0x358)
m_fFlags = manager.instance_attribute(Type.INT, 0x364)
m_CollisionGroup = manager.instance_attribute(Type.INT, 0x368)
m_pIntermediateData = manager.static_pointer_array(Type.UCHAR, 0x36C, 90)
m_pOriginalData = manager.instance_attribute(Type.POINTER, 0x4D4)
m_nIntermediateDataCount = manager.instance_attribute(Type.INT, 0x4D8)
m_bIsPlayerSimulated = manager.instance_attribute(Type.BOOL, 0x4DC)
m_bSimulatedEveryTick = manager.instance_attribute(Type.POINTER, 0x4DD)
m_bAnimatedEveryTick = manager.instance_attribute(Type.POINTER, 0x4DE)
m_bAlternateSorting = manager.instance_attribute(Type.POINTER, 0x4DF)
m_iTextureFrameIndex = manager.instance_attribute(Type.UCHAR, 0x4E0)
m_fBBoxVisFlags = manager.instance_attribute(Type.UCHAR, 0x4E1)
m_DataChangeEventRef = manager.instance_attribute(Type.INT, 0x4E4)
m_hPlayerSimulationOwner = manager.instance_attribute(Type.POINTER, 0x4E8)
m_hOwnerEntity = manager.instance_attribute(Type.POINTER, 0x4EC)
m_hEffectEntity = manager.instance_attribute(Type.POINTER, 0x4F0)
m_fDataObjectTypes = manager.instance_attribute(Type.INT, 0x4F4)
m_AimEntsListHandle = manager.instance_attribute(Type.UINT, 0x4F8)
m_nCreationTick = manager.instance_attribute(Type.INT, 0x4FC)
m_fRenderingClipPlane = manager.static_pointer_array(Type.FLOAT, 0x500, 4)
m_bEnableRenderingClipPlane = manager.instance_attribute(Type.BOOL, 0x510)
m_InterpolationListEntry = manager.instance_attribute(Type.USHORT, 0x512)
m_TeleportListEntry = manager.instance_attribute(Type.USHORT, 0x514)
m_CalcAbsolutePositionMutex = manager.instance_attribute(Type.POINTER, 0x518)
m_CalcAbsoluteVelocityMutex = manager.instance_attribute(Type.POINTER, 0x520)
m_bValidatedOwner = manager.instance_attribute(Type.BOOL, 0x528)
m_bDeemedInvalid = manager.instance_attribute(Type.BOOL, 0x529)
m_bWasDeemedInvalid = manager.instance_attribute(Type.BOOL, 0x52A)
m_PreviousRenderMode = manager.instance_attribute(Type.INT, 0x52C)
m_PreviousRenderColor = manager.instance_attribute(Type.POINTER, 0x530)
# C_BaseAnimating variables
m_pRagdoll = manager.instance_attribute(Type.POINTER, 0x538)
m_nSkin = manager.instance_attribute(Type.INT, 0x53C)
m_nBody = manager.instance_attribute(Type.INT, 0x540)
m_nHitboxSet = manager.instance_attribute(Type.INT, 0x544)
m_SequenceTransitioner = manager.instance_attribute(Type.POINTER, 0x548)
m_pIk = manager.instance_attribute(Type.POINTER, 0x55C)
m_iEyeAttachment = manager.instance_attribute(Type.INT, 0x560)
m_flPlaybackRate = manager.instance_attribute(Type.FLOAT, 0x564)
m_bStoreRagdollInfo = manager.instance_attribute(Type.BOOL, 0x568)
m_pRagdollInfo = manager.instance_attribute(Type.POINTER, 0x56C)
m_vecForce = manager.instance_attribute('Vector', 0x570)
m_nForceBone = manager.instance_attribute(Type.INT, 0x57C)
# Base Classes
IClientUnknown = manager.instance_attribute(Type.POINTER, 0x00) # += IHandleEntity
IClientRenderable = manager.instance_attribute(Type.POINTER, 0x04)
IClientNetworkable = manager.instance_attribute(Type.POINTER, 0x08)
IClientThinkable = manager.instance_attribute(Type.POINTER, 0x0C)
# IHandleEntity
SetRefEHandle = manager.virtual_function(1, [DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetRefEHandle = manager.virtual_function(2, [], DataType.POINTER, Convention.THISCALL)
# IClientUnknown
GetCollideable = manager.virtual_function(3, [], DataType.POINTER, Convention.THISCALL)
GetClientNetworkable = manager.virtual_function(4, [], DataType.POINTER, Convention.THISCALL)
GetClientRenderable = manager.virtual_function(5, [], DataType.POINTER, Convention.THISCALL)
GetIClientEntity = manager.virtual_function(6, [], DataType.POINTER, Convention.THISCALL)
GetBaseEntity = manager.virtual_function(7, [], DataType.POINTER, Convention.THISCALL)
GetClientThinkable = manager.virtual_function(8, [], DataType.POINTER, Convention.THISCALL)
# IClientEntity
GetAbsOrigin = manager.virtual_function(9, [], DataType.POINTER, Convention.THISCALL)
GetAbsAngles = manager.virtual_function(10, [], DataType.POINTER, Convention.THISCALL)
GetMouth = manager.virtual_function(11, [], DataType.POINTER, Convention.THISCALL)
GetSoundSpatialization = manager.virtual_function(12, [DataType.POINTER], DataType.BOOL, Convention.THISCALL)
# C_BaseEntity
GetDataDescMap = manager.virtual_function(13, [], DataType.POINTER, Convention.THISCALL)
YouForgotToImplementOrDeclareClientClass = manager.virtual_function(14, [], DataType.INT, Convention.THISCALL)
GetPredDescMap = manager.virtual_function(15, [], DataType.POINTER, Convention.THISCALL)
GetTeamNumber = manager.virtual_function(73, [], DataType.INT, Convention.THISCALL)
# IClientRenderable
GetIClientUnknown = manager.virtual_function(14, [DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetRenderOrigin = manager.virtual_function(14, [], DataType.POINTER, Convention.THISCALL)
GetRenderAngles = manager.virtual_function(15, [], DataType.POINTER, Convention.THISCALL)
ShouldDraw = manager.virtual_function(16, [], DataType.BOOL, Convention.THISCALL)
IsTransparent = manager.virtual_function(17, [], DataType.BOOL, Convention.THISCALL)
UsesPowerOfTwoFrameBufferTexture = manager.virtual_function(18, [], DataType.BOOL, Convention.THISCALL)
UsesFullFrameBufferTexture = manager.virtual_function(19, [], DataType.BOOL, Convention.THISCALL)
GetShadowHandle = manager.virtual_function(20, [], DataType.USHORT, Convention.THISCALL)
RenderHandle = manager.virtual_function(21, [], DataType.USHORT, Convention.THISCALL)
GetModel = manager.virtual_function(22, [], DataType.POINTER, Convention.THISCALL)
DrawModel = manager.virtual_function(23, [DataType.INT], DataType.POINTER, Convention.THISCALL)
GetBody = manager.virtual_function(24, [], DataType.INT, Convention.THISCALL)
ComputeFxBlend = manager.virtual_function(25, [], DataType.VOID, Convention.THISCALL)
GetFxBlend = manager.virtual_function(26, [], DataType.INT, Convention.THISCALL)
GetColorModulation = manager.virtual_function(27, [DataType.FLOAT], DataType.VOID, Convention.THISCALL)
LODTest = manager.virtual_function(28, [], DataType.BOOL, Convention.THISCALL)
SetupBones = manager.virtual_function(29, [DataType.POINTER, DataType.INT, DataType.INT, DataType.FLOAT], DataType.BOOL, Convention.THISCALL)
SetupWeights = manager.virtual_function(30, [DataType.POINTER, DataType.INT, DataType.POINTER, DataType.POINTER], DataType.VOID, Convention.THISCALL)
DoAnimationEvents = manager.virtual_function(31, [], DataType.VOID, Convention.THISCALL)
GetPVSNotifyInterface = manager.virtual_function(32, [], DataType.POINTER, Convention.THISCALL)
GetRenderBounds = manager.virtual_function(33, [DataType.POINTER, DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetRenderBoundsWorldspace = manager.virtual_function(34, [DataType.POINTER, DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetShadowRenderBounds = manager.virtual_function(35, [DataType.POINTER, DataType.POINTER, DataType.INT], DataType.VOID, Convention.THISCALL)
ShouldReceiveProjectedTextures = manager.virtual_function(36, [DataType.INT], DataType.BOOL, Convention.THISCALL)
GetShadowCastDistance = manager.virtual_function(37, [DataType.POINTER, DataType.INT], DataType.BOOL, Convention.THISCALL)
GetShadowCastDirection = manager.virtual_function(38, [DataType.POINTER, DataType.INT], DataType.BOOL, Convention.THISCALL)
IsShadowDirty = manager.virtual_function(39, [], DataType.BOOL, Convention.THISCALL)
MarkShadowDirty = manager.virtual_function(40, [DataType.BOOL], DataType.VOID, Convention.THISCALL)
GetShadowParent = manager.virtual_function(41, [], DataType.POINTER, Convention.THISCALL)
FirstShadowChild = manager.virtual_function(42, [], DataType.POINTER, Convention.THISCALL)
NextShadowPeer = manager.virtual_function(43, [], DataType.POINTER, Convention.THISCALL)
ShadowCastType = manager.virtual_function(44, [], DataType.INT, Convention.THISCALL)
CreateModelInstance = manager.virtual_function(45, [], DataType.VOID, Convention.THISCALL)
GetModelInstance = manager.virtual_function(46, [], DataType.USHORT, Convention.THISCALL)
RenderableToWorldTransform = manager.virtual_function(47, [], DataType.POINTER, Convention.THISCALL)
LookupAttachment = manager.virtual_function(48, [DataType.STRING], DataType.INT, Convention.THISCALL)
GetAttachment_0 = manager.virtual_function(49, [DataType.INT, DataType.POINTER, DataType.POINTER], DataType.BOOL, Convention.THISCALL)
GetAttachment_1 = manager.virtual_function(50, [DataType.INT, DataType.POINTER], DataType.BOOL, Convention.THISCALL)
GetRenderClipPlane = manager.virtual_function(51, [], DataType.POINTER, Convention.THISCALL)
GetSkin = manager.virtual_function(52, [], DataType.INT, Convention.THISCALL)
IsTwoPass = manager.virtual_function(53, [], DataType.BOOL, Convention.THISCALL)
OnThreadedDrawSetup = manager.virtual_function(54, [], DataType.VOID, Convention.THISCALL)
UsesFlexDelayedWeights = manager.virtual_function(55, [], DataType.BOOL, Convention.THISCALL)
RecordToolMessage = manager.virtual_function(56, [], DataType.VOID, Convention.THISCALL)
IgnoresZBuffer = manager.virtual_function(56, [], DataType.BOOL, Convention.THISCALL)
# IClientNetworkable
GetIClientUnknown = manager.virtual_function(57, [], DataType.POINTER, Convention.THISCALL)
Release = manager.virtual_function(58, [], DataType.VOID, Convention.THISCALL)
GetClientClass = manager.virtual_function(59, [], DataType.POINTER, Convention.THISCALL)
NotifyShouldTransmit = manager.virtual_function(60, [DataType.INT], DataType.VOID, Convention.THISCALL)
OnPreDataChanged = manager.virtual_function(61, [DataType.INT], DataType.VOID, Convention.THISCALL)
OnDataChanged = manager.virtual_function(62, [DataType.INT], DataType.VOID, Convention.THISCALL)
PreDataUpdate = manager.virtual_function(63, [DataType.INT], DataType.VOID, Convention.THISCALL)
PreDataUpdate = manager.virtual_function(64, [DataType.INT], DataType.VOID, Convention.THISCALL)
PostDataUpdate = manager.virtual_function(65, [DataType.INT], DataType.VOID, Convention.THISCALL)
IsDormant = manager.virtual_function(66, [], DataType.BOOL, Convention.THISCALL)
entindex = manager.virtual_function(67, [], DataType.INT, Convention.THISCALL)
ReceiveMessage = manager.virtual_function(68, [DataType.INT, DataType.POINTER], DataType.VOID, Convention.THISCALL)
GetDataTableBasePtr = manager.virtual_function(69, [], DataType.POINTER, Convention.THISCALL)
SetDestroyedOnRecreateEntities = manager.virtual_function(70, [], DataType.VOID, Convention.THISCALL) # (wth?)
# IClientThinkable
GetIClientUnknown = manager.virtual_function(71, [], DataType.POINTER, Convention.THISCALL)
ClientThink = manager.virtual_function(72, [], DataType.VOID, Convention.THISCALL)
GetThinkHandle = manager.virtual_function(73, [], DataType.POINTER, Convention.THISCALL)
SetThinkHandle = manager.virtual_function(74, [DataType.POINTER], DataType.VOID, Convention.THISCALL)
Release = manager.virtual_function(75, [], DataType.VOID, Convention.THISCALL)

from core import console_message
cl_ent = make_object(IClientEntity, ClientEntityList.GetClientEntity(EngineClient.GetLocalPlayer()))
console_message(f'm_iHealth -> {cl_ent.m_iHealth}\n')
console_message(f'm_vecOrigin -> {cl_ent.m_vecOrigin}\n')


m_iHealth -> 125
m_vecOrigin -> Vector(...) # It works but I forgot to make a record...
It's a trap!

Return to “Code examples / Cookbook”

Who is online

Users browsing this forum: No registered users and 4 guests