BBB
Active member
- Joined
- Apr 5, 2013
- Messages
- 62
- Reaction score
- 1
I've created a function to enable/disable player control, but it sometimes freezes my game -.-
pls help
pls help
Code:
void ToggleFreeze(int b)
{
DWORD addr = (DWORD)GetModuleHandle(L"samp.dll");
if(!addr)
return;
DWORD playerptr = addr+0x212A4C; //some ptr
DWORD func1 = (addr+0x1010); // found that in olly, it gets a player ptr or sth
DWORD func2 = addr + 0x6DC70; //freeze func
__asm
{
mov eax, dword ptr[playerptr]
mov ecx, dword ptr[eax]
call func1
mov ecx, eax
push b
call func2
}
}