- 386
- 134
Чё за бред?
C++:
struct WeaponsUpdateData
{
UINT8 slot_0;
UINT8 weapon_0;
UINT16 ammo_0;
UINT8 slot_1;
UINT8 weapon_1;
UINT16 ammo_1;
UINT8 slot_2;
UINT8 weapon_2;
UINT16 ammo_2;
UINT8 slot_3;
UINT8 weapon_3;
UINT16 ammo_3;
UINT8 slot_4;
UINT8 weapon_4;
UINT16 ammo_4;
UINT8 slot_5;
UINT8 weapon_5;
UINT16 ammo_5;
UINT8 slot_6;
UINT8 weapon_6;
UINT16 ammo_6;
UINT8 slot_7;
UINT8 weapon_7;
UINT16 ammo_7;
UINT8 slot_8;
UINT8 weapon_8;
UINT16 ammo_8;
UINT8 slot_9;
UINT8 weapon_9;
UINT16 ammo_9;
UINT8 slot_10;
UINT8 weapon_10;
UINT16 ammo_10;
UINT8 slot_11;
UINT8 weapon_11;
UINT16 ammo_11;
};
bool CALLBACK outcomingPacket(stRakNetHookParams* data)
{
switch (data->packetId)
{
case 204:
{
SF->getSAMP()->getChat()->AddChatMessage(-1, "WeaponsUpdateData");
WeaponsUpdateData weaponsUpdateData;
data->bitStream->Read(weaponsUpdateData.slot_0);
data->bitStream->Read(weaponsUpdateData.weapon_0);
data->bitStream->Read(weaponsUpdateData.ammo_0);
data->bitStream->Read(weaponsUpdateData.slot_1);
data->bitStream->Read(weaponsUpdateData.weapon_1);
data->bitStream->Read(weaponsUpdateData.ammo_1);
data->bitStream->Read(weaponsUpdateData.slot_2);
data->bitStream->Read(weaponsUpdateData.weapon_2);
data->bitStream->Read(weaponsUpdateData.ammo_2);
data->bitStream->Read(weaponsUpdateData.slot_3);
data->bitStream->Read(weaponsUpdateData.weapon_3);
data->bitStream->Read(weaponsUpdateData.ammo_3);
data->bitStream->Read(weaponsUpdateData.slot_4);
data->bitStream->Read(weaponsUpdateData.weapon_4);
data->bitStream->Read(weaponsUpdateData.ammo_4);
data->bitStream->Read(weaponsUpdateData.slot_5);
data->bitStream->Read(weaponsUpdateData.weapon_5);
data->bitStream->Read(weaponsUpdateData.ammo_5);
data->bitStream->Read(weaponsUpdateData.slot_6);
data->bitStream->Read(weaponsUpdateData.weapon_6);
data->bitStream->Read(weaponsUpdateData.ammo_6);
data->bitStream->Read(weaponsUpdateData.slot_7);
data->bitStream->Read(weaponsUpdateData.weapon_7);
data->bitStream->Read(weaponsUpdateData.ammo_7);
data->bitStream->Read(weaponsUpdateData.slot_8);
data->bitStream->Read(weaponsUpdateData.weapon_8);
data->bitStream->Read(weaponsUpdateData.ammo_8);
data->bitStream->Read(weaponsUpdateData.slot_9);
data->bitStream->Read(weaponsUpdateData.weapon_9);
data->bitStream->Read(weaponsUpdateData.ammo_9);
data->bitStream->Read(weaponsUpdateData.slot_10);
data->bitStream->Read(weaponsUpdateData.weapon_10);
data->bitStream->Read(weaponsUpdateData.ammo_10);
data->bitStream->Read(weaponsUpdateData.slot_11);
data->bitStream->Read(weaponsUpdateData.weapon_11);
data->bitStream->Read(weaponsUpdateData.ammo_11);
data->bitStream->ResetReadPointer();
SF->getSAMP()->getChat()->AddChatMessage(-1, "slot_0: %i; weapon_0: %i; ammo_0: %i;",
weaponsUpdateData.slot_0, weaponsUpdateData.weapon_0, weaponsUpdateData.ammo_0);
SF->getSAMP()->getChat()->AddChatMessage(-1, "slot_1: %i; weapon_1: %i; ammo_1: %i;",
weaponsUpdateData.slot_1, weaponsUpdateData.weapon_1, weaponsUpdateData.ammo_1);
SF->getSAMP()->getChat()->AddChatMessage(-1, "slot_2: %i; weapon_2: %i; ammo_2: %i;",
weaponsUpdateData.slot_2, weaponsUpdateData.weapon_2, weaponsUpdateData.ammo_2);
SF->getSAMP()->getChat()->AddChatMessage(-1, "slot_3: %i; weapon_3: %i; ammo_3: %i;",
weaponsUpdateData.slot_3, weaponsUpdateData.weapon_3, weaponsUpdateData.ammo_3);
SF->getSAMP()->getChat()->AddChatMessage(-1, "slot_4: %i; weapon_4: %i; ammo_4: %i;",
weaponsUpdateData.slot_4, weaponsUpdateData.weapon_4, weaponsUpdateData.ammo_4);
SF->getSAMP()->getChat()->AddChatMessage(-1, "slot_5: %i; weapon_5: %i; ammo_5: %i;",
weaponsUpdateData.slot_5, weaponsUpdateData.weapon_5, weaponsUpdateData.ammo_5);
SF->getSAMP()->getChat()->AddChatMessage(-1, "slot_6: %i; weapon_6: %i; ammo_6: %i;",
weaponsUpdateData.slot_6, weaponsUpdateData.weapon_6, weaponsUpdateData.ammo_6);
SF->getSAMP()->getChat()->AddChatMessage(-1, "slot_7: %i; weapon_7: %i; ammo_7: %i;",
weaponsUpdateData.slot_7, weaponsUpdateData.weapon_7, weaponsUpdateData.ammo_7);
SF->getSAMP()->getChat()->AddChatMessage(-1, "slot_8: %i; weapon_8: %i; ammo_8: %i;",
weaponsUpdateData.slot_8, weaponsUpdateData.weapon_8, weaponsUpdateData.ammo_8);
SF->getSAMP()->getChat()->AddChatMessage(-1, "slot_9: %i; weapon_9: %i; ammo_9: %i;",
weaponsUpdateData.slot_9, weaponsUpdateData.weapon_9, weaponsUpdateData.ammo_9);
SF->getSAMP()->getChat()->AddChatMessage(-1, "slot_10: %i; weapon_10: %i; ammo_10: %i;",
weaponsUpdateData.slot_10, weaponsUpdateData.weapon_10, weaponsUpdateData.ammo_10);
SF->getSAMP()->getChat()->AddChatMessage(-1, "slot_11: %i; weapon_11: %i; ammo_11: %i;",
weaponsUpdateData.slot_11, weaponsUpdateData.weapon_11, weaponsUpdateData.ammo_11);
break;
}