Вопрос Помогите с путями для AIDA что бы найти офсеты и обновить сурс пожалуйста

Начинающий
Статус
Оффлайн
Регистрация
6 Сен 2015
Сообщения
59
Реакции[?]
4
Поинты[?]
1K
Помогите с путями для IDA что бы найти офсеты и обновить сурс пожалуйста

#pragma once
template <typename F>inline F Function(void* base, DWORD64 index) { return (*(F**)base)[index]; }
enum EEntityProxyFlags : __int64 {
ENTITY_PROXY_RENDER = 0,
ENTITY_PROXY_PHYSICS = 1,
ENTITY_PROXY_SCRIPT = 2,
ENTITY_PROXY_SOUND = 3,
ENTITY_PROXY_AI = 4,
ENTITY_PROXY_AREA = 5,
ENTITY_PROXY_BOIDS = 6,
ENTITY_PROXY_BOID_OBJECT = 7,
ENTITY_PROXY_CAMERA = 8,
ENTITY_PROXY_FLOW_GRAPH = 9,
ENTITY_PROXY_SUBSTITUTION = 10,
ENTITY_PROXY_TRIGGER = 11,
ENTITY_PROXY_ROPE = 12,
ENTITY_PROXY_ENTITY_NODE = 13,
ENTITY_PROXY_USER = 14,
ENTITY_PROXY_LAST = 15,
};

class VTable
{
public:
void Init()
{
__int16 SizeTable = GetCount();
PDWORD64 Table = new DWORD64[SizeTable + 2];
Table[0] = (DWORD64)this;
Table[1] = (DWORD64)&vTable[0];
memcpy(&Table[2], (void*)vTable, sizeof(DWORD64) * SizeTable);
vTable = (PDWORD64)&Table[2];
}
template <typename T>
__inline T GetOrigFunction(int Index)
{
return (T)((PDWORD64)vTable[-1])[Index];
}
template <typename T>
__inline T Hooking(int Index, T nFunction)
{
T orig = (T)vTable[Index];
vTable[Index] = (DWORD64)nFunction;
return orig;
}
private:
__inline __int16 GetCount()
{
__int16 Size = 0;
while (vTable[Size] != 0) ++Size;
return Size;
}
private:
PDWORD64 vTable;
};

class SSystemGlobalEnvironment {
public:
class IGame* GetGame() {
return *(IGame**)((__int64)this + 200);
}
class IEntitySystem* GetIEntitySystem() {
return *(IEntitySystem**)((__int64)this + 216);
}
class IRenderer* GetIRenderer() {
return (IRenderer*)*(DWORD64*)((DWORD64)this + 72);
}
class IPhysicalWorld* GetPhysicalWorld() {
return *(IPhysicalWorld**)((DWORD64)this + 112);
}
class ISystem* GetSystem() { //GetUserName //dwRenderIndex = 4
return *(ISystem**)((__int64)this + 0xE8);
}
static SSystemGlobalEnvironment* Singleton() {
return *(SSystemGlobalEnvironment**)0x14222A000; // string -> ai_CompatibilityMode
}
};

class ISystem
{
public:
class VTable* GetVTable() { return (VTable*)this; }
};

class IRenderer
{
public:
class VTable* GetVTable() { return (VTable*)this; }
IDirect3DDevice9* Get3DDevice() { return (IDirect3DDevice9*)*(DWORD64*)((DWORD64)this + 0xA6D0); }
float GetWidth() { return (float)Function<int(__fastcall*)(PVOID)>(this, 90)(this); }
float GetHeight() { return (float)Function<int(__fastcall*)(PVOID)>(this, 91)(this); }
bool ProjectToScreen(vec_to_screen* p_vec_to_screen) { return Function<bool(__fastcall*)(PVOID, vec_to_screen*)>(this, 100)(this, p_vec_to_screen); }
ILINE bool WorldToScreen(Vec3 World, Vec3& Screen)
{
vec_to_screen pVecToScreen;
pVecToScreen.to_x = World.x;
pVecToScreen.to_y = World.y;
pVecToScreen.to_z = World.z;
pVecToScreen.out_x = &Screen.x;
pVecToScreen.out_y = &Screen.y;
pVecToScreen.out_z = &Screen.z;
ProjectToScreen(&pVecToScreen);
if (Screen.z < 0.0f || Screen.z > 1.0f)
return FALSE;
Screen.x *= (GetWidth() / 100.0f);
Screen.y *= (GetHeight() / 100.0f);
return TRUE;
}
FLOAT GetHypotenuseFromCenter(Vec3 Point) {
Vec3 Screen;
FLOAT ScreenCenterX = (GetWidth() / 2.0f);
FLOAT ScreenCenterY = (GetHeight() / 2.0f);
if (WorldToScreen(Point, Screen) == FALSE)return 9999.0f;
FLOAT PositionX = Screen.x > ScreenCenterX ? Screen.x - ScreenCenterX : ScreenCenterX - Screen.x;
FLOAT PositionY = Screen.y > ScreenCenterY ? Screen.y - ScreenCenterY : ScreenCenterY - Screen.y;
return (FLOAT)sqrt(PositionX * PositionX + PositionY * PositionY);
}
Vec3 GetViewCamera()
{
return *(Vec3*)((DWORD64)this + 0x1700);
}
};


class IGame {
public:
class IGameFramework* GetGameFramework() {
return Function<IGameFramework* (__thiscall*)(PVOID)>(this, 14)(this);
}
class SCVars* IGame::i_SCVars()
{
return (SCVars*)*(DWORD64*)((DWORD64)this + 304);
}
};

class SCVars {
public:
VOID SCVars::i_unlimitedammo(INT Value)
{
*(INT*)((DWORD64)this + 304) = Value; //+
}
};

class IGameFramework {
public:
class IActorSystem* GetIActorSystem() {
return Function <IActorSystem* (__thiscall*)(PVOID)>(this, 25)(this);
}

bool GetClientActor(class IActor** bValue) {
return Function <bool(__thiscall*)(PVOID, IActor**)>(this, 142)(this, bValue);
}
class IGameRules* GetGameRules()
{
return Function<IGameRules* (__thiscall*)(PVOID)>(this, 137)(this);
}
};

class IActorSystem {
public:
class IActor* GetActor(int iValue) {
return Function <IActor* (__thiscall*)(PVOID, int)>(this, 15)(this, iValue);
}
};

class IActor {
public:
int GetTeamId() {
return *(int*)((__int64)this + 992);
}
int GetHealth()
{
return Function<int(__thiscall*)(PVOID)>(this, 27)(this); //+
}
class IEntity* IActor::GetEntity()
{
return (IEntity*)*(DWORD64*)((DWORD64)this + 16);
}

bool IsDead()
{
return GetHealth() <= 0;
}
class IItem* GetCurrentItem(bool IncludeVehicle = false)
{
return Function<IItem* (__thiscall*)(void*, bool)>(this, 57)(this, IncludeVehicle);
}
void SetViewRotation(Quat& rotation) {
typedef void(__thiscall* pFunc)(PVOID, Quat&);
return Function<pFunc>(this, 51)(this, rotation);
}
int GetWeaponType() {
return *(int*)((__int64)this + (0xECC + 0x8));
}
};

class IItem
{
public:
class IWeapon* GetWeapon()
{
return Function<IWeapon* (__thiscall*)(void*)>(this, 79)(this);
}
};

class IWeapon
{
public:
void StartFire()
{
return Function<void(__thiscall*)(void*)>(this, 11)(this);
}

void StopFire()
{
return Function<void(__thiscall*)(void*)>(this, 12)(this);
}
class IWeaponPTR* GetWeaponPTR() { //needIcon
return *(IWeaponPTR**)((__int64)this + 0x8);
}
void SetFiringPos(Vec3 Position)
{
*(Vec3*)((uint64_t) * (uint64_t*)((uint64_t)this + 0x18) + 0x1C) = Position;
}
};

class IWeaponPTR {
public:
class IWeaponCrypt* GetWeaponCrypt() { //needIcon
return *(IWeaponCrypt**)((__int64)this + 0x60);
}
void IWeaponPTR::RequestShoot(DWORD64 dwPellets)
{
((DWORD64(__thiscall*)(IWeaponPTR*, DWORD64*))0x141248D20)(this, &dwPellets);
}
void StartFireTest() {
RequestShoot(0);
}
};

class IWeaponCrypt {
char pad_0x0000[0x68]; //needIcon
TWeaponMap m_statMap;
private:
inline int* EncryptData(int Id) {
if (m_statMap.find(Id) != m_statMap.end()) {
return m_statMap.find(Id)->second;
}
return false;
}

public:
inline bool Encrypt(int Id, float fValue) {
if (EncryptData(Id) != NULL) {
EncryptData(Id)[0] = *(int*)&fValue ^ EncryptData(Id)[1];

return true;
}
return false;
}

inline bool Decrypt(int Id, float* fValue) {
if (EncryptData(Id) != NULL) {
*(int*)&fValue = EncryptData(Id)[0] ^ EncryptData(Id)[1];

return true;
}
return false;
}
};

class IEntitySystem {
public:
class IEntityIterator* GetEntityIterator() {
return Function <IEntityIterator* (__thiscall*)(PVOID)>(this, 21)(this);
}
};

class IEntityIterator {
public:
class IEntity* GetNext() {
return Function <IEntity* (__thiscall*)(PVOID)>(this, 6)(this);
}
};

