bool CALLBACK outcomingRPC( stRakNetHookParams *params )
{
if( params->packetId == RPCEnumeration::RPC_GiveTakeDamage)
if(lol == true)
{
params->bitStream->Read(bGiveOrTake);
params->bitStream->Read(iPlayerID);
params->bitStream->Read(fAmmount);
params->bitStream->Read(iWeaponID);
params->bitStream->Read(iBodyPart);
if(!bGiveOrTake)
{
SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(245, 184, 0), "{006400}Попал по: %d | Нанес: %.f | Оружие: %d | Часть тела: %d ",iPlayerID, fAmmount, iWeaponID, iBodyPart);
sprintf(buf, "{006400}/ - %.2f / ", fAmmount );
rTimer = GetTickCount() + 2000;
}
else
{
SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(245, 184, 0), "{8b0000}Урон от: %d | Нанес по мне: %.f | Оружие: %d | Часть тела: %d ",iPlayerID, fAmmount, iWeaponID, iBodyPart);
}
};
return true;
};
bool CALLBACK Present ( CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride,
CONST RGNDATA *pDirtyRegion )
{
if( SUCCEEDED( SF->getRender()->BeginRender() ) )
if (rTimer >= GetTickCount())
{
float sx, sy;
SF->getGame()->convert3DCoordsToScreen(SF->getSAMP()->getPlayers()->GetOnFootData(iPlayerID)->fPosition[0],SF->getSAMP()->getPlayers()->GetOnFootData(iPlayerID)->fPosition[1],SF->getSAMP()->getPlayers()->GetOnFootData(iPlayerID)->fPosition[2]+1,&sx,&sy);
pFont->Print(buf, sx, sy, false );
SF->getRender()->EndRender();
};
return true;
};