Making your own god mode (Working 02/10/2012)
It isn't Nico's god. It's just a simple god and doesn't work with some ranged Attacks.
To make your god, you must hook IVEngineClient::ClientCmd function.
When Vindctus call this function with a string like "force_damage_player(...)" you just return from your HookFunction without doing anything.
Code:
(...)
DWORD OriFunc_ptr, *AddrToHook, PageProtection;
AddrToHook = (unsigned int *)((*(unsigned int*) MyIVEngineClient_ptr) + 0x1C);
OriFunc_ptr = *AddrToHook;
VirtualProtect( (LPVOID) AddrToHook, 4, PAGE_EXECUTE_READWRITE, &PageProtection );
*AddrToHook = (DWORD) MyHookFunction;
(...)
void __declspec(naked) MyHookFunction()
{
_asm
{
push [esp+4] // cmd
call TestDmg
cmp al, 1
jz RETURN
pop eax
mov eax, OriFunc_ptr
jmp eax
RETURN:
pop eax
retn 4
}
}
bool __cdecl TestDmg( char *vinCmd )
{
char tmp[128];
memset( tmp, 0, 128);
memcpy( tmp, cmd, strlen( cmd ));
tmp[19] = 0;
if( strcmp( "force_damage_player", tmp) == 0 )
{
return true;
}
return false;
}