23.07.2018, 14:55
(
Последний раз редактировалось DuyDang2412; 23.07.2018 в 14:56.
Причина: Update video.
)
I'm learning about RakNet and I was trying to read bullet sync data but the data was not exactly what I want. It gives me strange value and in the code and the video below, you can see that I don't change my weapon but the bulletSyncData[PR_weaponId] value changes. I need a help to solve this.
My English is not good so I cannot have more words.
More at this video.
My English is not good so I cannot have more words.
PHP код:
const ID_BULLET_SYNC = 206;
public OnIncomingPacket(playerid, packetid, BitStream:bs)
{
if(packetid == ID_BULLET_SYNC)
{
new bulletSyncData[PR_BulletSync],
Packed:string[128];
BS_ReadBulletSync(bs, bulletSyncData);
format(string, sizeof(string), !"hittype: %d, hitid: %d, weaponid: %d", bulletSyncData[PR_hitType],
bulletSyncData[PR_hitId], bulletSyncData[PR_weaponId]);
msg(playerid, -1, string);
}
return 1;
}