Code:
//------------------------ Make the hack working ------------------------//
//-- Premium --//
if(CH_Premium == 1)
{
DWORD dwServerBase = *(DWORD*)Address_Server_Base;
if(dwServerBase != 0)
{
*(int*)(dwServerBase + Address_Premium_Offset) = 0;
}
}
if(CH_Premium == 2)
{
DWORD dwServerBase = *(DWORD*)Address_Server_Base;
if(dwServerBase != 0)
{
*(int*)(dwServerBase + Address_Premium_Offset) = 1;
}
}
if(CH_Premium == 3)
{
DWORD dwServerBase = *(DWORD*)Address_Server_Base;
if(dwServerBase != 0)
{
*(int*)(dwServerBase + Address_Premium_Offset) = 2;
}
}
if(CH_Premium == 4)
{
DWORD dwServerBase = *(DWORD*)Address_Server_Base;
if(dwServerBase != 0)
{
*(int*)(dwServerBase + Address_Premium_Offset) = 3;
}
}
//-- Stamina --//
if(CH_Stamina)
{
DWORD dwPlayerPtr = *(DWORD*)Address_Player_Base;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr + Address_Stamina_Offset) = 100;
}
}
//-- No Spread --//
if(CH_No_Spread)
{
long value = 0;
DWORD Protection;
VirtualProtect((void*)Address_No_Spread, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_No_Spread, &value , sizeof(value));
VirtualProtect((void*)Address_No_Spread, sizeof(value), Protection, 0);
}
//-- No Recoil --//
if(CH_No_Recoil)
{
DWORD dwPlayerPtr = *(DWORD*)Address_Player_Base;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr + Address_No_Recoil_Offset_1) = 0;
*(float*)(dwPlayerPtr + Address_No_Recoil_Offset_2) = 0;
*(float*)(dwPlayerPtr + Address_No_Recoil_Offset_3) = 0;
}
}
//-- Super Jump --//
if(CH_Super_Jump == 2)
{
CH_NFD_Player = true;
if((GetAsyncKeyState(VK_LCONTROL)) && (GetAsyncKeyState(VK_SPACE)))
{
DWORD dwPlayerPtr = *(DWORD*)Address_Player_Base;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr + Address_Super_Jump_Offset) = 500;
}
}
}
if(CH_Super_Jump == 3)
{
CH_NFD_Player = true;
if((GetAsyncKeyState(VK_LCONTROL)) && (GetAsyncKeyState(VK_SPACE)))
{
DWORD dwPlayerPtr = *(DWORD*)Address_Player_Base;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr + Address_Super_Jump_Offset) = 1000;
}
}
}
if(CH_Super_Jump == 4)
{
CH_NFD_Player = true;
if((GetAsyncKeyState(VK_LCONTROL)) && (GetAsyncKeyState(VK_SPACE)))
{
DWORD dwPlayerPtr = *(DWORD*)Address_Player_Base;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr + Address_Super_Jump_Offset) = 1500;
}
}
}
if(CH_Super_Jump == 5)
{
CH_NFD_Player = true;
if((GetAsyncKeyState(VK_LCONTROL)) && (GetAsyncKeyState(VK_SPACE)))
{
DWORD dwPlayerPtr = *(DWORD*)Address_Player_Base;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr + Address_Super_Jump_Offset) = 2000;
}
}
}
if(CH_Super_Jump == 6)
{
CH_NFD_Player = true;
if((GetAsyncKeyState(VK_LCONTROL)) && (GetAsyncKeyState(VK_SPACE)))
{
DWORD dwPlayerPtr = *(DWORD*)Address_Player_Base;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr + Address_Super_Jump_Offset) = 2500;
}
}
}
if(CH_Super_Jump == 7)
{
CH_NFD_Player = true;
if((GetAsyncKeyState(VK_LCONTROL)) && (GetAsyncKeyState(VK_SPACE)))
{
DWORD dwPlayerPtr = *(DWORD*)Address_Player_Base;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr + Address_Gravity_Offset) = 500;
}
}
}
//-- No Fall Damage --//
if(CH_NFD_Player)
{
DWORD dwPlayerPtr = *(DWORD*)Address_Player_Base;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr + Address_No_Fall_Damage_Offset) = -2500;
}
}
/ //-- Scope --//
if(CH_Scope)
{
if(GetAsyncKeyState(VK_RBUTTON))
{
long value = 1;
DWORD Protection;
VirtualProtect((void*)Address_Scope, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Scope, &value , sizeof(value));
VirtualProtect((void*)Address_Scope, sizeof(value), Protection, 0);
}
else
{
long value = 0;
DWORD Protection;
VirtualProtect((void*)Address_Scope, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Scope, &value , sizeof(value));
VirtualProtect((void*)Address_Scope, sizeof(value), Protection, 0);
}
}
//-- 5º Slot --//
if(CH_Slot)
{
long value = 4;
DWORD Protection;
VirtualProtect((void*)Address_Slot, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Slot, &value , sizeof(value));
VirtualProtect((void*)Address_Slot, sizeof(value), Protection, 0);
}
//-- No Water --//
if(CH_No_Water)
{
long value = 0;
DWORD Protection;
VirtualProtect((void*)Address_No_Water, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_No_Water, &value , sizeof(value));
VirtualProtect((void*)Address_No_Water, sizeof(value), Protection, 0);
}
//-- No Bounds --//
if(CH_No_Bounds)
{
long value = 0;
DWORD Protection;
VirtualProtect((void*)Address_No_Bounds_1, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_No_Bounds_1, &value , sizeof(value));
VirtualProtect((void*)Address_No_Bounds_1, sizeof(value), Protection, 0);
VirtualProtect((void*)Address_No_Bounds_2, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_No_Bounds_2, &value , sizeof(value));
VirtualProtect((void*)Address_No_Bounds_2, sizeof(value), Protection, 0);
}
//-- Fast Ammo --//
if(CH_Fast_Ammo)
{
long value = 1092779973;
DWORD Protection;
VirtualProtect((void*)Address_Fast_Ammo, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Fast_Ammo, &value , sizeof(value));
VirtualProtect((void*)Address_Fast_Ammo, sizeof(value), Protection, 0);
}
//-- Fast Health --//
if(CH_Fast_Health)
{
long value = 1092779973;
DWORD Protection;
VirtualProtect((void*)Address_Fast_Health, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Fast_Health, &value , sizeof(value));
VirtualProtect((void*)Address_Fast_Health, sizeof(value), Protection, 0);
}
//-- Fast Repair --//
if(CH_Fast_Repair)
{
long value = 1092779973;
DWORD Protection;
VirtualProtect((void*)Address_Fast_Repair, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Fast_Repair, &value , sizeof(value));
VirtualProtect((void*)Address_Fast_Repair, sizeof(value), Protection, 0);
}
//-- Fast Flag --//
if(CH_Fast_Flag)
{
long value = 1092779973;
DWORD Protection;
VirtualProtect((void*)Address_Fast_Flag, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Fast_Flag, &value , sizeof(value));
VirtualProtect((void*)Address_Fast_Flag, sizeof(value), Protection, 0);
}
//-- No Spawn --//
if(CH_No_Spawn)
{
long value = 0;
DWORD Protection;
VirtualProtect((void*)Address_No_Spawn_1, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_No_Spawn_1, &value , sizeof(value));
VirtualProtect((void*)Address_No_Spawn_1, sizeof(value), Protection, 0);
VirtualProtect((void*)Address_No_Spawn_2, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_No_Spawn_2, &value , sizeof(value));
VirtualProtect((void*)Address_No_Spawn_2, sizeof(value), Protection, 0);
VirtualProtect((void*)Address_No_Spawn_3, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_No_Spawn_3, &value , sizeof(value));
VirtualProtect((void*)Address_No_Spawn_3, sizeof(value), Protection, 0);
}
//-- Speed Hack --//
if(CH_Speed_Hack == 1)
{
{
float value = 100;
DWORD Protection;
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Speed_Hack, &value , sizeof(value));
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), Protection, 0);
}
}
if(CH_Speed_Hack == 2)
{
if(GetAsyncKeyState(VK_LCONTROL))
{
float value = 200;
DWORD Protection;
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Speed_Hack, &value , sizeof(value));
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), Protection, 0);
}
else
{
float value = 100;
DWORD Protection;
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Speed_Hack, &value , sizeof(value));
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), Protection, 0);
}
}
if(CH_Speed_Hack == 3)
{
if(GetAsyncKeyState(VK_LCONTROL))
{
float value = 300;
DWORD Protection;
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Speed_Hack, &value , sizeof(value));
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), Protection, 0);
}
else
{
float value = 100;
DWORD Protection;
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Speed_Hack, &value , sizeof(value));
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), Protection, 0);
}
}
if(CH_Speed_Hack == 4)
{
if(GetAsyncKeyState(VK_LCONTROL))
{
float value = 400;
DWORD Protection;
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Speed_Hack, &value , sizeof(value));
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), Protection, 0);
}
else
{
float value = 100;
DWORD Protection;
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Speed_Hack, &value , sizeof(value));
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), Protection, 0);
}
}
if(CH_Speed_Hack == 5)
{
if(GetAsyncKeyState(VK_LCONTROL))
{
float value = 500;
DWORD Protection;
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Speed_Hack, &value , sizeof(value));
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), Protection, 0);
}
else
{
float value = 100;
DWORD Protection;
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Speed_Hack, &value , sizeof(value));
VirtualProtect((void*)Address_Speed_Hack, sizeof(value), Protection, 0);
}
}
//-- Glass Walls Memory --//
if(CH_Glass_Walls_Memory)
{
if((GetAsyncKeyState(VK_MBUTTON)) || (GetAsyncKeyState(VK_MENU)))
{
long value = 0;
DWORD Protection;
VirtualProtect((void*)Address_Far_Fog__Glass_Walls, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Far_Fog__Glass_Walls, &value , sizeof(value));
VirtualProtect((void*)Address_Far_Fog__Glass_Walls, sizeof(value), Protection, 0);
}
else
{
long value = 1181376512;
DWORD Protection;
VirtualProtect((void*)Address_Far_Fog__Glass_Walls, sizeof(value), PAGE_READWRITE, &Protection);
memcpy((void*)Address_Far_Fog__Glass_Walls, &value , sizeof(value));
VirtualProtect((void*)Address_Far_Fog__Glass_Walls, sizeof(value), Protection, 0);
}
}
//-- Super Master --//
if(CH_Super_Master)
{
DWORD dwServerBase = *(DWORD*)Address_Server_Base;
if(dwServerBase != 0)
{
*(int*)(dwServerBase + Address_Super_Master_Offset) = 1;
}
}
if(!CH_Super_Master)
{
DWORD dwServerBase = *(DWORD*)Address_Server_Base;
if(dwServerBase != 0)
{
*(int*)(dwServerBase + Address_Super_Master_Offset) = 0;
}
}
//-- All Slots --//
if(CH_All_Slots)
{
DWORD dwServerBase = *(DWORD*)Address_Server_Base;
if(dwServerBase != 0)
{
*(int*)(dwServerBase + Address_All_Slots_Offset_1) = 1;
*(int*)(dwServerBase + Address_All_Slots_Offset_2) = 1;
*(int*)(dwServerBase + Address_All_Slots_Offset_3) = 1;
*(int*)(dwServerBase + Address_All_Slots_Offset_4) = 1;
}
}
//-- Zero Delay --//
if(CH_Zero_Delay)
{
const BYTE zero_delay_on[3] = { 0x90, 0x90, 0x90 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Zero_Delay), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Zero_Delay), &zero_delay_on, 3);
VirtualProtect((void*)(Address_Zero_Delay), 3, dwProtect, NULL);
}
}
if(!CH_Zero_Delay)
{
const BYTE zero_delay_off[3] = { 0xF6, 0xC6, 0x04 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Zero_Delay), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Zero_Delay), &zero_delay_off, 3);
VirtualProtect((void*)(Address_Zero_Delay), 3, dwProtect, NULL);
}
}
//-- Anti Kick --//
if(CH_Anti_Kick)
{
const BYTE anti_kick_on[6] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Anti_Kick), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Anti_Kick), &anti_kick_on, 6);
VirtualProtect((void*)(Address_Anti_Kick), 6, dwProtect, NULL);
}
}
if(!CH_Anti_Kick)
{
const BYTE anti_kick_off[6] = { 0x8B, 0x85, 0x24, 0xE3, 0x04, 0x00 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Anti_Kick), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Anti_Kick), &anti_kick_off, 6);
VirtualProtect((void*)(Address_Anti_Kick), 6, dwProtect, NULL);
}
}
//-- Invisible --//
if(CH_Invisible)
{
const BYTE invisible_on[2] = { 0x1C, 0x8B };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Invisible), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Invisible), &invisible_on, 2);
VirtualProtect((void*)(Address_Invisible), 2, dwProtect, NULL);
}
}
if(!CH_Invisible)
{
const BYTE invisible_off[2] = { 0x2C, 0x8B };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Invisible), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Invisible), &invisible_off, 2);
VirtualProtect((void*)(Address_Invisible), 2, dwProtect, NULL);
}
}
if (CH_Invisi==1)
{
long t=273648428;
unsigned long Protection;
VirtualProtect((void*)INVIS, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)INVIS, &t , sizeof(t));
VirtualProtect((void*)INVIS, sizeof(t), Protection, 0);
}
if (!INVIS)
{
long t=471604252;
unsigned long Protection;
VirtualProtect((void*)INVIS, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)INVIS, &t , sizeof(t));
VirtualProtect((void*)INVIS, sizeof(t), Protection, 0);;
}
//-- Unlimited Ammo --//
if(CH_Unlimited_Ammo) //-- Hack Patched - Work Granades and RPG --//
{
const BYTE unlimited_ammo_1_on[3] = { 0x90, 0x90, 0x90 };
const BYTE unlimited_ammo_2_on[3] = { 0x90, 0x90, 0x90 };
const BYTE unlimited_ammo_3_on[3] = { 0x90, 0x90, 0x90 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Unlimited_Ammo_1), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Unlimited_Ammo_1), &unlimited_ammo_1_on, 3);
VirtualProtect((void*)(Address_Unlimited_Ammo_1), 3, dwProtect, NULL);
VirtualProtect((void*)(Address_Unlimited_Ammo_2), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Unlimited_Ammo_2), &unlimited_ammo_2_on, 3);
VirtualProtect((void*)(Address_Unlimited_Ammo_2), 3, dwProtect, NULL);
VirtualProtect((void*)(Address_Unlimited_Ammo_3), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Unlimited_Ammo_3), &unlimited_ammo_3_on, 3);
VirtualProtect((void*)(Address_Unlimited_Ammo_3), 3, dwProtect, NULL);
}
}
if(!CH_Unlimited_Ammo)
{
const BYTE unlimited_ammo_1_off[3] = { 0x89, 0x7E, 0x24 };
const BYTE unlimited_ammo_2_off[3] = { 0x89, 0x46, 0x20 };
const BYTE unlimited_ammo_3_off[3] = { 0x89, 0x46, 0x24 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Unlimited_Ammo_1), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Unlimited_Ammo_1), &unlimited_ammo_1_off, 3);
VirtualProtect((void*)(Address_Unlimited_Ammo_1), 3, dwProtect, NULL);
VirtualProtect((void*)(Address_Unlimited_Ammo_2), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Unlimited_Ammo_2), &unlimited_ammo_2_off, 3);
VirtualProtect((void*)(Address_Unlimited_Ammo_2), 3, dwProtect, NULL);
VirtualProtect((void*)(Address_Unlimited_Ammo_3), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Unlimited_Ammo_3), &unlimited_ammo_3_off, 3);
VirtualProtect((void*)(Address_Unlimited_Ammo_3), 3, dwProtect, NULL);
}
}
//-- Radar GPS Enemy--//
if(CH_Radar_GPS_Enemy)
{
const BYTE radar_gps_enemy_on[6] = { 0x0F, 0x84, 0xB1, 0x00, 0x00, 0x00 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Radar_GPS_Enemy), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Radar_GPS_Enemy), &radar_gps_enemy_on, 6);
VirtualProtect((void*)(Address_Radar_GPS_Enemy), 6, dwProtect, NULL);
}
}
if(!CH_Radar_GPS_Enemy)
{
const BYTE radar_gps_enemy_off[6] = { 0x0F, 0x85, 0xB1, 0x00, 0x00, 0x00 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Radar_GPS_Enemy), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Radar_GPS_Enemy), &radar_gps_enemy_off, 6);
VirtualProtect((void*)(Address_Radar_GPS_Enemy), 6, dwProtect, NULL);
}
}
//-- Map GPS --//
if(CH_Map_GPS)
{
const BYTE map_gps_on[2] = { 0x90, 0x90 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Map_GPS), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Map_GPS), &map_gps_on, 2);
VirtualProtect((void*)(Address_Map_GPS), 2, dwProtect, NULL);
}
}
if(!CH_Map_GPS)
{
const BYTE map_gps_off[2] = { 0x75, 0x1E };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Map_GPS), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Map_GPS), &map_gps_off, 2);
VirtualProtect((void*)(Address_Map_GPS), 2, dwProtect, NULL);
}
}
//-- Map FFA GPS --//
if(CH_Map_FFA_GPS)
{
const BYTE map_ffa_gps_on[2] = { 0x74, 0x12 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Map_FFA_GPS), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Map_FFA_GPS), &map_ffa_gps_on, 2);
VirtualProtect((void*)(Address_Map_FFA_GPS), 2, dwProtect, NULL);
}
}
if(!CH_Map_FFA_GPS)
{
const BYTE map_ffa_gps_off[2] = { 0x75, 0x12 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Map_FFA_GPS), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Map_FFA_GPS), &map_ffa_gps_off, 2);
VirtualProtect((void*)(Address_Map_FFA_GPS), 2, dwProtect, NULL);
}
}
//-- ESP Names --//
if(CH_ESP_Names)
{
const BYTE esp_names_on[2] = { 0x76, 0x22 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_ESP_Names), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_ESP_Names), esp_names_on, 2);
VirtualProtect((void*)(Address_ESP_Names), 2, dwProtect, NULL);
}
}
if(!CH_ESP_Names)
{
const BYTE esp_names_off[2] = { 0x75, 0x22 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_ESP_Names), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_ESP_Names), &esp_names_off, 2);
VirtualProtect((void*)(Address_ESP_Names), 2, dwProtect, NULL);
}
}
//-- Auto Ammo --//
if(CH_Auto_Ammo)
{
const BYTE auto_ammo_on[6] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Auto_Ammo), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Auto_Ammo), auto_ammo_on, 6);
VirtualProtect((void*)(Address_Auto_Ammo), 6, dwProtect, NULL);
}
}
if(!CH_Auto_Ammo)
{
const BYTE auto_ammo_off[6] = { 0x0F, 0x85, 0xA2, 0x00, 0x00, 0x00 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Auto_Ammo), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Auto_Ammo), &auto_ammo_off, 6);
VirtualProtect((void*)(Address_Auto_Ammo), 6, dwProtect, NULL);
}
}
//-- Auto Health --//
if(CH_Auto_Health)
{
const BYTE auto_health_on[6] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Auto_Health), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Auto_Health), &auto_health_on, 6);
VirtualProtect((void*)(Address_Auto_Health), 6, dwProtect, NULL);
}
}
if(!CH_Auto_Health)
{
const BYTE auto_health_off[6] = { 0x0F, 0x85, 0xA6, 0x00, 0x00, 0x00 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Auto_Health), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Auto_Health), &auto_health_off, 6);
VirtualProtect((void*)(Address_Auto_Health), 6, dwProtect, NULL);
}
}
//-- Auto Repair --//
if(CH_Auto_Repair)
{
const BYTE auto_repair_on[6] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Auto_Repair), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Auto_Repair), &auto_repair_on, 6);
VirtualProtect((void*)(Address_Auto_Repair), 6, dwProtect, NULL);
}
}
if(!CH_Auto_Repair)
{
const BYTE auto_repair_off[6] = { 0x0F, 0x85, 0xB9, 0x00, 0x00, 0x00 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Auto_Repair), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Auto_Repair), &auto_repair_off, 6);
VirtualProtect((void*)(Address_Auto_Repair), 6, dwProtect, NULL);
}
}
//-- Headshot --//
if(CH_Headshot)
{
const BYTE headshot_on[2] = { 0x31, 0xC0 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Headshot), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Headshot), &headshot_on, 2);
VirtualProtect((void*)(Address_Headshot), 2, dwProtect, NULL);
}
}
if(!CH_Headshot)
{
const BYTE headshot_off[2] = { 0x85, 0xC0 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Headshot), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Headshot), &headshot_off, 2);
VirtualProtect((void*)(Address_Headshot), 2, dwProtect, NULL);
}
}
//-- STW --//
if(CH_STW)
{
const BYTE stw_on[3] = { 0x90, 0x90, 0x90 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_STW), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_STW), &stw_on, 3);
VirtualProtect((void*)(Address_STW), 3, dwProtect, NULL);
}
}
if(!CH_STW)
{
const BYTE stw_off[3] = { 0x8B, 0x51, 0x38 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_STW), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_STW), &stw_off, 3);
VirtualProtect((void*)(Address_STW), 3, dwProtect, NULL);
}
}
//-- Escalator --//
if(CH_Escalator)
{
if((GetAsyncKeyState(VK_LCONTROL)) && (GetAsyncKeyState(VK_SPACE)))
{
const BYTE escalator_on_1[3] = { 0x90, 0x90, 0x90 };
const BYTE escalator_on_2[3] = { 0x90, 0x90, 0x90 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Escalator_1), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Escalator_1), &escalator_on_1, 3);
VirtualProtect((void*)(Address_Escalator_1), 3, dwProtect, NULL);
VirtualProtect((void*)(Address_Escalator_2), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Escalator_2), &escalator_on_2, 3);
VirtualProtect((void*)(Address_Escalator_2), 3, dwProtect, NULL);
}
}
}
if(!CH_Escalator)
{
const BYTE escalator_off_1[3] = { 0x89, 0x5D, 0x34 };
const BYTE escalator_off_2[3] = { 0x89, 0x45, 0x34 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Escalator_1), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Escalator_1), &escalator_off_1, 3);
VirtualProtect((void*)(Address_Escalator_1), 3, dwProtect, NULL);
VirtualProtect((void*)(Address_Escalator_2), 3, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Escalator_2), &escalator_off_2, 3);
VirtualProtect((void*)(Address_Escalator_2), 3, dwProtect, NULL);
}
}
//-- SVP --//
if(CH_SVP)
{
const BYTE svp_on[4] = { 0x90, 0x90, 0x90, 0x90 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_SVP), 4, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_SVP), &svp_on, 4);
VirtualProtect((void*)(Address_SVP), 4, dwProtect, NULL);
}
}
if(!CH_SVP)
{
const BYTE svp_off[4] = { 0x8B, 0x54, 0x24, 0x04 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_SVP), 4, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_SVP), &svp_off, 4);
VirtualProtect((void*)(Address_SVP), 4, dwProtect, NULL);
}
}
//-- OPK --//
if(CH_OPK)
{
const BYTE opk_on_1[6] = { 0x89, 0xA1, 0x8C, 0x01, 0x00, 0x00 };
const BYTE opk_on_2[6] = { 0x89, 0xA1, 0x90, 0x01, 0x00, 0x00 };
const BYTE opk_on_3[6] = { 0x89, 0xA1, 0x94, 0x01, 0x00, 0x00 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_OPK_1), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_OPK_1), &opk_on_1, 6);
VirtualProtect((void*)(Address_OPK_1), 6, dwProtect, NULL);
VirtualProtect((void*)(Address_OPK_2), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_OPK_2), &opk_on_2, 6);
VirtualProtect((void*)(Address_OPK_2), 6, dwProtect, NULL);
VirtualProtect((void*)(Address_OPK_3), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_OPK_3), &opk_on_3, 6);
VirtualProtect((void*)(Address_OPK_3), 6, dwProtect, NULL);
}
}
if(!CH_OPK)
{
const BYTE opk_off_1[6] = { 0x89, 0x91, 0x8C, 0x01, 0x00, 0x00 };
const BYTE opk_off_2[6] = { 0x89, 0x81, 0x90, 0x01, 0x00, 0x00 };
const BYTE opk_off_3[6] = { 0x89, 0x91, 0x94, 0x01, 0x00, 0x00 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_OPK_1), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_OPK_1), &opk_off_1, 6);
VirtualProtect((void*)(Address_OPK_1), 6, dwProtect, NULL);
VirtualProtect((void*)(Address_OPK_2), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_OPK_2), &opk_off_2, 6);
VirtualProtect((void*)(Address_OPK_2), 6, dwProtect, NULL);
VirtualProtect((void*)(Address_OPK_3), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_OPK_3), &opk_off_3, 6);
VirtualProtect((void*)(Address_OPK_3), 6, dwProtect, NULL);
}
}
//-- Invisible Vehicle --//
if(CH_Invisible_Vehicle)
{
const BYTE invisible_vehicle_on[2] = { 0x1C, 0x8B };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Invisible_Vehicle), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Invisible_Vehicle), &invisible_vehicle_on, 2);
VirtualProtect((void*)(Address_Invisible_Vehicle), 2, dwProtect, NULL);
}
}
if(!CH_Invisible_Vehicle)
{
const BYTE invisible_vehicle_off[2] = { 0x0C, 0x8B };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Invisible_Vehicle), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Invisible_Vehicle), &invisible_vehicle_off, 2);
VirtualProtect((void*)(Address_Invisible_Vehicle), 2, dwProtect, NULL);
}
}
//-- Prone --//
if(CH_Prone_CQC)
{
const BYTE prone_cqc_on[2] = { 0x90, 0x90 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Prone_CQC), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Prone_CQC), &prone_cqc_on, 2);
VirtualProtect((void*)(Address_Prone_CQC), 2, dwProtect, NULL);
}
}
if(!CH_Prone_CQC)
{
const BYTE prone_cqc_off[2] = { 0x74, 0x0C };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Prone_CQC), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Prone_CQC), &prone_cqc_off, 2);
VirtualProtect((void*)(Address_Prone_CQC), 2, dwProtect, NULL);
}
}
//-- Artillery --//
if(CH_Artillery)
{
const BYTE artillery_1_on[1] = { 0xEB };
const BYTE artillery_2_on[2] = { 0x90, 0x90 };
const BYTE artillery_3_on[2] = { 0xEB, 0x31 };
const BYTE artillery_4_on[2] = { 0x90, 0x90 };
const BYTE artillery_5_on[2] = { 0x90, 0x90 };
const BYTE artillery_6_on[2] = { 0xEB, 0x25 };
const BYTE artillery_7_on[2] = { 0xEB, 0x2C };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Artillery_1), 1, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_1), &artillery_1_on, 1);
VirtualProtect((void*)(Address_Artillery_1), 1, dwProtect, NULL);
VirtualProtect((void*)(Address_Artillery_2), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_2), &artillery_2_on, 2);
VirtualProtect((void*)(Address_Artillery_2), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Artillery_3), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_3), &artillery_3_on, 2);
VirtualProtect((void*)(Address_Artillery_3), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Artillery_4), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_4), &artillery_4_on, 2);
VirtualProtect((void*)(Address_Artillery_4), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Artillery_5), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_5), &artillery_5_on, 2);
VirtualProtect((void*)(Address_Artillery_5), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Artillery_6), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_6), &artillery_6_on, 2);
VirtualProtect((void*)(Address_Artillery_6), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Artillery_7), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_7), &artillery_7_on, 2);
VirtualProtect((void*)(Address_Artillery_7), 2, dwProtect, NULL);
}
}
if(!CH_Artillery)
{
const BYTE artillery_1_off[1] = { 0x7D };
const BYTE artillery_2_off[2] = { 0x75, 0x5E };
const BYTE artillery_3_off[2] = { 0x74, 0x31 };
const BYTE artillery_4_off[2] = { 0x75, 0x33 };
const BYTE artillery_5_off[2] = { 0x75, 0x25 };
const BYTE artillery_6_off[2] = { 0x7A, 0x25 };
const BYTE artillery_7_off[2] = { 0x75, 0x2C };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Artillery_1), 1, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_1), &artillery_1_off, 1);
VirtualProtect((void*)(Address_Artillery_1), 1, dwProtect, NULL);
VirtualProtect((void*)(Address_Artillery_2), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_2), &artillery_2_off, 2);
VirtualProtect((void*)(Address_Artillery_2), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Artillery_3), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_3), &artillery_3_off, 2);
VirtualProtect((void*)(Address_Artillery_3), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Artillery_4), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_4), &artillery_4_off, 2);
VirtualProtect((void*)(Address_Artillery_4), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Artillery_5), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_5), &artillery_5_off, 2);
VirtualProtect((void*)(Address_Artillery_5), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Artillery_6), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_6), &artillery_6_off, 2);
VirtualProtect((void*)(Address_Artillery_6), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Artillery_7), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Artillery_7), &artillery_7_off, 2);
VirtualProtect((void*)(Address_Artillery_7), 2, dwProtect, NULL);
}
}
//-- Crazy Vehicle --//
if(CH_Crazy_Vehicle)
{
const BYTE crazy_vehicle_1_on[2] = { 0x90, 0x90 };
const BYTE crazy_vehicle_2_on[6] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Crazy_Vehicle_1), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Crazy_Vehicle_1), &crazy_vehicle_1_on, 2);
VirtualProtect((void*)(Address_Crazy_Vehicle_1), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Crazy_Vehicle_2), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Crazy_Vehicle_2), &crazy_vehicle_2_on, 6);
VirtualProtect((void*)(Address_Crazy_Vehicle_2), 6, dwProtect, NULL);
}
}
if(!CH_Crazy_Vehicle)
{
{
const BYTE crazy_vehicle_1_off[2] = { 0x74, 0x14 };
const BYTE crazy_vehicle_2_off[6] = { 0x0F, 0x85, 0x7F, 0xF9, 0xFF, 0xFF };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Crazy_Vehicle_1), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Crazy_Vehicle_1), &crazy_vehicle_1_off, 2);
VirtualProtect((void*)(Address_Crazy_Vehicle_1), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Crazy_Vehicle_2), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Crazy_Vehicle_2), &crazy_vehicle_2_off, 6);
VirtualProtect((void*)(Address_Crazy_Vehicle_2), 6, dwProtect, NULL);
}
}
}
//-- NFD_Vehicle --//
if(CH_NFD_Vehicle)
{
const BYTE nfd_vehicle_on[2] = { 0x0F, 0x85 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_NFD_Vehicle), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_NFD_Vehicle), &nfd_vehicle_on, 2);
VirtualProtect((void*)(Address_NFD_Vehicle), 2, dwProtect, NULL);
}
}
if(!CH_NFD_Vehicle)
{
const BYTE nfd_vehicle_off[2] = { 0x0F, 0x84 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_NFD_Vehicle), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_NFD_Vehicle), &nfd_vehicle_off, 2);
VirtualProtect((void*)(Address_NFD_Vehicle), 2, dwProtect, NULL);
}
}
//-- No Bounds Static --//
if(CH_No_Bounds_Static)
{
const BYTE no_bounds_static_on[2] = { 0x0F, 0x89 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_No_Bounds_Static), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_No_Bounds_Static), &no_bounds_static_on, 2);
VirtualProtect((void*)(Address_No_Bounds_Static), 2, dwProtect, NULL);
}
}
if(!CH_No_Bounds_Static)
{
const BYTE no_bounds_static_off[2] = { 0x0F, 0x85 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_No_Bounds_Static), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_No_Bounds_Static), &no_bounds_static_off, 2);
VirtualProtect((void*)(Address_No_Bounds_Static), 2, dwProtect, NULL);
}
}
//-- Super Vehicle --//
if(CH_Super_Vehicle)
{
const BYTE super_vehicle_1_on[2] = { 0x90, 0x90 };
const BYTE super_vehicle_2_on[6] = { 0xEB, 0x1E, 0x90, 0x90, 0x90, 0x90 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Super_Vehicle_1), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Super_Vehicle_1), &super_vehicle_1_on, 2);
VirtualProtect((void*)(Address_Super_Vehicle_1), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Super_Vehicle_2), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Super_Vehicle_2), &super_vehicle_2_on, 2);
VirtualProtect((void*)(Address_Super_Vehicle_2), 2, dwProtect, NULL);
}
}
if(!CH_Super_Vehicle)
{
const BYTE super_vehicle_1_off[2] = { 0x75, 0x31 };
const BYTE super_vehicle_2_off[6] = { 0x8B, 0x0D, 0x60, 0x80, 0xB7, 0x00 };
{
DWORD dwProtect;
VirtualProtect((void*)(Address_Super_Vehicle_1), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Super_Vehicle_1), &super_vehicle_1_off, 2);
VirtualProtect((void*)(Address_Super_Vehicle_1), 2, dwProtect, NULL);
VirtualProtect((void*)(Address_Super_Vehicle_2), 2, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(Address_Super_Vehicle_2), &super_vehicle_2_off, 2);
VirtualProtect((void*)(Address_Super_Vehicle_2), 2, dwProtect, NULL);
}
}