dphome
Well-known member
ver 1 (sa_masterPL)
ver 2 (0x_)
ver 3 (0x_)
ver 4 (DarkP1xel)
usage:
Code:
#define GTA_KEYS 0xB73458
DWORD SGKS;
void SetGameKeyState(BYTE key, BYTE state)
{
SGKS = GTA_KEYS + key;
memset((void*)SGKS, state, 1);
};
ver 2 (0x_)
Code:
void SetGameKeyState(BYTE key, BYTE state)
{
memset(reinterpret_cast<void*>(0xB73458 + key), state, 1);
}
ver 3 (0x_)
Code:
void SetGameKeyState(BYTE key, BYTE state)
{
*(uint8_t*)(0xB73458 + key) = state;
}
Code:
void __cdecl SetGameKeyState(const unsigned __int8 i8Key, const __int16 i16State)
{
*reinterpret_cast<__int16 *>(0xB73458 + i8Key) = i16State;
return;
}
usage:
Code:
SetGameKeyState(0x20, 0);
SetGameKeyState(0x20, 255);
Last edited: