-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig.cpp
84 lines (72 loc) · 2.82 KB
/
config.cpp
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 "config.h"
#include "file.h"
#include <stdio.h>
#include <string>
#include <windows.h>
Settings* settings = new Settings();
void Settings::Setup()
{
if( CofigExists() )
{
LoadConfig();
}
else
{
SaveConfig();
}
}
void Settings::SaveConfig()
{
files->OnSetup();
files->WriteBool( "Aimbot", "enabled", aimbot.enabled );
files->WriteInt( "Aimbot", "type", aimbot.type );
files->WriteInt( "Aimbot", "key", aimbot.key );
files->WriteFloat( "Aimbot", "fov", aimbot.fov );
files->WriteFloat( "Aimbot", "smoothing", aimbot.smooth );
files->WriteFloat( "Aimbot", "rcs_x", aimbot.rcs_x );
files->WriteFloat( "Aimbot", "rcs_y", aimbot.rcs_y );
files->WriteFloat( "Aimbot", "sens", aimbot.sens );
files->WriteBool( "Triggerbot", "enabled", triggerbot.enabled );
files->WriteInt( "Triggerbot", "key", triggerbot.key );
files->WriteBool( "Visuals", "enabled", visuals.enabled );
files->WriteBool( "Visuals", "recoil_crosshair", visuals.recoil_crosshair);
files->WriteBool( "Misc", "bhop", misc.bhop );
files->WriteBool( "Misc", "radar", misc.radar );
files->WriteBool( "Misc", "custom_flash_enable", misc.custom_flash );
files->WriteFloat( "Misc", "custom_flash_amount", misc.custom_flash_amount );
files->WriteBool( "Misc", "custom_fov_enable", misc.custom_fov );
files->WriteInt( "Misc", "custom_fov_amount", misc.custom_fov_amount );
files->WriteBool( "Misc", "fast_esp", misc.multi_threads );
Beep( 195, 200 );
}
void Settings::LoadConfig()
{
if( CofigExists() )
{
files->OnSetup();
aimbot.enabled = files->ReadBool( "Aimbot", "enabled" );
aimbot.type = files->ReadInt( "Aimbot", "type" );
aimbot.key = files->ReadInt( "Aimbot", "key" );
aimbot.fov = files->ReadFloat( "Aimbot", "fov" );
aimbot.smooth = files->ReadFloat( "Aimbot", "smoothing" );
aimbot.rcs_x = files->ReadFloat( "Aimbot", "rcs_x" );
aimbot.rcs_y = files->ReadFloat( "Aimbot", "rcs_y" );
aimbot.sens = files->ReadFloat( "Aimbot", "sens" );
triggerbot.enabled = files->ReadBool( "Triggerbot", "enabled" );
triggerbot.key = files->ReadInt( "Triggerbot", "key" );
visuals.enabled = files->ReadBool( "Visuals", "enabled" );
visuals.recoil_crosshair = files->ReadBool( "Visuals", "recoil_crosshair" );
misc.bhop = files->ReadBool( "Misc", "bhop" );
misc.radar = files->ReadBool( "Misc", "radar" );
misc.custom_flash = files->ReadBool( "Misc", "custom_flash_enable" );
misc.custom_flash_amount = files->ReadFloat( "Misc", "custom_flash_amount" );
misc.custom_fov = files->ReadBool( "Misc", "custom_fov_enable" );
misc.custom_fov_amount = files->ReadInt( "Misc", "custom_fov_amount" );
misc.multi_threads = files->ReadBool( "Misc", "fast_esp" );
}
}
bool Settings::CofigExists()
{
struct stat buffer;
return ( stat( "settings.cfg", &buffer ) == 0 );
}