This repository has been archived on 2024-06-13. You can view files and clone it, but cannot push or open issues or pull requests.
nekohook/modules/insurgency/sdk/IEngineClient.h
2020-08-04 13:13:01 -04:00

89 lines
2.6 KiB
C++

#pragma once
class IEngineClient {
public:
typedef struct player_info_s {
union {
int64_t xuid;
struct {
int xuidlow;
int xuidhigh;
};
};
char name[32];
int userid;
char guid[33];
unsigned int friendsid;
char friendsname[32];
bool fakeplayer;
bool ishltv;
unsigned int customfiles[4];
unsigned char filesdownloaded;
} player_info_t;
void GetScreenSize(int& width, int& height) {
typedef void (*oGetScreenSize)(void*, int&, int&);
return getvfunc<oGetScreenSize>(this, 5)(this, width, height);
}
bool GetPlayerInfo(int iIndex, player_info_t* pInfo) {
typedef bool (*oGetPlayerInfo)(void*, int, player_info_t*);
return getvfunc<oGetPlayerInfo>(this, 8)(this, iIndex, pInfo);
}
int GetPlayerForUserID(int UserID) {
typedef int (*oGetPlayerForUserID)(void*, int);
return getvfunc<oGetPlayerForUserID>(this, 9)(this, UserID);
}
int GetLocalPlayer() {
typedef int (*oGetLocalPlayer)(void*);
return getvfunc<oGetLocalPlayer>(this, 12)(this);
}
void GetViewAngles(QAngle& angle) {
typedef void (*oGetViewAngles)(void*, QAngle&);
return getvfunc<oGetViewAngles>(this, 18)(this, angle);
}
void SetViewAngles(QAngle& angle) {
typedef void (*oSetViewAngles)(void*, QAngle&);
return getvfunc<oSetViewAngles>(this, 19)(this, angle);
}
void GetFreeaimAngles(QAngle& angle) {
typedef void (*oGetViewAngles)(void*, QAngle&);
return getvfunc<oGetViewAngles>(this, 20)(this, angle);
}
void SetFreeaimAngles(QAngle& angle) {
typedef void (*oSetViewAngles)(void*, QAngle&);
return getvfunc<oSetViewAngles>(this, 21)(this, angle);
}
int GetMaxClients() {
typedef int (*oGetMaxClients)(void*);
return getvfunc<oGetMaxClients>(this, 22)(this);
}
bool IsInGame() {
typedef bool (*oIsInGame)(void*);
return getvfunc<oIsInGame>(this, 28)(this);
}
bool IsTakingScreenshot() {
typedef bool (*oIsTakingScreenshot)(void*);
return getvfunc<oIsTakingScreenshot>(this, 91)(this);
}
void ExecuteClientCmd(const char* szCmdString) {
typedef void (*oExecuteClientCmd)(void*, const char*);
return getvfunc<oExecuteClientCmd>(this, 107)(this, szCmdString);
}
void ClientCmd_Unrestricted(const char* szCmdString) {
typedef void (*oClientCmd_Unrestricted)(void*, const char*);
return getvfunc<oClientCmd_Unrestricted>(this, 112)(this, szCmdString);
}
};