Scope Hack (source, pattern and string)
You will need to scan 3 offset:
+ ZoomStage: D9 9A ?? ?? ?? ?? 8B 45 04 8B 48 0C (string: ZoomAction)
+ ZoomSize: D9 98 ?? ?? ?? ?? EB 50 8B 4C 24 1C (string: ZoomAction)
+ RightClickAttribute: 83 88 ?? ?? ?? ?? 02 68 ?? ?? ?? ?? 57 E8 ?? ?? ?? ?? 83 C4 08 85 C0 (string: ZoomMode)
And this is the code
Code:
void Zoom(int wpid){
DWORD pWeaponMgr = *(DWORD*)(CShell + WeaponMgr);
if(pWeaponMgr != NULL){
DWORD Weapon = (*(DWORD*)( pWeaponMgr + (4*wpid)) );
if(Weapon != NULL){
*(int*)(Weapon + RightClickAttribute) = 2; //1 = no mode, 2 = zoom mode, 3 = 3 repeat fire mode....
*(int*)(Weapon + RightClickAttribute + 4) = 2; //1 = no zoom, 2 = full zoom, 3 = half zoom, 4 = half zoom no image,....
*(int*)(Weapon + (ZoomStage - 4)) = 2; // Number of scope levels
*(float*)(Weapon + (ZoomStage)) = 100.0f; //the scope speed
*(float*)(Weapon + (ZoomStage + 4)) = 100.0f; //the scope speed
*(float*)(Weapon + ZoomSize) = 1; // No scope
*(float*)(Weapon + ZoomSize + 4) = 2; // Scope level 1
// *(float*)(Weapon + ZoomSize + 8) = 4; // Scope level 2, add this when you have more than 2 scope levels
}
}
}
Thanks if i helped
