#define HOOK_CALL_STREAMEDOUTINFO 0x63F80
DWORD dwStreamedOutInfoOrigFunc;
float fStreamedOutInfoPosX, fStreamedOutInfoPosY, fStreamedOutInfoPosZ;
uint16_t wStreamedOutInfoPlayerID;
uint8_t _declspec ( naked ) StreamedOutInfo ( void )
{
_asm
{
push eax
mov eax, dword ptr [esp+12]
mov fStreamedOutInfoPosX, eax
mov eax, dword ptr [esp+16]
mov fStreamedOutInfoPosY, eax
mov eax, dword ptr [esp+20]
mov fStreamedOutInfoPosZ, eax
mov ax, word ptr [esp+24]
mov wStreamedOutInfoPlayerID, ax
pop eax
}
_asm pushad
g_stStreamedOutInfo.iPlayerID[wStreamedOutInfoPlayerID] = (int)wStreamedOutInfoPlayerID;
g_stStreamedOutInfo.fPlayerPos[wStreamedOutInfoPlayerID][0] = fStreamedOutInfoPosX;
g_stStreamedOutInfo.fPlayerPos[wStreamedOutInfoPlayerID][1] = fStreamedOutInfoPosY;
g_stStreamedOutInfo.fPlayerPos[wStreamedOutInfoPlayerID][2] = fStreamedOutInfoPosZ;
_asm popad
_asm
{
push eax
mov eax, g_dwSAMP_Addr
add eax, HOOK_CALL_STREAMEDOUTINFO
mov dwStreamedOutInfoOrigFunc, eax
pop eax
jmp dwStreamedOutInfoOrigFunc
}
}