Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnIncomingPacket(playerid, packetid, BitStream:bs) {
- if (!(0 <= playerid < MAX_PLAYERS)) {
- return 1;
- }
- // if(!IsLauncherConnected(playerid) && !IsMobileConnected(playerid) && !IsTrilogyConnected(playerid)) {
- // return 1;
- // }
- DebugSend(playerid, "OnIncomingPacket packetid: %d", packetid);
- if(packetid == 220) {
- BS_IgnoreBits(bs, 8);
- new g_action_id = 0;
- new g_cheat_id = 0;
- new bool: g_status = false;
- BS_ReadValue(bs, PR_UINT8, g_action_id);
- BS_ReadValue(bs, PR_UINT8, g_cheat_id);
- BS_ReadValue(bs, PR_BOOL, g_status);
- BS_ResetReadPointer(bs);
- DebugSend(playerid, "packetid: %d, action_id: %d, cheat_id: %d, status: %d", packetid, g_action_id, g_cheat_id, g_status);
- if(g_action_id == 179) {
- if(0 <= g_cheat_id < MAX_CHEAT_IDS) {
- g_player_status_cheat[playerid][g_cheat_id] = g_status;
- DebugSend(playerid, "Set cheat status (%s): status %d", g_cheat_name[g_cheat_id], g_status);
- }
- }
- }
- return 1;
- }
- #if defined _ALS_OnIncomingPacket
- #undef OnIncomingPacket
- #else
- #define _ALS_OnIncomingPacket
- #endif
- #define OnIncomingPacket sobeit_OnIncomingPacket
- #if defined sobeit_OnIncomingPacket
- forward sobeit_OnIncomingPacket(playerid, packetid, BitStream:bs);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement