This repository was archived by the owner on Mar 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIEngineClient.h
executable file
·84 lines (71 loc) · 2.29 KB
/
IEngineClient.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#include "VMatrix.h"
class IEngineClient {
public:
typedef struct player_info_s
{
int64_t __pad0;
union {
int64_t xuid;
struct {
int xuidlow;
int xuidhigh;
};
};
char name[128];
int userid;
char guid[33];
unsigned int friendsid;
char friendsname[128];
bool fakeplayer;
bool ishltv;
unsigned int customfiles[4];
unsigned char filesdownloaded;
}player_info_t;
bool GetPlayerInfo(int iIndex, player_info_t *pInfo) {
typedef bool (* oGetPlayerInfo)(void*, int, player_info_t*);
return getvfunc<oGetPlayerInfo>(this, 8)(this, iIndex, pInfo);
}
VMatrix& GetWorldToScreenMatrix() {
typedef VMatrix& (* Fn)(void*);
return getvfunc<Fn>(this, 38)(this);
}
void GetScreenSize( int& width, int& height ){
typedef void (* Fn)(void*, int&, int&);
getvfunc<Fn>(this, 5)(this, width, height);
}
bool IsInGame() {
typedef bool (* oIsInGame)(void*);
return getvfunc<oIsInGame>(this, 26)(this);
}
bool IsConnected() {
typedef bool (* oIsConnected)(void*);
return getvfunc<oIsConnected>(this, 27)(this);
}
int GetLocalPlayer() {
typedef int (* oGetLocalPlayer)(void*);
return getvfunc<oGetLocalPlayer>(this, 12)(this);
}
void GetViewAngles(Vector& vAngle) {
typedef void(* oGetViewAngles)(void*, Vector&);
return getvfunc<oGetViewAngles>(this, 18)(this, vAngle);
}
void SetViewAngles(Vector& vAngle) {
typedef void(* oSetViewAngles)(void*, Vector&);
return getvfunc<oSetViewAngles>(this, 19)(this, vAngle);
}
bool IsHLTV() {
typedef bool(*oIsHLTV)(void*);
return getvfunc<oIsHLTV>(this, 93)(this);
}
bool IsTakingScreenShot() {
typedef bool(*oIsTakingScreenShot)(void*);
return getvfunc<oIsTakingScreenShot>(this, 92)(this);
}
void ClientCmd_Unrestricted(const char* szCommand) {
typedef void(*oClientCmd)(void*);
return getvfunc<oClientCmd>(this, 7)(this);
}
int GetPlayerForUserID(int userid) {
return getvfunc<int(*)(void*, int)>(this, 9)(this, userid);
}
};