class IEntity {
public:
__int64 GetID() {
return Function <__int64(__thiscall*)(PVOID)>(this, 1)(this);
}
Matrix34& GetWorldTM()
{
return Function<Matrix34& (__thiscall*)(PVOID)>(this, 23)(this);
}
Vec3 IEntity::GetWorldPos()
{
Matrix34 m = this->GetWorldTM();
return m.GetTranslation();
}
class IEntityProxy* GetProxy(EEntityProxyFlags epParam) {
return Function <IEntityProxy* (__thiscall*)(PVOID, EEntityProxyFlags)>(this, 59)(this, epParam);
}
class ICharacterInstance* GetCharacter(int nSlot) {
return Function<ICharacterInstance* (__thiscall*)(PVOID, int)>(this, 82)(this, nSlot);
}
void GetWorldBounds(AABB1& bbox) {
return Function<void(__thiscall*)(PVOID, AABB1&)>(this, 25)(this, bbox);
}
void SetPos(const Vec3& vPos, int nWhyFlags = 0)
{
Function<void(__thiscall*)(PVOID, const Vec3&, int)>(this, 21)(this, vPos, nWhyFlags);
}
void IEntity::SetLocPos(Vec3 vPos)
{
Matrix34 Matrix = *(Matrix34*)((DWORD64)this + 64);
Matrix.m03 = vPos.x;
Matrix.m13 = vPos.y;
Matrix.m23 = vPos.z;
*(Matrix34*)((DWORD64)this + 64) = Matrix;
}
const char* GetName()
{
return Function<const char* (__thiscall*)(PVOID)>(this, 12)(this);
}
int GetFlags()
{
return Function<int(__thiscall*)(PVOID)>(this, 6)(this);
}
Vec3 GetPos() {
return m_vPos; /*CallFunction<Vec3(__stdcall*)(PVOID)>(this, 80)(this);*/
}
Quat& GetRotation() {
return m_qRotation;
}
bool IsHidden()
{
return Function<bool(__fastcall*)(PVOID64)>(this, 47)(this);
}
void Teleporter(int Fun)
{
if (Fun > 0 && GetAsyncKeyState((UINT)66)) {
if (*(DWORD64*)((DWORD64)this + 0x0C90) = 7) {
Vec3 tppos;
switch (Fun) {
case 1: tppos = { 674.915405f, 706.425842f, 46.875000f };
break;
case 2: tppos = { 857.731995f, 1342.788696f, 75.470123f };
break;
case 3: tppos = { 1809.648926f, 424.261902f, 95.510071f };
break;
default:
tppos = { ZERO };
break;
}
this->SetLocPos(tppos);
}
}
}
char pad_0000[48]; //0x0000
class IEntityClass* m_pClass; //0x0030
class IEntityArchetype* m_pArchetype; //0x0038
Matrix34 EntityWorldTM; //0x0040
Vec3 m_vPos; //0x0070
Vec3 m_vScale; //0x007C
Quat m_qRotation; //0x0088
};

class IEntityClass {
public:
const char* GetIClassName() {
return Function<const char* (__fastcall*)(PVOID64)>(this, 2)(this);
}
};

class ICharacterInstance
{
public:
class ISkeletonPose* GetISkeletonPose()
{
return Function<ISkeletonPose* (__thiscall*)(PVOID)>(this, 5)(this);
}
};

class ISkeletonPose
{
public:
QuatT& GetAbsJointByID(int nJointID)
{
return Function<QuatT& (__thiscall*)(PVOID, int)>(this, 7)(this, nJointID);
}
short GetJointIdByName(const char* sz_joint_name)
{
return Function<short(__fastcall*)(PVOID64, const char*)>(this, 3)(this, sz_joint_name);
}
const char* GetszNameByJointId(int sz_joint_name)
{
return Function<const char* (__fastcall*)(PVOID64, int)>(this, 6)(this, sz_joint_name);
}
};

class IEntityProxy {
public:
void SetHUDSilhouettesParams(float fAlpha, float fRed, float fGreen, float fBlue) {
return Function <void(__thiscall*)(PVOID, float, float, float, float)>
(this, 44)(this, fAlpha, fRed, fGreen, fBlue);
}
void HUDSilhouettesParams(float a, float r, float g, float b)
{
INT64 FlagTable = (*(INT64(__thiscall**)(INT64))(*(DWORD64*)this + 160))((INT64)this);
this->SetHUDSilhouettesParams(a, r, g, b);
*(DWORD64*)(FlagTable + 28) = *(DWORD64*)(FlagTable + 0xA4) |= 16;
}
};

class IPhysicalWorld
{
public:
int RayWorldIntersectionParams(const Vec3& org, const Vec3& dir, int objtypes, unsigned int flags, ray_hit* hits, int nMaxHits, IPhysicalEntity** pSkipEnts = 0, int nSkipEnts = 0, void* pForeignData = 0, int iForeignData = 0, const char* pNameTag = "RayWorldIntersection(Game)", ray_hit_cached* phitLast = 0, int iCaller = 4)
{
using oRayWorldIntersection = int(__fastcall*)(PVOID, const Vec3&, const Vec3&, int, unsigned int, ray_hit*, int, IPhysicalEntity**, int, void*, int, const char*, ray_hit_cached*, int);
return Function<oRayWorldIntersection>(this, 97)(this, org, dir, objtypes, flags, hits, nMaxHits, pSkipEnts, nSkipEnts, pForeignData, iForeignData, pNameTag, phitLast, iCaller);
}
Vec3 GetMPos(Vec3 BoneID, Vec3 CamPos, FLOAT Correct)
{
Vec3 vOut = BoneID - CamPos;
FLOAT sqr = (FLOAT)sqrt(vOut.x * vOut.x + vOut.y * vOut.y + vOut.z * vOut.z);
vOut /= sqr;
vOut *= sqr - Correct;
return vOut;
}
BOOL is_Visible(Vec3 BoneID, FLOAT Correct)
{
ray_hit tmpHit;
Vec3 CamPos = SSystemGlobalEnvironment::Singleton()->GetIRenderer()->GetViewCamera();
Vec3 vOut(GetMPos(BoneID, CamPos, Correct));
return !this->RayWorldIntersectionParams(CamPos, vOut, 0x100 | 1, 0xA | 0x400, &tmpHit, 1);
}

INT is_Visible(Vec3 p_BoneID, Vec3 m_BoneID)
{
ray_hit tmpHit;
return !this->RayWorldIntersectionParams(m_BoneID, p_BoneID - m_BoneID, 779, (10 & 0x0F), &tmpHit, 1);
}
};

class IGameRules
{
public:

int GetTeam(EntityId entityId)
{
return Function<int(__thiscall*)(PVOID, EntityId)>(this, 109)(this, entityId);
}
int GetHitTypeId(const char* type)
{
return Function<int(__thiscall*)(PVOID, const char*)>(this, 40)(this, type);
}
int GetHitMaterialId(const char* materialName)
{
return Function<int(__thiscall*)(PVOID, const char*)>(this, 113)(this, materialName);
}
void RequestHit(HitInfo* pHitInfo)
{
Function<void(__thiscall*)(PVOID, HitInfo*)>(this, 156)(this, pHitInfo);
}
};
 
Последнее редактирование:
Пользователь
Статус
Оффлайн
Регистрация
5 Июл 2022
Сообщения
996
Реакции[?]
86
Поинты[?]
23K
Учимся писать красиво
C++:
#pragma once
template <typename F>inline F Function(void* base, DWORD64 index) { return (*(F**)base)[index]; }
enum EEntityProxyFlags : __int64 {
ENTITY_PROXY_RENDER = 0,
ENTITY_PROXY_PHYSICS = 1,
ENTITY_PROXY_SCRIPT = 2,
ENTITY_PROXY_SOUND = 3,
ENTITY_PROXY_AI = 4,
ENTITY_PROXY_AREA = 5,
ENTITY_PROXY_BOIDS = 6,
ENTITY_PROXY_BOID_OBJECT = 7,
ENTITY_PROXY_CAMERA = 8,
ENTITY_PROXY_FLOW_GRAPH = 9,
ENTITY_PROXY_SUBSTITUTION = 10,
ENTITY_PROXY_TRIGGER = 11,
ENTITY_PROXY_ROPE = 12,
ENTITY_PROXY_ENTITY_NODE = 13,
ENTITY_PROXY_USER = 14,
ENTITY_PROXY_LAST = 15,
};

class VTable
{
public:
void Init()
{
__int16 SizeTable = GetCount();
PDWORD64 Table = new DWORD64[SizeTable + 2];
Table[0] = (DWORD64)this;
Table[1] = (DWORD64)&vTable[0];
memcpy(&Table[2], (void*)vTable, sizeof(DWORD64) * SizeTable);
vTable = (PDWORD64)&Table[2];
}
template <typename T>
__inline T GetOrigFunction(int Index)
{
return (T)((PDWORD64)vTable[-1])[Index];
}
template <typename T>
__inline T Hooking(int Index, T nFunction)
{
T orig = (T)vTable[Index];
vTable[Index] = (DWORD64)nFunction;
return orig;
}
private:
__inline __int16 GetCount()
{
__int16 Size = 0;
while (vTable[Size] != 0) ++Size;
return Size;
}
private:
PDWORD64 vTable;
};

class SSystemGlobalEnvironment {
public:
class IGame* GetGame() {
return *(IGame**)((__int64)this + 200);
}
class IEntitySystem* GetIEntitySystem() {
return *(IEntitySystem**)((__int64)this + 216);
}
class IRenderer* GetIRenderer() {
return (IRenderer*)*(DWORD64*)((DWORD64)this + 72);
}
class IPhysicalWorld* GetPhysicalWorld() {
return *(IPhysicalWorld**)((DWORD64)this + 112);
}
class ISystem* GetSystem() { //GetUserName //dwRenderIndex = 4
return *(ISystem**)((__int64)this + 0xE8);
}
static SSystemGlobalEnvironment* Singleton() {
return *(SSystemGlobalEnvironment**)0x14222A000; // string -> ai_CompatibilityMode
}
};

class ISystem
{
public:
class VTable* GetVTable() { return (VTable*)this; }
};

class IRenderer
{
public:
class VTable* GetVTable() { return (VTable*)this; }
IDirect3DDevice9* Get3DDevice() { return (IDirect3DDevice9*)*(DWORD64*)((DWORD64)this + 0xA6D0); }
float GetWidth() { return (float)Function<int(__fastcall*)(PVOID)>(this, 90)(this); }
float GetHeight() { return (float)Function<int(__fastcall*)(PVOID)>(this, 91)(this); }
bool ProjectToScreen(vec_to_screen* p_vec_to_screen) { return Function<bool(__fastcall*)(PVOID, vec_to_screen*)>(this, 100)(this, p_vec_to_screen); }
ILINE bool WorldToScreen(Vec3 World, Vec3& Screen)
{
vec_to_screen pVecToScreen;
pVecToScreen.to_x = World.x;
pVecToScreen.to_y = World.y;
pVecToScreen.to_z = World.z;
pVecToScreen.out_x = &Screen.x;
pVecToScreen.out_y = &Screen.y;
pVecToScreen.out_z = &Screen.z;
ProjectToScreen(&pVecToScreen);
if (Screen.z < 0.0f || Screen.z > 1.0f)
return FALSE;
Screen.x *= (GetWidth() / 100.0f);
Screen.y *= (GetHeight() / 100.0f);
return TRUE;
}
FLOAT GetHypotenuseFromCenter(Vec3 Point) {
Vec3 Screen;
FLOAT ScreenCenterX = (GetWidth() / 2.0f);
FLOAT ScreenCenterY = (GetHeight() / 2.0f);
if (WorldToScreen(Point, Screen) == FALSE)return 9999.0f;
FLOAT PositionX = Screen.x > ScreenCenterX ? Screen.x - ScreenCenterX : ScreenCenterX - Screen.x;
FLOAT PositionY = Screen.y > ScreenCenterY ? Screen.y - ScreenCenterY : ScreenCenterY - Screen.y;
return (FLOAT)sqrt(PositionX * PositionX + PositionY * PositionY);
}
Vec3 GetViewCamera()
{
return *(Vec3*)((DWORD64)this + 0x1700);
}
};


