#define ModelNode 0x1942054
bool backup = false;
void backuphead()
{
DWORD CShell = (DWORD)GetModuleHandleA(eCShell);
DWORD pHeadShotMgr = *(DWORD*)(CShell + ModelNode);
if (!backup)
{
if (pHeadShotMgr != 0)
{
for (int i = 0; i < 87; i++)
{
DWORD pModelNodeType = (DWORD)(pHeadShotMgr + i * 0x9C);
if (pModelNodeType)
aHead[i] = *(int*)(pModelNodeType + 0x54);
backup = true;
}
}
}
}
void Head()
{
DWORD CShell = (DWORD)GetModuleHandleA(eCShell);
DWORD pHeadShotMgr = *(DWORD*)(CShell + ModelNode);
if (pHeadShotMgr != 0)
{
for (int i = 0; i < 87; i++)
{
DWORD pModelNodeType = (DWORD)(pHeadShotMgr + i * 0x9C);
if (backup)
{
if (//Your variable) //Gold
{
*(int*)(pModelNodeType + 0x54) = 1;
}
else if (//Your variable)//Silver
{
*(int*)(pModelNodeType + 0x54) = 2;
}
else
{
*(int*)(pModelNodeType + 0x54) = aHead[i];
}
}
}
}
}



int HeadShotOld[87];
bool IsBackup = false;
void BackupMemory(void)
{
if (!IsGameReadyForHook()) return;
DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD crossfire = (DWORD)GetModuleHandleA("crossfire.exe");
if (crossfire == NULL) return;
if (!IsBackup)
{
//================Always HeadShot===============//
DWORD pModelNodeTypeMgr = *(DWORD*)(CShell + pModelNodeMgr);
if (pModelNodeTypeMgr !=NULL)
{
for (int i = 0; i < 87; i++)
{
DWORD pHeadShotMgr = (DWORD)(pModelNodeTypeMgr + i * 0x9C);
if (pHeadShotMgr)
{
HeadShotOld[i] = *(int*)(pHeadShotMgr + 0x54);
}
}
}
IsBackup = true;
}
}
void StartHacks1(void)
{
if (!IsGameReadyForHook()) return;
DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD crossfire = (DWORD)GetModuleHandleA("crossfire.exe");
if (crossfire == NULL) return;
//================Always HeadShot===============//
DWORD pModelNodeTypeMgr = *(DWORD*)(CShell + pModelNodeMgr);
if (pModelNodeTypeMgr !=NULL)
{
for (int i = 0; i < 87; i++)
{
DWORD pHeadShotMgr = (DWORD)(pModelNodeTypeMgr + i * 0x9C);
if (pHeadShotMgr)
{
if (/*Declare 1*/)
{
*(int*)(pHeadShotMgr + 0x54) = 1; // Gold
}
if (/*Declare 2*/)
{
*(int*)(pHeadShotMgr + 0x54) = 2; // Silver
}
if (/*Declare 3*/)
{
*(int*)(pHeadShotMgr + 0x54) = HeadShotOld[i]; // Backup Variables
}
}
}
}
}