T3KTONIT
Well-known member
- Joined
- Sep 2, 2013
- Messages
- 308
- Reaction score
- 5
Code:
DWORD SAMP_DLL;
DWORD _HookedPlayerSTATE;
void __sampHookPlayerSTATE()
{
//samp.dll+6DD38
DWORD oldflag;
DWORD Addr = SAMP_DLL + 0x6DD38;
DWORD CmD = Addr - 0x1;
DWORD ToAd = (DWORD)&_HookedPlayerSTATE;
VirtualProtect((LPVOID)Addr, 5, PAGE_EXECUTE_READWRITE, &oldflag);
VirtualProtect((LPVOID)CmD, 5, PAGE_EXECUTE_READWRITE, &oldflag);
*(DWORD*)Addr = ToAd; // original instruction : mov al, [eax+000000350]
*(BYTE*)CmD = (BYTE)0x5; // change to mov al, _HookedPlayerSTATE
_HookedPlayerSTATE = 1; // normal state(onfoot)
}
you can use this in your main(DLL hack), just call it and if you want to modify the state you can just write for example _HookedPlayerSTATE = 50; like
Code:
void SendPlayerInVehicle(DWORD VehiclePointer)
{
DWORD cped = 0xB6F5F0;
DWORD adrs = *(DWORD*)cped + 0x58C;
*(DWORD*)adrs = VehiclePointer; // kind of writememory
_HookedPlayerSTATE = 50; // 50 is driving state
}
i think nobody will use this since there is already raknet in s0beit, but you can use it if you're willing to create a dll hack or some shit lol..., this is a little old btw i just wanted to share some stuff x] (btw it can be used for CLEO! wthout sampfuncs ofc)