class IGame {
public:
class IGameFramework* GetGameFramework() {
return Function<IGameFramework* (__thiscall*)(PVOID)>(this, 14)(this);
}
class SCVars* IGame::i_SCVars()
{
return (SCVars*)*(DWORD64*)((DWORD64)this + 304);
}
};

class SCVars {
public:
VOID SCVars::i_unlimitedammo(INT Value)
{
*(INT*)((DWORD64)this + 304) = Value; //+
}
};

class IGameFramework {
public:
class IActorSystem* GetIActorSystem() {
return Function <IActorSystem* (__thiscall*)(PVOID)>(this, 25)(this);
}

bool GetClientActor(class IActor** bValue) {
return Function <bool(__thiscall*)(PVOID, IActor**)>(this, 142)(this, bValue);
}
class IGameRules* GetGameRules()
{
return Function<IGameRules* (__thiscall*)(PVOID)>(this, 137)(this);
}
};

class IActorSystem {
public:
class IActor* GetActor(int iValue) {
return Function <IActor* (__thiscall*)(PVOID, int)>(this, 15)(this, iValue);
}
};

class IActor {
public:
int GetTeamId() {
return *(int*)((__int64)this + 992);
}
int GetHealth()
{
return Function<int(__thiscall*)(PVOID)>(this, 27)(this); //+
}
class IEntity* IActor::GetEntity()
{
return (IEntity*)*(DWORD64*)((DWORD64)this + 16);
}

bool IsDead()
{
return GetHealth() <= 0;
}
class IItem* GetCurrentItem(bool IncludeVehicle = false)
{
return Function<IItem* (__thiscall*)(void*, bool)>(this, 57)(this, IncludeVehicle);
}
void SetViewRotation(Quat& rotation) {
typedef void(__thiscall* pFunc)(PVOID, Quat&);
return Function<pFunc>(this, 51)(this, rotation);
}
int GetWeaponType() {
return *(int*)((__int64)this + (0xECC + 0x8));
}
};

class IItem
{
public:
class IWeapon* GetWeapon()
{
return Function<IWeapon* (__thiscall*)(void*)>(this, 79)(this);
}
};

class IWeapon
{
public:
void StartFire()
{
return Function<void(__thiscall*)(void*)>(this, 11)(this);
}

void StopFire()
{
return Function<void(__thiscall*)(void*)>(this, 12)(this);
}
class IWeaponPTR* GetWeaponPTR() { //needIcon
return *(IWeaponPTR**)((__int64)this + 0x8);
}
void SetFiringPos(Vec3 Position)
{
*(Vec3*)((uint64_t) * (uint64_t*)((uint64_t)this + 0x18) + 0x1C) = Position;
}
};

class IWeaponPTR {
public:
class IWeaponCrypt* GetWeaponCrypt() { //needIcon
return *(IWeaponCrypt**)((__int64)this + 0x60);
}
void IWeaponPTR::RequestShoot(DWORD64 dwPellets)
{
((DWORD64(__thiscall*)(IWeaponPTR*, DWORD64*))0x141248D20)(this, &dwPellets);
}
void StartFireTest() {
RequestShoot(0);
}
};

class IWeaponCrypt {
char pad_0x0000[0x68]; //needIcon
TWeaponMap m_statMap;
private:
inline int* EncryptData(int Id) {
if (m_statMap.find(Id) != m_statMap.end()) {
return m_statMap.find(Id)->second;
}
return false;
}

public:
inline bool Encrypt(int Id, float fValue) {
if (EncryptData(Id) != NULL) {
EncryptData(Id)[0] = *(int*)&fValue ^ EncryptData(Id)[1];

return true;
}
return false;
}

inline bool Decrypt(int Id, float* fValue) {
if (EncryptData(Id) != NULL) {
*(int*)&fValue = EncryptData(Id)[0] ^ EncryptData(Id)[1];

return true;
}
return false;
}
};

class IEntitySystem {
public:
class IEntityIterator* GetEntityIterator() {
return Function <IEntityIterator* (__thiscall*)(PVOID)>(this, 21)(this);
}
};

class IEntityIterator {
public:
class IEntity* GetNext() {
return Function <IEntity* (__thiscall*)(PVOID)>(this, 6)(this);
}
};

class IEntity {
public:
__int64 GetID() {
return Function <__int64(__thiscall*)(PVOID)>(this, 1)(this);
}
Matrix34& GetWorldTM()
{
return Function<Matrix34& (__thiscall*)(PVOID)>(this, 23)(this);
}
Vec3 IEntity::GetWorldPos()
{
Matrix34 m = this->GetWorldTM();
return m.GetTranslation();
}
class IEntityProxy* GetProxy(EEntityProxyFlags epParam) {
return Function <IEntityProxy* (__thiscall*)(PVOID, EEntityProxyFlags)>(this, 59)(this, epParam);
}
class ICharacterInstance* GetCharacter(int nSlot) {
return Function<ICharacterInstance* (__thiscall*)(PVOID, int)>(this, 82)(this, nSlot);
}
void GetWorldBounds(AABB1& bbox) {
return Function<void(__thiscall*)(PVOID, AABB1&)>(this, 25)(this, bbox);
}
void SetPos(const Vec3& vPos, int nWhyFlags = 0)
{
Function<void(__thiscall*)(PVOID, const Vec3&, int)>(this, 21)(this, vPos, nWhyFlags);
}
void IEntity::SetLocPos(Vec3 vPos)
{
Matrix34 Matrix = *(Matrix34*)((DWORD64)this + 64);
Matrix.m03 = vPos.x;
Matrix.m13 = vPos.y;
Matrix.m23 = vPos.z;
*(Matrix34*)((DWORD64)this + 64) = Matrix;
}
const char* GetName()
{
return Function<const char* (__thiscall*)(PVOID)>(this, 12)(this);
}
int GetFlags()
{
return Function<int(__thiscall*)(PVOID)>(this, 6)(this);
}
Vec3 GetPos() {
return m_vPos; /*CallFunction<Vec3(__stdcall*)(PVOID)>(this, 80)(this);*/
}
Quat& GetRotation() {
return m_qRotation;
}
bool IsHidden()
{
return Function<bool(__fastcall*)(PVOID64)>(this, 47)(this);
}
void Teleporter(int Fun)
{
if (Fun > 0 && GetAsyncKeyState((UINT)66)) {
if (*(DWORD64*)((DWORD64)this + 0x0C90) = 7) {
Vec3 tppos;
switch (Fun) {
case 1: tppos = { 674.915405f, 706.425842f, 46.875000f };
break;
case 2: tppos = { 857.731995f, 1342.788696f, 75.470123f };
break;
case 3: tppos = { 1809.648926f, 424.261902f, 95.510071f };
break;
default:
tppos = { ZERO };
break;
}
this->SetLocPos(tppos);
}
}
}
char pad_0000[48]; //0x0000
class IEntityClass* m_pClass; //0x0030
class IEntityArchetype* m_pArchetype; //0x0038
Matrix34 EntityWorldTM; //0x0040
Vec3 m_vPos; //0x0070
Vec3 m_vScale; //0x007C
Quat m_qRotation; //0x0088
};

class IEntityClass {
public:
const char* GetIClassName() {
return Function<const char* (__fastcall*)(PVOID64)>(this, 2)(this);
}
};

class ICharacterInstance
{
public:
class ISkeletonPose* GetISkeletonPose()
{
return Function<ISkeletonPose* (__thiscall*)(PVOID)>(this, 5)(this);
}
};

class ISkeletonPose
{
public:
QuatT& GetAbsJointByID(int nJointID)
{
return Function<QuatT& (__thiscall*)(PVOID, int)>(this, 7)(this, nJointID);
}
short GetJointIdByName(const char* sz_joint_name)
{
return Function<short(__fastcall*)(PVOID64, const char*)>(this, 3)(this, sz_joint_name);
}
const char* GetszNameByJointId(int sz_joint_name)
{
return Function<const char* (__fastcall*)(PVOID64, int)>(this, 6)(this, sz_joint_name);
}
};

class IEntityProxy {
public:
void SetHUDSilhouettesParams(float fAlpha, float fRed, float fGreen, float fBlue) {
return Function <void(__thiscall*)(PVOID, float, float, float, float)>
(this, 44)(this, fAlpha, fRed, fGreen, fBlue);
}
void HUDSilhouettesParams(float a, float r, float g, float b)
{
INT64 FlagTable = (*(INT64(__thiscall**)(INT64))(*(DWORD64*)this + 160))((INT64)this);
this->SetHUDSilhouettesParams(a, r, g, b);
*(DWORD64*)(FlagTable + 28) = *(DWORD64*)(FlagTable + 0xA4) |= 16;
}
};

