- 3
- 0
- Версия SA-MP
-
- 0.3.7-R3
C++:
bool CALLBACK incomingData(stRakNetHookParams* params)
{
if (params->packetId == PacketEnumeration::ID_PLAYER_SYNC)
{
stOnFootData data;
memset(&data, 0, sizeof(stOnFootData));
byte packet;
params->bitStream->ResetReadPointer();
params->bitStream->Read(packet);
params->bitStream->Read((PCHAR)&data, sizeof(stOnFootData));
params->bitStream->ResetReadPointer();
}
return true;
}
...
SF->getRakNet()->registerRakNetCallback(RakNetScriptHookType::RAKHOOK_TYPE_INCOMING_PACKET, incomingData);