Fix The Scope
The sniper weapon in Gunz has no delay on the right click to activate the 'scope' and allow you to shoot. This makes it hard for people to effectivly use the sniper in Gunz. One way to fix this is adding a timer on the function that is called when you activate the 'scope'.
ZMyCharacter::OnGadget_Snifer
The function was actually supposed to be ZMyCharacter::OnGadget_Sniper but MAIET spelled it wrong.
For this example I'll use CDetours to hook the function for June 2007 client. After this hook is applied, there will be a 100 millisecond timeout on the scope function so you can scope normally.
Code:
DWORD g_dwLastSnifer = 0;
CDetour SniferDet;
void __stdcall SniferHook()
{
if(GetTickCount() - g_dwLastSnifer < 100)
SniferDet.Ret(false);
g_dwLastSnifer = GetTickCount();
}
BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
SniferDet.Detour((PBYTE)0x4806B0, (PBYTE)SniferHook, true);
SniferDet.Apply();
}
return TRUE;
}
Allow scope while wallrunning
Gunz also won't let you scope while you are wall running. You can remove this with an asm edit.
If you look at 00480C33, you will find this is the first check in ZMyCharacter::ProcessGadget. This checks a bool to determine if your currently wallrunning.
Code:
00480C33 . F607 02 TEST BYTE PTR DS:[EDI],2
00480C36 . 0F85 48010000 JNZ gunz.00480D84
Removing it will allow you to use scope while wall running, thus also allowing you to shoot while wall running.
Code:
VirtualProtect((void*)0x00480C33, 9, PAGE_EXECUTE_READWRITE, 0);
memcpy((void*)0x00480C33, "\x90\x90\x90\x90\x90\x90\x90\x90\x90", 9);
VirtualProtect((void*)0x00480C33, 9, PAGE_EXECUTE_READ, 0);
Address clients
oct 2008 - 4806B0 | 4846E7
jun 2008 - 47FA10 | 483977
jun 2007 - 47C9D0 | 480C33
That's all. Now it's much easier to pwn people with a sniper on gunz.