class IPhysicalWorld
{
public:
int RayWorldIntersectionParams(const Vec3& org, const Vec3& dir, int objtypes, unsigned int flags, ray_hit* hits, int nMaxHits, IPhysicalEntity** pSkipEnts = 0, int nSkipEnts = 0, void* pForeignData = 0, int iForeignData = 0, const char* pNameTag = "RayWorldIntersection(Game)", ray_hit_cached* phitLast = 0, int iCaller = 4)
{
using oRayWorldIntersection = int(__fastcall*)(PVOID, const Vec3&, const Vec3&, int, unsigned int, ray_hit*, int, IPhysicalEntity**, int, void*, int, const char*, ray_hit_cached*, int);
return Function<oRayWorldIntersection>(this, 97)(this, org, dir, objtypes, flags, hits, nMaxHits, pSkipEnts, nSkipEnts, pForeignData, iForeignData, pNameTag, phitLast, iCaller);
}
Vec3 GetMPos(Vec3 BoneID, Vec3 CamPos, FLOAT Correct)
{
Vec3 vOut = BoneID - CamPos;
FLOAT sqr = (FLOAT)sqrt(vOut.x * vOut.x + vOut.y * vOut.y + vOut.z * vOut.z);
vOut /= sqr;
vOut *= sqr - Correct;
return vOut;
}
BOOL is_Visible(Vec3 BoneID, FLOAT Correct)
{
ray_hit tmpHit;
Vec3 CamPos = SSystemGlobalEnvironment::Singleton()->GetIRenderer()->GetViewCamera();
Vec3 vOut(GetMPos(BoneID, CamPos, Correct));
return !this->RayWorldIntersectionParams(CamPos, vOut, 0x100 | 1, 0xA | 0x400, &tmpHit, 1);
}

INT is_Visible(Vec3 p_BoneID, Vec3 m_BoneID)
{
ray_hit tmpHit;
return !this->RayWorldIntersectionParams(m_BoneID, p_BoneID - m_BoneID, 779, (10 & 0x0F), &tmpHit, 1);
}
};

class IGameRules
{
public:

int GetTeam(EntityId entityId)
{
return Function<int(__thiscall*)(PVOID, EntityId)>(this, 109)(this, entityId);
}
int GetHitTypeId(const char* type)
{
return Function<int(__thiscall*)(PVOID, const char*)>(this, 40)(this, type);
}
int GetHitMaterialId(const char* materialName)
{
return Function<int(__thiscall*)(PVOID, const char*)>(this, 113)(this, materialName);
}
void RequestHit(HitInfo* pHitInfo)
{
Function<void(__thiscall*)(PVOID, HitInfo*)>(this, 156)(this, pHitInfo);
}
};
 
Забаненный
Статус
Оффлайн
Регистрация
2 Мар 2021
Сообщения
1,083
Реакции[?]
406
Поинты[?]
1K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Учимся писать красиво
C++:
#pragma once
template <typename F>inline F Function(void* base, DWORD64 index) { return (*(F**)base)[index]; }
enum EEntityProxyFlags : __int64 {
ENTITY_PROXY_RENDER = 0,
ENTITY_PROXY_PHYSICS = 1,
ENTITY_PROXY_SCRIPT = 2,
ENTITY_PROXY_SOUND = 3,
ENTITY_PROXY_AI = 4,
ENTITY_PROXY_AREA = 5,
ENTITY_PROXY_BOIDS = 6,
ENTITY_PROXY_BOID_OBJECT = 7,
ENTITY_PROXY_CAMERA = 8,
ENTITY_PROXY_FLOW_GRAPH = 9,
ENTITY_PROXY_SUBSTITUTION = 10,
ENTITY_PROXY_TRIGGER = 11,
ENTITY_PROXY_ROPE = 12,
ENTITY_PROXY_ENTITY_NODE = 13,
ENTITY_PROXY_USER = 14,
ENTITY_PROXY_LAST = 15,
};

class VTable
{
public:
void Init()
{
__int16 SizeTable = GetCount();
PDWORD64 Table = new DWORD64[SizeTable + 2];
Table[0] = (DWORD64)this;
Table[1] = (DWORD64)&vTable[0];
memcpy(&Table[2], (void*)vTable, sizeof(DWORD64) * SizeTable);
vTable = (PDWORD64)&Table[2];
}
template <typename T>
__inline T GetOrigFunction(int Index)
{
return (T)((PDWORD64)vTable[-1])[Index];
}
template <typename T>
__inline T Hooking(int Index, T nFunction)
{
T orig = (T)vTable[Index];
vTable[Index] = (DWORD64)nFunction;
return orig;
}
private:
__inline __int16 GetCount()
{
__int16 Size = 0;
while (vTable[Size] != 0) ++Size;
return Size;
}
private:
PDWORD64 vTable;
};

class SSystemGlobalEnvironment {
public:
class IGame* GetGame() {
return *(IGame**)((__int64)this + 200);
}
class IEntitySystem* GetIEntitySystem() {
return *(IEntitySystem**)((__int64)this + 216);
}
class IRenderer* GetIRenderer() {
return (IRenderer*)*(DWORD64*)((DWORD64)this + 72);
}
class IPhysicalWorld* GetPhysicalWorld() {
return *(IPhysicalWorld**)((DWORD64)this + 112);
}
class ISystem* GetSystem() { //GetUserName //dwRenderIndex = 4
return *(ISystem**)((__int64)this + 0xE8);
}
static SSystemGlobalEnvironment* Singleton() {
return *(SSystemGlobalEnvironment**)0x14222A000; // string -> ai_CompatibilityMode
}
};

class ISystem
{
public:
class VTable* GetVTable() { return (VTable*)this; }
};

class IRenderer
{
public:
class VTable* GetVTable() { return (VTable*)this; }
IDirect3DDevice9* Get3DDevice() { return (IDirect3DDevice9*)*(DWORD64*)((DWORD64)this + 0xA6D0); }
float GetWidth() { return (float)Function<int(__fastcall*)(PVOID)>(this, 90)(this); }
float GetHeight() { return (float)Function<int(__fastcall*)(PVOID)>(this, 91)(this); }
bool ProjectToScreen(vec_to_screen* p_vec_to_screen) { return Function<bool(__fastcall*)(PVOID, vec_to_screen*)>(this, 100)(this, p_vec_to_screen); }
ILINE bool WorldToScreen(Vec3 World, Vec3& Screen)
{
vec_to_screen pVecToScreen;
pVecToScreen.to_x = World.x;
pVecToScreen.to_y = World.y;
pVecToScreen.to_z = World.z;
pVecToScreen.out_x = &Screen.x;
pVecToScreen.out_y = &Screen.y;
pVecToScreen.out_z = &Screen.z;
ProjectToScreen(&pVecToScreen);
if (Screen.z < 0.0f || Screen.z > 1.0f)
return FALSE;
Screen.x *= (GetWidth() / 100.0f);
Screen.y *= (GetHeight() / 100.0f);
return TRUE;
}
FLOAT GetHypotenuseFromCenter(Vec3 Point) {
Vec3 Screen;
FLOAT ScreenCenterX = (GetWidth() / 2.0f);
FLOAT ScreenCenterY = (GetHeight() / 2.0f);
if (WorldToScreen(Point, Screen) == FALSE)return 9999.0f;
FLOAT PositionX = Screen.x > ScreenCenterX ? Screen.x - ScreenCenterX : ScreenCenterX - Screen.x;
FLOAT PositionY = Screen.y > ScreenCenterY ? Screen.y - ScreenCenterY : ScreenCenterY - Screen.y;
return (FLOAT)sqrt(PositionX * PositionX + PositionY * PositionY);
}
Vec3 GetViewCamera()
{
return *(Vec3*)((DWORD64)this + 0x1700);
}
};


class IGame {
public:
class IGameFramework* GetGameFramework() {
return Function<IGameFramework* (__thiscall*)(PVOID)>(this, 14)(this);
}
class SCVars* IGame::i_SCVars()
{
return (SCVars*)*(DWORD64*)((DWORD64)this + 304);
}
};

class SCVars {
public:
VOID SCVars::i_unlimitedammo(INT Value)
{
*(INT*)((DWORD64)this + 304) = Value; //+
}
};

class IGameFramework {
public:
class IActorSystem* GetIActorSystem() {
return Function <IActorSystem* (__thiscall*)(PVOID)>(this, 25)(this);
}

bool GetClientActor(class IActor** bValue) {
return Function <bool(__thiscall*)(PVOID, IActor**)>(this, 142)(this, bValue);
}
class IGameRules* GetGameRules()
{
return Function<IGameRules* (__thiscall*)(PVOID)>(this, 137)(this);
}
};

class IActorSystem {
public:
class IActor* GetActor(int iValue) {
return Function <IActor* (__thiscall*)(PVOID, int)>(this, 15)(this, iValue);
}
};

class IActor {
public:
int GetTeamId() {
return *(int*)((__int64)this + 992);
}
int GetHealth()
{
return Function<int(__thiscall*)(PVOID)>(this, 27)(this); //+
}
class IEntity* IActor::GetEntity()
{
return (IEntity*)*(DWORD64*)((DWORD64)this + 16);
}

bool IsDead()
{
return GetHealth() <= 0;
}
class IItem* GetCurrentItem(bool IncludeVehicle = false)
{
return Function<IItem* (__thiscall*)(void*, bool)>(this, 57)(this, IncludeVehicle);
}
void SetViewRotation(Quat& rotation) {
typedef void(__thiscall* pFunc)(PVOID, Quat&);
return Function<pFunc>(this, 51)(this, rotation);
}
int GetWeaponType() {
return *(int*)((__int64)this + (0xECC + 0x8));
}
};

class IItem
{
public:
class IWeapon* GetWeapon()
{
return Function<IWeapon* (__thiscall*)(void*)>(this, 79)(this);
}
};

class IWeapon
{
public:
void StartFire()
{
return Function<void(__thiscall*)(void*)>(this, 11)(this);
}

void StopFire()
{
return Function<void(__thiscall*)(void*)>(this, 12)(this);
}
class IWeaponPTR* GetWeaponPTR() { //needIcon
return *(IWeaponPTR**)((__int64)this + 0x8);
}
void SetFiringPos(Vec3 Position)
{
*(Vec3*)((uint64_t) * (uint64_t*)((uint64_t)this + 0x18) + 0x1C) = Position;
}
};

class IWeaponPTR {
public:
class IWeaponCrypt* GetWeaponCrypt() { //needIcon
return *(IWeaponCrypt**)((__int64)this + 0x60);
}
void IWeaponPTR::RequestShoot(DWORD64 dwPellets)
{
((DWORD64(__thiscall*)(IWeaponPTR*, DWORD64*))0x141248D20)(this, &dwPellets);
}
void StartFireTest() {
RequestShoot(0);
}
};

class IWeaponCrypt {
char pad_0x0000[0x68]; //needIcon
TWeaponMap m_statMap;
private:
inline int* EncryptData(int Id) {
if (m_statMap.find(Id) != m_statMap.end()) {
return m_statMap.find(Id)->second;
}
return false;
}

public:
inline bool Encrypt(int Id, float fValue) {
if (EncryptData(Id) != NULL) {
EncryptData(Id)[0] = *(int*)&fValue ^ EncryptData(Id)[1];

return true;
}
return false;
}

inline bool Decrypt(int Id, float* fValue) {
if (EncryptData(Id) != NULL) {
*(int*)&fValue = EncryptData(Id)[0] ^ EncryptData(Id)[1];

return true;
}
return false;
}
};

