-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMains.cpp
More file actions
145 lines (120 loc) · 3.11 KB
/
Mains.cpp
File metadata and controls
145 lines (120 loc) · 3.11 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#include "GUI.h"
#include "SDK.h"
namespace Mains
{
void Player()
{
//Simple Godmode
if (Config::Player::godmodenumber == 1)
{
SDK::PLAYER::Godmode(true);
}
else
{
SDK::PLAYER::Godmode(false);
}
if (Config::Player::godmodenumber == 2)
SDK::PLAYER::Set_Health(200.0f);
if (Config::Player::invisiblenumber == 1)
{
SDK::PLAYER::Invisible(true);
}
else
{
SDK::PLAYER::Invisible(false);
}
if (Config::Player::ragdollnumber == 1)
{
//SDK::PLAYER::NoRagdoll(true);
}
else
{
//SDK::PLAYER::NoRagdoll(false);
}
if (Config::Player::healkey != 0) {
if (GetAsyncKeyState(Config::Player::healkey)) {
SDK::PLAYER::Set_Health(200.0f);
}
}
if (Config::Player::tptoway != 0) {
if (GetAsyncKeyState(Config::Player::tptoway)) {
SDK::PLAYER::Set_Position(SDK::WORLD::Waypoint_Position());
}
}
if (Config::Player::armorkey != 0) {
if (GetAsyncKeyState(Config::Player::armorkey)) {
SDK::PLAYER::Set_Armor(200.0f);
}
}
if (Config::Player::repairkey != 0) {
if (GetAsyncKeyState(Config::Player::repairkey)) {
SDK::VEHICLE::Set_Health(1000.0f, 1000.0f, 65.0f);
}
}
if (Config::Player::invisible) {
SDK::PLAYER::Invisible(true);
}
else
{
SDK::PLAYER::Invisible(false);
}
}
void Weapon()
{
//NoRecoil
if (Config::Weapon::norecoilnumber == 0)
SDK::WEAPON::NoRecoil(false);
if (Config::Weapon::norecoilnumber == 1)
SDK::WEAPON::NoRecoil(true);
//NoSpread
if(Config::Weapon::nospreadnumber == 0)
SDK::WEAPON::NoSpread(false);
if (Config::Weapon::nospreadnumber == 1)
SDK::WEAPON::NoSpread(true);
}
void Vehicle()
{
//SDK::VEHICLE::Godmode(Config::Vehicle::godmode);
//Speedhack
if (Config::Vehicle::speedmultiplier > 0)
{
SDK::VEHICLE::Set_Acceleration(1.0f * Config::Vehicle::speedmultiplier);
SDK::VEHICLE::Set_Gravity((9.7f * Config::Vehicle::speedmultiplier) / 2);
}
else
{
SDK::VEHICLE::Set_Acceleration(1.0f);
SDK::VEHICLE::Set_Gravity(9.7f);
}
if (Config::Vehicle::autorepair == 1)
{
SDK::VEHICLE::Set_Health(1000.0f, 1000.0f, 65.0f);
}
}
void Menu()
{
/* int ScreenWidth, ScreenHeight;
engine->GetScreenSize(ScreenWidth, ScreenHeight);
int x = (int)(ScreenWidth * 0.5f);
int y = (int)(ScreenHeight * 0.5f);
int dx = ScreenWidth / OverrideView::currentFOV;
int dy = ScreenHeight / OverrideView::currentFOV;
int crosshairX = (int)(x - (dx * punchAngle.y));
int crosshairY = (int)(y + (dy * punchAngle.x));
// outline horizontal
Draw::FilledRectangle(Vector2D(crosshairX - 4, crosshairY - 1), Vector2D(crosshairX + 5, crosshairY + 2), Color(0, 0, 0, 170));
// outline vertical
Draw::FilledRectangle(Vector2D(crosshairX - 1, crosshairY - 4), Vector2D(crosshairX + 2, crosshairY + 5), Color(0, 0, 0, 170));
// line horizontal
Draw::Line(Vector2D(crosshairX - 3, crosshairY), Vector2D(crosshairX + 4, crosshairY), Color(255, 255, 255, 255));
// line vertical
Draw::Line(Vector2D(crosshairX, crosshairY + 3), Vector2D(crosshairX, crosshairY - 4), Color(255, 255, 255, 255));*/
}
void Tick()
{
Player();
Weapon();
Vehicle();
Menu();
}
}