class IEntitySystem {
public:
class IEntityIterator* GetEntityIterator() {
return Function <IEntityIterator* (__thiscall*)(PVOID)>(this, 21)(this);
}
};

class IEntityIterator {
public:
class IEntity* GetNext() {
return Function <IEntity* (__thiscall*)(PVOID)>(this, 6)(this);
}
};

class IEntity {
public:
__int64 GetID() {
return Function <__int64(__thiscall*)(PVOID)>(this, 1)(this);
}
Matrix34& GetWorldTM()
{
return Function<Matrix34& (__thiscall*)(PVOID)>(this, 23)(this);
}
Vec3 IEntity::GetWorldPos()
{
Matrix34 m = this->GetWorldTM();
return m.GetTranslation();
}
class IEntityProxy* GetProxy(EEntityProxyFlags epParam) {
return Function <IEntityProxy* (__thiscall*)(PVOID, EEntityProxyFlags)>(this, 59)(this, epParam);
}
class ICharacterInstance* GetCharacter(int nSlot) {
return Function<ICharacterInstance* (__thiscall*)(PVOID, int)>(this, 82)(this, nSlot);
}
void GetWorldBounds(AABB1& bbox) {
return Function<void(__thiscall*)(PVOID, AABB1&)>(this, 25)(this, bbox);
}
void SetPos(const Vec3& vPos, int nWhyFlags = 0)
{
Function<void(__thiscall*)(PVOID, const Vec3&, int)>(this, 21)(this, vPos, nWhyFlags);
}
void IEntity::SetLocPos(Vec3 vPos)
{
Matrix34 Matrix = *(Matrix34*)((DWORD64)this + 64);
Matrix.m03 = vPos.x;
Matrix.m13 = vPos.y;
Matrix.m23 = vPos.z;
*(Matrix34*)((DWORD64)this + 64) = Matrix;
}
const char* GetName()
{
return Function<const char* (__thiscall*)(PVOID)>(this, 12)(this);
}
int GetFlags()
{
return Function<int(__thiscall*)(PVOID)>(this, 6)(this);
}
Vec3 GetPos() {
return m_vPos; /*CallFunction<Vec3(__stdcall*)(PVOID)>(this, 80)(this);*/
}
Quat& GetRotation() {
return m_qRotation;
}
bool IsHidden()
{
return Function<bool(__fastcall*)(PVOID64)>(this, 47)(this);
}
void Teleporter(int Fun)
{
if (Fun > 0 && GetAsyncKeyState((UINT)66)) {
if (*(DWORD64*)((DWORD64)this + 0x0C90) = 7) {
Vec3 tppos;
switch (Fun) {
case 1: tppos = { 674.915405f, 706.425842f, 46.875000f };
break;
case 2: tppos = { 857.731995f, 1342.788696f, 75.470123f };
break;
case 3: tppos = { 1809.648926f, 424.261902f, 95.510071f };
break;
default:
tppos = { ZERO };
break;
}
this->SetLocPos(tppos);
}
}
}
char pad_0000[48]; //0x0000
class IEntityClass* m_pClass; //0x0030
class IEntityArchetype* m_pArchetype; //0x0038
Matrix34 EntityWorldTM; //0x0040
Vec3 m_vPos; //0x0070
Vec3 m_vScale; //0x007C
Quat m_qRotation; //0x0088
};

class IEntityClass {
public:
const char* GetIClassName() {
return Function<const char* (__fastcall*)(PVOID64)>(this, 2)(this);
}
};

class ICharacterInstance
{
public:
class ISkeletonPose* GetISkeletonPose()
{
return Function<ISkeletonPose* (__thiscall*)(PVOID)>(this, 5)(this);
}
};

class ISkeletonPose
{
public:
QuatT& GetAbsJointByID(int nJointID)
{
return Function<QuatT& (__thiscall*)(PVOID, int)>(this, 7)(this, nJointID);
}
short GetJointIdByName(const char* sz_joint_name)
{
return Function<short(__fastcall*)(PVOID64, const char*)>(this, 3)(this, sz_joint_name);
}
const char* GetszNameByJointId(int sz_joint_name)
{
return Function<const char* (__fastcall*)(PVOID64, int)>(this, 6)(this, sz_joint_name);
}
};

class IEntityProxy {
public:
void SetHUDSilhouettesParams(float fAlpha, float fRed, float fGreen, float fBlue) {
return Function <void(__thiscall*)(PVOID, float, float, float, float)>
(this, 44)(this, fAlpha, fRed, fGreen, fBlue);
}
void HUDSilhouettesParams(float a, float r, float g, float b)
{
INT64 FlagTable = (*(INT64(__thiscall**)(INT64))(*(DWORD64*)this + 160))((INT64)this);
this->SetHUDSilhouettesParams(a, r, g, b);
*(DWORD64*)(FlagTable + 28) = *(DWORD64*)(FlagTable + 0xA4) |= 16;
}
};

class IPhysicalWorld
{
public:
int RayWorldIntersectionParams(const Vec3& org, const Vec3& dir, int objtypes, unsigned int flags, ray_hit* hits, int nMaxHits, IPhysicalEntity** pSkipEnts = 0, int nSkipEnts = 0, void* pForeignData = 0, int iForeignData = 0, const char* pNameTag = "RayWorldIntersection(Game)", ray_hit_cached* phitLast = 0, int iCaller = 4)
{
using oRayWorldIntersection = int(__fastcall*)(PVOID, const Vec3&, const Vec3&, int, unsigned int, ray_hit*, int, IPhysicalEntity**, int, void*, int, const char*, ray_hit_cached*, int);
return Function<oRayWorldIntersection>(this, 97)(this, org, dir, objtypes, flags, hits, nMaxHits, pSkipEnts, nSkipEnts, pForeignData, iForeignData, pNameTag, phitLast, iCaller);
}
Vec3 GetMPos(Vec3 BoneID, Vec3 CamPos, FLOAT Correct)
{
Vec3 vOut = BoneID - CamPos;
FLOAT sqr = (FLOAT)sqrt(vOut.x * vOut.x + vOut.y * vOut.y + vOut.z * vOut.z);
vOut /= sqr;
vOut *= sqr - Correct;
return vOut;
}
BOOL is_Visible(Vec3 BoneID, FLOAT Correct)
{
ray_hit tmpHit;
Vec3 CamPos = SSystemGlobalEnvironment::Singleton()->GetIRenderer()->GetViewCamera();
Vec3 vOut(GetMPos(BoneID, CamPos, Correct));
return !this->RayWorldIntersectionParams(CamPos, vOut, 0x100 | 1, 0xA | 0x400, &tmpHit, 1);
}

INT is_Visible(Vec3 p_BoneID, Vec3 m_BoneID)
{
ray_hit tmpHit;
return !this->RayWorldIntersectionParams(m_BoneID, p_BoneID - m_BoneID, 779, (10 & 0x0F), &tmpHit, 1);
}
};

class IGameRules
{
public:

int GetTeam(EntityId entityId)
{
return Function<int(__thiscall*)(PVOID, EntityId)>(this, 109)(this, entityId);
}
int GetHitTypeId(const char* type)
{
return Function<int(__thiscall*)(PVOID, const char*)>(this, 40)(this, type);
}
int GetHitMaterialId(const char* materialName)
{
return Function<int(__thiscall*)(PVOID, const char*)>(this, 113)(this, materialName);
}
void RequestHit(HitInfo* pHitInfo)
{
Function<void(__thiscall*)(PVOID, HitInfo*)>(this, 156)(this, pHitInfo);
}
};
тебе бы тоже научится
 
Забаненный
Статус
Оффлайн
Регистрация
2 Мар 2021
Сообщения
1,083
Реакции[?]
406
Поинты[?]
1K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Пользователь
Статус
Оффлайн
Регистрация
5 Июл 2022
Сообщения
996
Реакции[?]
86
Поинты[?]
23K
C++:
#pragma once
template <typename F>inline F Function(void* base, DWORD64 index) { return (*(F**)base)[index]; }
enum EEntityProxyFlags : __int64 {
    ENTITY_PROXY_RENDER = 0,
    ENTITY_PROXY_PHYSICS = 1,
    ENTITY_PROXY_SCRIPT = 2,
    ENTITY_PROXY_SOUND = 3,
    ENTITY_PROXY_AI = 4,
    ENTITY_PROXY_AREA = 5,
    ENTITY_PROXY_BOIDS = 6,
    ENTITY_PROXY_BOID_OBJECT = 7,
    ENTITY_PROXY_CAMERA = 8,
    ENTITY_PROXY_FLOW_GRAPH = 9,
    ENTITY_PROXY_SUBSTITUTION = 10,
    ENTITY_PROXY_TRIGGER = 11,
    ENTITY_PROXY_ROPE = 12,
    ENTITY_PROXY_ENTITY_NODE = 13,
    ENTITY_PROXY_USER = 14,
    ENTITY_PROXY_LAST = 15,
};

class VTable
{
public:
    void Init()
    {
        __int16 SizeTable = GetCount();
        PDWORD64 Table = new DWORD64[SizeTable + 2];
        Table[0] = (DWORD64)this;
        Table[1] = (DWORD64)&vTable[0];
        memcpy(&Table[2], (void*)vTable, sizeof(DWORD64) * SizeTable);
        vTable = (PDWORD64)&Table[2];
    }
template <typename T>
__inline T GetOrigFunction(int Index)
{
    return (T)((PDWORD64)vTable[-1])[Index];
}
template <typename T>
    __inline T Hooking(int Index, T nFunction)
{
    T orig = (T)vTable[Index];
    vTable[Index] = (DWORD64)nFunction;
    return orig;
}
private:
__inline __int16 GetCount()
{
    __int16 Size = 0;
    while (vTable[Size] != 0) ++Size;
    return Size;
}
private:
    PDWORD64 vTable;
};

class SSystemGlobalEnvironment {
public:
    class IGame* GetGame() {return *(IGame**)((__int64)this + 200);}
    class IEntitySystem* GetIEntitySystem()  { return *(IEntitySystem**)((__int64)this + 216);}
    class IRenderer* GetIRenderer() {return (IRenderer*)*(DWORD64*)((DWORD64)this + 72);}
    class IPhysicalWorld* GetPhysicalWorld() {return *(IPhysicalWorld**)((DWORD64)this + 112);}
    class ISystem* GetSystem() { //GetUserName //dwRenderIndex = 4return *(ISystem**)((__int64)this + 0xE8);}
    static SSystemGlobalEnvironment* Singleton() {return *(SSystemGlobalEnvironment**)0x14222A000; // string -> ai_CompatibilityMode}
};

class ISystem
{
public:
    class VTable* GetVTable() { return (VTable*)this; }
};

class IRenderer
{
public:
    class VTable* GetVTable() { return (VTable*)this; }
    IDirect3DDevice9* Get3DDevice() { return (IDirect3DDevice9*)*(DWORD64*)((DWORD64)this + 0xA6D0); }
    float GetWidth() { return (float)Function<int(__fastcall*)(PVOID)>(this, 90)(this); }
    float GetHeight() { return (float)Function<int(__fastcall*)(PVOID)>(this, 91)(this); }
    bool ProjectToScreen(vec_to_screen* p_vec_to_screen) { return Function<bool(__fastcall*)(PVOID, vec_to_screen*)>(this, 100)(this, p_vec_to_screen); }
    ILINE bool WorldToScreen(Vec3 World, Vec3& Screen)
    {
    vec_to_screen pVecToScreen;
    pVecToScreen.to_x = World.x;
    pVecToScreen.to_y = World.y;
    pVecToScreen.to_z = World.z;
    pVecToScreen.out_x = &Screen.x;
    pVecToScreen.out_y = &Screen.y;
    pVecToScreen.out_z = &Screen.z;
    ProjectToScreen(&pVecToScreen);
    if (Screen.z < 0.0f || Screen.z > 1.0f)
        return FALSE;
    Screen.x *= (GetWidth() / 100.0f);
    Screen.y *= (GetHeight() / 100.0f);
    return TRUE;
    }
    FLOAT GetHypotenuseFromCenter(Vec3 Point) {
    Vec3 Screen;
    FLOAT ScreenCenterX = (GetWidth() / 2.0f);
    FLOAT ScreenCenterY = (GetHeight() / 2.0f);
    if (WorldToScreen(Point, Screen) == FALSE)return 9999.0f;
        FLOAT PositionX = Screen.x > ScreenCenterX ? Screen.x - ScreenCenterX : ScreenCenterX - Screen.x;
        FLOAT PositionY = Screen.y > ScreenCenterY ? Screen.y - ScreenCenterY : ScreenCenterY - Screen.y;
            return (FLOAT)sqrt(PositionX * PositionX + PositionY * PositionY);
    }
    Vec3 GetViewCamera()
    {
    return *(Vec3*)((DWORD64)this + 0x1700);
    }
};


class IGame {
public:
    class IGameFramework* GetGameFramework() {return Function<IGameFramework* (__thiscall*)(PVOID)>(this, 14)(this);}
class SCVars* IGame::i_SCVars()
{
return (SCVars*)*(DWORD64*)((DWORD64)this + 304);
}
};

class SCVars {
public:
VOID SCVars::i_unlimitedammo(INT Value)
{
*(INT*)((DWORD64)this + 304) = Value; //+
}
};

class IGameFramework {
public:
class IActorSystem* GetIActorSystem() {
return Function <IActorSystem* (__thiscall*)(PVOID)>(this, 25)(this);
}

bool GetClientActor(class IActor** bValue) {
return Function <bool(__thiscall*)(PVOID, IActor**)>(this, 142)(this, bValue);
}
class IGameRules* GetGameRules()
{
return Function<IGameRules* (__thiscall*)(PVOID)>(this, 137)(this);
}
};

class IActorSystem {
public:
class IActor* GetActor(int iValue) {
return Function <IActor* (__thiscall*)(PVOID, int)>(this, 15)(this, iValue);
}
};

class IActor {
public:
int GetTeamId() {
return *(int*)((__int64)this + 992);
}
int GetHealth()
{
return Function<int(__thiscall*)(PVOID)>(this, 27)(this); //+
}
class IEntity* IActor::GetEntity()
{
return (IEntity*)*(DWORD64*)((DWORD64)this + 16);
}

bool IsDead()
{
return GetHealth() <= 0;
}
class IItem* GetCurrentItem(bool IncludeVehicle = false)
{
return Function<IItem* (__thiscall*)(void*, bool)>(this, 57)(this, IncludeVehicle);
}
void SetViewRotation(Quat& rotation) {
typedef void(__thiscall* pFunc)(PVOID, Quat&);
return Function<pFunc>(this, 51)(this, rotation);
}
int GetWeaponType() {
return *(int*)((__int64)this + (0xECC + 0x8));
}
};

class IItem
{
public:
class IWeapon* GetWeapon()
{
return Function<IWeapon* (__thiscall*)(void*)>(this, 79)(this);
}
};

class IWeapon
{
public:
void StartFire()
{
return Function<void(__thiscall*)(void*)>(this, 11)(this);
}

void StopFire()
{
return Function<void(__thiscall*)(void*)>(this, 12)(this);
}
class IWeaponPTR* GetWeaponPTR() { //needIcon
return *(IWeaponPTR**)((__int64)this + 0x8);
}
void SetFiringPos(Vec3 Position)
{
*(Vec3*)((uint64_t) * (uint64_t*)((uint64_t)this + 0x18) + 0x1C) = Position;
}
};

class IWeaponPTR {
public:
class IWeaponCrypt* GetWeaponCrypt() { //needIcon
return *(IWeaponCrypt**)((__int64)this + 0x60);
}
void IWeaponPTR::RequestShoot(DWORD64 dwPellets)
{
((DWORD64(__thiscall*)(IWeaponPTR*, DWORD64*))0x141248D20)(this, &dwPellets);
}
void StartFireTest() {
RequestShoot(0);
}
};

class IWeaponCrypt {
char pad_0x0000[0x68]; //needIcon
TWeaponMap m_statMap;
private:
inline int* EncryptData(int Id) {
if (m_statMap.find(Id) != m_statMap.end()) {
return m_statMap.find(Id)->second;
}
return false;
}

public:
inline bool Encrypt(int Id, float fValue) {
if (EncryptData(Id) != NULL) {
EncryptData(Id)[0] = *(int*)&fValue ^ EncryptData(Id)[1];

return true;
}
return false;
}

inline bool Decrypt(int Id, float* fValue) {
if (EncryptData(Id) != NULL) {
*(int*)&fValue = EncryptData(Id)[0] ^ EncryptData(Id)[1];

return true;
}
return false;
}
};

class IEntitySystem {
public:
class IEntityIterator* GetEntityIterator() {
return Function <IEntityIterator* (__thiscall*)(PVOID)>(this, 21)(this);
}
};

class IEntityIterator {
public:
class IEntity* GetNext() {
return Function <IEntity* (__thiscall*)(PVOID)>(this, 6)(this);
}
};

class IEntity {
public:
__int64 GetID() {
return Function <__int64(__thiscall*)(PVOID)>(this, 1)(this);
}
Matrix34& GetWorldTM()
{
return Function<Matrix34& (__thiscall*)(PVOID)>(this, 23)(this);
}
Vec3 IEntity::GetWorldPos()
{
Matrix34 m = this->GetWorldTM();
return m.GetTranslation();
}
class IEntityProxy* GetProxy(EEntityProxyFlags epParam) {
return Function <IEntityProxy* (__thiscall*)(PVOID, EEntityProxyFlags)>(this, 59)(this, epParam);
}
class ICharacterInstance* GetCharacter(int nSlot) {
return Function<ICharacterInstance* (__thiscall*)(PVOID, int)>(this, 82)(this, nSlot);
}
void GetWorldBounds(AABB1& bbox) {
return Function<void(__thiscall*)(PVOID, AABB1&)>(this, 25)(this, bbox);
}
void SetPos(const Vec3& vPos, int nWhyFlags = 0)
{
Function<void(__thiscall*)(PVOID, const Vec3&, int)>(this, 21)(this, vPos, nWhyFlags);
}
void IEntity::SetLocPos(Vec3 vPos)
{
Matrix34 Matrix = *(Matrix34*)((DWORD64)this + 64);
Matrix.m03 = vPos.x;
Matrix.m13 = vPos.y;
Matrix.m23 = vPos.z;
*(Matrix34*)((DWORD64)this + 64) = Matrix;
}
const char* GetName()
{
return Function<const char* (__thiscall*)(PVOID)>(this, 12)(this);
}
int GetFlags()
{
return Function<int(__thiscall*)(PVOID)>(this, 6)(this);
}
Vec3 GetPos() {
return m_vPos; /*CallFunction<Vec3(__stdcall*)(PVOID)>(this, 80)(this);*/
}
Quat& GetRotation() {
return m_qRotation;
}
bool IsHidden()
{
return Function<bool(__fastcall*)(PVOID64)>(this, 47)(this);
}
void Teleporter(int Fun)
{
if (Fun > 0 && GetAsyncKeyState((UINT)66)) {
if (*(DWORD64*)((DWORD64)this + 0x0C90) = 7) {
Vec3 tppos;
switch (Fun) {
case 1: tppos = { 674.915405f, 706.425842f, 46.875000f };
break;
case 2: tppos = { 857.731995f, 1342.788696f, 75.470123f };
break;
case 3: tppos = { 1809.648926f, 424.261902f, 95.510071f };
break;
default:
tppos = { ZERO };
break;
}
this->SetLocPos(tppos);
}
}
}
char pad_0000[48]; //0x0000
class IEntityClass* m_pClass; //0x0030
class IEntityArchetype* m_pArchetype; //0x0038
Matrix34 EntityWorldTM; //0x0040
Vec3 m_vPos; //0x0070
Vec3 m_vScale; //0x007C
Quat m_qRotation; //0x0088
};

class IEntityClass {
public:
const char* GetIClassName() {
return Function<const char* (__fastcall*)(PVOID64)>(this, 2)(this);
}
};

class ICharacterInstance
{
public:
class ISkeletonPose* GetISkeletonPose()
{
return Function<ISkeletonPose* (__thiscall*)(PVOID)>(this, 5)(this);
}
};

class ISkeletonPose
{
public:
QuatT& GetAbsJointByID(int nJointID)
{
return Function<QuatT& (__thiscall*)(PVOID, int)>(this, 7)(this, nJointID);
}
short GetJointIdByName(const char* sz_joint_name)
{
return Function<short(__fastcall*)(PVOID64, const char*)>(this, 3)(this, sz_joint_name);
}
const char* GetszNameByJointId(int sz_joint_name)
{
return Function<const char* (__fastcall*)(PVOID64, int)>(this, 6)(this, sz_joint_name);
}
};

class IEntityProxy {
public:
void SetHUDSilhouettesParams(float fAlpha, float fRed, float fGreen, float fBlue) {
return Function <void(__thiscall*)(PVOID, float, float, float, float)>
(this, 44)(this, fAlpha, fRed, fGreen, fBlue);
}
void HUDSilhouettesParams(float a, float r, float g, float b)
{
INT64 FlagTable = (*(INT64(__thiscall**)(INT64))(*(DWORD64*)this + 160))((INT64)this);
this->SetHUDSilhouettesParams(a, r, g, b);
*(DWORD64*)(FlagTable + 28) = *(DWORD64*)(FlagTable + 0xA4) |= 16;
}
};

class IPhysicalWorld
{
public:
int RayWorldIntersectionParams(const Vec3& org, const Vec3& dir, int objtypes, unsigned int flags, ray_hit* hits, int nMaxHits, IPhysicalEntity** pSkipEnts = 0, int nSkipEnts = 0, void* pForeignData = 0, int iForeignData = 0, const char* pNameTag = "RayWorldIntersection(Game)", ray_hit_cached* phitLast = 0, int iCaller = 4)
{
using oRayWorldIntersection = int(__fastcall*)(PVOID, const Vec3&, const Vec3&, int, unsigned int, ray_hit*, int, IPhysicalEntity**, int, void*, int, const char*, ray_hit_cached*, int);
return Function<oRayWorldIntersection>(this, 97)(this, org, dir, objtypes, flags, hits, nMaxHits, pSkipEnts, nSkipEnts, pForeignData, iForeignData, pNameTag, phitLast, iCaller);
}
Vec3 GetMPos(Vec3 BoneID, Vec3 CamPos, FLOAT Correct)
{
Vec3 vOut = BoneID - CamPos;
FLOAT sqr = (FLOAT)sqrt(vOut.x * vOut.x + vOut.y * vOut.y + vOut.z * vOut.z);
vOut /= sqr;
vOut *= sqr - Correct;
return vOut;
}
BOOL is_Visible(Vec3 BoneID, FLOAT Correct)
{
ray_hit tmpHit;
Vec3 CamPos = SSystemGlobalEnvironment::Singleton()->GetIRenderer()->GetViewCamera();
Vec3 vOut(GetMPos(BoneID, CamPos, Correct));
return !this->RayWorldIntersectionParams(CamPos, vOut, 0x100 | 1, 0xA | 0x400, &tmpHit, 1);
}

INT is_Visible(Vec3 p_BoneID, Vec3 m_BoneID)
{
ray_hit tmpHit;
return !this->RayWorldIntersectionParams(m_BoneID, p_BoneID - m_BoneID, 779, (10 & 0x0F), &tmpHit, 1);
}
};

class IGameRules
{
public:

int GetTeam(EntityId entityId)
{
return Function<int(__thiscall*)(PVOID, EntityId)>(this, 109)(this, entityId);
}
int GetHitTypeId(const char* type)
{
return Function<int(__thiscall*)(PVOID, const char*)>(this, 40)(this, type);
}
int GetHitMaterialId(const char* materialName)
{
return Function<int(__thiscall*)(PVOID, const char*)>(this, 113)(this, materialName);
}
void RequestHit(HitInfo* pHitInfo)
{
Function<void(__thiscall*)(PVOID, HitInfo*)>(this, 156)(this, pHitInfo);
}
};
половину сделал, а дальше пизда как лень
 
Начинающий
Статус
Оффлайн
Регистрация
6 Сен 2015
Сообщения
59
Реакции[?]
4
Поинты[?]
1K
Последнее редактирование:
Забаненный
Статус
Оффлайн
Регистрация
2 Мар 2021
Сообщения
1,083
Реакции[?]
406
Поинты[?]
1K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Начинающий
Статус
Оффлайн
Регистрация
6 Сен 2015
Сообщения
59
Реакции[?]
4
Поинты[?]
1K
C++:
#pragma once
template <typename F>inline F Function(void* base, DWORD64 index) { return (*(F**)base)[index]; }
enum EEntityProxyFlags : __int64 {
    ENTITY_PROXY_RENDER = 0,
    ENTITY_PROXY_PHYSICS = 1,
    ENTITY_PROXY_SCRIPT = 2,
    ENTITY_PROXY_SOUND = 3,
    ENTITY_PROXY_AI = 4,
    ENTITY_PROXY_AREA = 5,
    ENTITY_PROXY_BOIDS = 6,
    ENTITY_PROXY_BOID_OBJECT = 7,
    ENTITY_PROXY_CAMERA = 8,
    ENTITY_PROXY_FLOW_GRAPH = 9,
    ENTITY_PROXY_SUBSTITUTION = 10,
    ENTITY_PROXY_TRIGGER = 11,
    ENTITY_PROXY_ROPE = 12,
    ENTITY_PROXY_ENTITY_NODE = 13,
    ENTITY_PROXY_USER = 14,
    ENTITY_PROXY_LAST = 15,
};

class VTable
{
public:
    void Init()
    {
        __int16 SizeTable = GetCount();
        PDWORD64 Table = new DWORD64[SizeTable + 2];
        Table[0] = (DWORD64)this;
        Table[1] = (DWORD64)&vTable[0];
        memcpy(&Table[2], (void*)vTable, sizeof(DWORD64) * SizeTable);
        vTable = (PDWORD64)&Table[2];
    }
template <typename T>
__inline T GetOrigFunction(int Index)
{
    return (T)((PDWORD64)vTable[-1])[Index];
}
template <typename T>
    __inline T Hooking(int Index, T nFunction)
{
    T orig = (T)vTable[Index];
    vTable[Index] = (DWORD64)nFunction;
    return orig;
}
private:
__inline __int16 GetCount()
{
    __int16 Size = 0;
    while (vTable[Size] != 0) ++Size;
    return Size;
}
private:
    PDWORD64 vTable;
};

class SSystemGlobalEnvironment {
public:
    class IGame* GetGame() {return *(IGame**)((__int64)this + 200);}
    class IEntitySystem* GetIEntitySystem()  { return *(IEntitySystem**)((__int64)this + 216);}
    class IRenderer* GetIRenderer() {return (IRenderer*)*(DWORD64*)((DWORD64)this + 72);}
    class IPhysicalWorld* GetPhysicalWorld() {return *(IPhysicalWorld**)((DWORD64)this + 112);}
    class ISystem* GetSystem() { //GetUserName //dwRenderIndex = 4return *(ISystem**)((__int64)this + 0xE8);}
    static SSystemGlobalEnvironment* Singleton() {return *(SSystemGlobalEnvironment**)0x14222A000; // string -> ai_CompatibilityMode}
};

class ISystem
{
public:
    class VTable* GetVTable() { return (VTable*)this; }
};

class IRenderer
{
public:
    class VTable* GetVTable() { return (VTable*)this; }
    IDirect3DDevice9* Get3DDevice() { return (IDirect3DDevice9*)*(DWORD64*)((DWORD64)this + 0xA6D0); }
    float GetWidth() { return (float)Function<int(__fastcall*)(PVOID)>(this, 90)(this); }
    float GetHeight() { return (float)Function<int(__fastcall*)(PVOID)>(this, 91)(this); }
    bool ProjectToScreen(vec_to_screen* p_vec_to_screen) { return Function<bool(__fastcall*)(PVOID, vec_to_screen*)>(this, 100)(this, p_vec_to_screen); }
    ILINE bool WorldToScreen(Vec3 World, Vec3& Screen)
    {
    vec_to_screen pVecToScreen;
    pVecToScreen.to_x = World.x;
    pVecToScreen.to_y = World.y;
    pVecToScreen.to_z = World.z;
    pVecToScreen.out_x = &Screen.x;
    pVecToScreen.out_y = &Screen.y;
    pVecToScreen.out_z = &Screen.z;
    ProjectToScreen(&pVecToScreen);
    if (Screen.z < 0.0f || Screen.z > 1.0f)
        return FALSE;
    Screen.x *= (GetWidth() / 100.0f);
    Screen.y *= (GetHeight() / 100.0f);
    return TRUE;
    }
    FLOAT GetHypotenuseFromCenter(Vec3 Point) {
    Vec3 Screen;
    FLOAT ScreenCenterX = (GetWidth() / 2.0f);
    FLOAT ScreenCenterY = (GetHeight() / 2.0f);
    if (WorldToScreen(Point, Screen) == FALSE)return 9999.0f;
        FLOAT PositionX = Screen.x > ScreenCenterX ? Screen.x - ScreenCenterX : ScreenCenterX - Screen.x;
        FLOAT PositionY = Screen.y > ScreenCenterY ? Screen.y - ScreenCenterY : ScreenCenterY - Screen.y;
            return (FLOAT)sqrt(PositionX * PositionX + PositionY * PositionY);
    }
    Vec3 GetViewCamera()
    {
    return *(Vec3*)((DWORD64)this + 0x1700);
    }
};


class IGame {
public:
    class IGameFramework* GetGameFramework() {return Function<IGameFramework* (__thiscall*)(PVOID)>(this, 14)(this);}
class SCVars* IGame::i_SCVars()
{
return (SCVars*)*(DWORD64*)((DWORD64)this + 304);
}
};

class SCVars {
public:
VOID SCVars::i_unlimitedammo(INT Value)
{
*(INT*)((DWORD64)this + 304) = Value; //+
}
};

class IGameFramework {
public:
class IActorSystem* GetIActorSystem() {
return Function <IActorSystem* (__thiscall*)(PVOID)>(this, 25)(this);
}

bool GetClientActor(class IActor** bValue) {
return Function <bool(__thiscall*)(PVOID, IActor**)>(this, 142)(this, bValue);
}
class IGameRules* GetGameRules()
{
return Function<IGameRules* (__thiscall*)(PVOID)>(this, 137)(this);
}
};

class IActorSystem {
public:
class IActor* GetActor(int iValue) {
return Function <IActor* (__thiscall*)(PVOID, int)>(this, 15)(this, iValue);
}
};

class IActor {
public:
int GetTeamId() {
return *(int*)((__int64)this + 992);
}
int GetHealth()
{
return Function<int(__thiscall*)(PVOID)>(this, 27)(this); //+
}
class IEntity* IActor::GetEntity()
{
return (IEntity*)*(DWORD64*)((DWORD64)this + 16);
}

bool IsDead()
{
return GetHealth() <= 0;
}
class IItem* GetCurrentItem(bool IncludeVehicle = false)
{
return Function<IItem* (__thiscall*)(void*, bool)>(this, 57)(this, IncludeVehicle);
}
void SetViewRotation(Quat& rotation) {
typedef void(__thiscall* pFunc)(PVOID, Quat&);
return Function<pFunc>(this, 51)(this, rotation);
}
int GetWeaponType() {
return *(int*)((__int64)this + (0xECC + 0x8));
}
};

class IItem
{
public:
class IWeapon* GetWeapon()
{
return Function<IWeapon* (__thiscall*)(void*)>(this, 79)(this);
}
};

class IWeapon
{
public:
void StartFire()
{
return Function<void(__thiscall*)(void*)>(this, 11)(this);
}

void StopFire()
{
return Function<void(__thiscall*)(void*)>(this, 12)(this);
}
class IWeaponPTR* GetWeaponPTR() { //needIcon
return *(IWeaponPTR**)((__int64)this + 0x8);
}
void SetFiringPos(Vec3 Position)
{
*(Vec3*)((uint64_t) * (uint64_t*)((uint64_t)this + 0x18) + 0x1C) = Position;
}
};

class IWeaponPTR {
public:
class IWeaponCrypt* GetWeaponCrypt() { //needIcon
return *(IWeaponCrypt**)((__int64)this + 0x60);
}
void IWeaponPTR::RequestShoot(DWORD64 dwPellets)
{
((DWORD64(__thiscall*)(IWeaponPTR*, DWORD64*))0x141248D20)(this, &dwPellets);
}
void StartFireTest() {
RequestShoot(0);
}
};

class IWeaponCrypt {
char pad_0x0000[0x68]; //needIcon
TWeaponMap m_statMap;
private:
inline int* EncryptData(int Id) {
if (m_statMap.find(Id) != m_statMap.end()) {
return m_statMap.find(Id)->second;
}
return false;
}

public:
inline bool Encrypt(int Id, float fValue) {
if (EncryptData(Id) != NULL) {
EncryptData(Id)[0] = *(int*)&fValue ^ EncryptData(Id)[1];

return true;
}
return false;
}

inline bool Decrypt(int Id, float* fValue) {
if (EncryptData(Id) != NULL) {
*(int*)&fValue = EncryptData(Id)[0] ^ EncryptData(Id)[1];

return true;
}
return false;
}
};

class IEntitySystem {
public:
class IEntityIterator* GetEntityIterator() {
return Function <IEntityIterator* (__thiscall*)(PVOID)>(this, 21)(this);
}
};

class IEntityIterator {
public:
class IEntity* GetNext() {
return Function <IEntity* (__thiscall*)(PVOID)>(this, 6)(this);
}
};

class IEntity {
public:
__int64 GetID() {
return Function <__int64(__thiscall*)(PVOID)>(this, 1)(this);
}
Matrix34& GetWorldTM()
{
return Function<Matrix34& (__thiscall*)(PVOID)>(this, 23)(this);
}
Vec3 IEntity::GetWorldPos()
{
Matrix34 m = this->GetWorldTM();
return m.GetTranslation();
}
class IEntityProxy* GetProxy(EEntityProxyFlags epParam) {
return Function <IEntityProxy* (__thiscall*)(PVOID, EEntityProxyFlags)>(this, 59)(this, epParam);
}
class ICharacterInstance* GetCharacter(int nSlot) {
return Function<ICharacterInstance* (__thiscall*)(PVOID, int)>(this, 82)(this, nSlot);
}
void GetWorldBounds(AABB1& bbox) {
return Function<void(__thiscall*)(PVOID, AABB1&)>(this, 25)(this, bbox);
}
void SetPos(const Vec3& vPos, int nWhyFlags = 0)
{
Function<void(__thiscall*)(PVOID, const Vec3&, int)>(this, 21)(this, vPos, nWhyFlags);
}
void IEntity::SetLocPos(Vec3 vPos)
{
Matrix34 Matrix = *(Matrix34*)((DWORD64)this + 64);
Matrix.m03 = vPos.x;
Matrix.m13 = vPos.y;
Matrix.m23 = vPos.z;
*(Matrix34*)((DWORD64)this + 64) = Matrix;
}
const char* GetName()
{
return Function<const char* (__thiscall*)(PVOID)>(this, 12)(this);
}
int GetFlags()
{
return Function<int(__thiscall*)(PVOID)>(this, 6)(this);
}
Vec3 GetPos() {
return m_vPos; /*CallFunction<Vec3(__stdcall*)(PVOID)>(this, 80)(this);*/
}
Quat& GetRotation() {
return m_qRotation;
}
bool IsHidden()
{
return Function<bool(__fastcall*)(PVOID64)>(this, 47)(this);
}
void Teleporter(int Fun)
{
if (Fun > 0 && GetAsyncKeyState((UINT)66)) {
if (*(DWORD64*)((DWORD64)this + 0x0C90) = 7) {
Vec3 tppos;
switch (Fun) {
case 1: tppos = { 674.915405f, 706.425842f, 46.875000f };
break;
case 2: tppos = { 857.731995f, 1342.788696f, 75.470123f };
break;
case 3: tppos = { 1809.648926f, 424.261902f, 95.510071f };
break;
default:
tppos = { ZERO };
break;
}
this->SetLocPos(tppos);
}
}
}
char pad_0000[48]; //0x0000
class IEntityClass* m_pClass; //0x0030
class IEntityArchetype* m_pArchetype; //0x0038
Matrix34 EntityWorldTM; //0x0040
Vec3 m_vPos; //0x0070
Vec3 m_vScale; //0x007C
Quat m_qRotation; //0x0088
};

class IEntityClass {
public:
const char* GetIClassName() {
return Function<const char* (__fastcall*)(PVOID64)>(this, 2)(this);
}
};

class ICharacterInstance
{
public:
class ISkeletonPose* GetISkeletonPose()
{
return Function<ISkeletonPose* (__thiscall*)(PVOID)>(this, 5)(this);
}
};

class ISkeletonPose
{
public:
QuatT& GetAbsJointByID(int nJointID)
{
return Function<QuatT& (__thiscall*)(PVOID, int)>(this, 7)(this, nJointID);
}
short GetJointIdByName(const char* sz_joint_name)
{
return Function<short(__fastcall*)(PVOID64, const char*)>(this, 3)(this, sz_joint_name);
}
const char* GetszNameByJointId(int sz_joint_name)
{
return Function<const char* (__fastcall*)(PVOID64, int)>(this, 6)(this, sz_joint_name);
}
};

class IEntityProxy {
public:
void SetHUDSilhouettesParams(float fAlpha, float fRed, float fGreen, float fBlue) {
return Function <void(__thiscall*)(PVOID, float, float, float, float)>
(this, 44)(this, fAlpha, fRed, fGreen, fBlue);
}
void HUDSilhouettesParams(float a, float r, float g, float b)
{
INT64 FlagTable = (*(INT64(__thiscall**)(INT64))(*(DWORD64*)this + 160))((INT64)this);
this->SetHUDSilhouettesParams(a, r, g, b);
*(DWORD64*)(FlagTable + 28) = *(DWORD64*)(FlagTable + 0xA4) |= 16;
}
};

class IPhysicalWorld
{
public:
int RayWorldIntersectionParams(const Vec3& org, const Vec3& dir, int objtypes, unsigned int flags, ray_hit* hits, int nMaxHits, IPhysicalEntity** pSkipEnts = 0, int nSkipEnts = 0, void* pForeignData = 0, int iForeignData = 0, const char* pNameTag = "RayWorldIntersection(Game)", ray_hit_cached* phitLast = 0, int iCaller = 4)
{
using oRayWorldIntersection = int(__fastcall*)(PVOID, const Vec3&, const Vec3&, int, unsigned int, ray_hit*, int, IPhysicalEntity**, int, void*, int, const char*, ray_hit_cached*, int);
return Function<oRayWorldIntersection>(this, 97)(this, org, dir, objtypes, flags, hits, nMaxHits, pSkipEnts, nSkipEnts, pForeignData, iForeignData, pNameTag, phitLast, iCaller);
}
Vec3 GetMPos(Vec3 BoneID, Vec3 CamPos, FLOAT Correct)
{
Vec3 vOut = BoneID - CamPos;
FLOAT sqr = (FLOAT)sqrt(vOut.x * vOut.x + vOut.y * vOut.y + vOut.z * vOut.z);
vOut /= sqr;
vOut *= sqr - Correct;
return vOut;
}
BOOL is_Visible(Vec3 BoneID, FLOAT Correct)
{
ray_hit tmpHit;
Vec3 CamPos = SSystemGlobalEnvironment::Singleton()->GetIRenderer()->GetViewCamera();
Vec3 vOut(GetMPos(BoneID, CamPos, Correct));
return !this->RayWorldIntersectionParams(CamPos, vOut, 0x100 | 1, 0xA | 0x400, &tmpHit, 1);
}

INT is_Visible(Vec3 p_BoneID, Vec3 m_BoneID)
{
ray_hit tmpHit;
return !this->RayWorldIntersectionParams(m_BoneID, p_BoneID - m_BoneID, 779, (10 & 0x0F), &tmpHit, 1);
}
};

class IGameRules
{
public:

int GetTeam(EntityId entityId)
{
return Function<int(__thiscall*)(PVOID, EntityId)>(this, 109)(this, entityId);
}
int GetHitTypeId(const char* type)
{
return Function<int(__thiscall*)(PVOID, const char*)>(this, 40)(this, type);
}
int GetHitMaterialId(const char* materialName)
{
return Function<int(__thiscall*)(PVOID, const char*)>(this, 113)(this, materialName);
}
void RequestHit(HitInfo* pHitInfo)
{
Function<void(__thiscall*)(PVOID, HitInfo*)>(this, 156)(this, pHitInfo);
}
};
половину сделал, а дальше пизда как лень
а лутше еще и обновить что бы как шпаргалка была, что бы я пытался найти а потом сверять с офсетами твоими,
какой нахуй аиды, аидой ты нагрузку на ЦП своё проверяешь
IDA Pro (64-bit),успакоился?
А можешь пути для IDA напротив офсетов сделать и скинуть пж?
 
Сверху Снизу