SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #if defined _nex_ac_included
  2.     forward OnCheatDetected(playerid, ip_address[], type, code);
  3.     public OnCheatDetected(playerid, ip_address[], type, code)
  4.     {
  5.         switch(code)
  6.         {
  7.             case 5, 6, 11, 22: return 1;
  8.             case 14:
  9.             {
  10.                 new string[156],
  11.                     a = AntiCheatGetMoney(playerid);
  12.                 format(string, sizeof(string), "[Nex-AC] %s co the dang hack money (server-side money: %d, nex-ac money: %d, client-side money: %d)",
  13.                 characterInfo[playerid][characterName], characterInfo[playerid][cash], a, GetPlayerMoney(playerid));
  14.                 adminMsg(COLOR_GREEN, string);
  15.                 ResetPlayerMoney(playerid);
  16.                 _setPlayerMoney(playerid, characterInfo[playerid][cash]);
  17.             }
  18.             case 32:
  19.             {
  20.                 new Float:x, Float:y, Float:z;
  21.                 AntiCheatGetPos(playerid, x, y, z);
  22.                 SetPlayerPos(playerid, x, y, z);
  23.             }
  24.             case 40:
  25.             {
  26.                 msg(playerid, COLOR_ORANGE, MAX_CONNECTS_MSG);
  27.                 AntiCheatKickWithDesync(playerid, code);
  28.                 return 1;
  29.             }
  30.             case 41:
  31.             {
  32.                 msg(playerid, COLOR_ORANGE, UNKNOWN_CLIENT_MSG);
  33.                 AntiCheatKickWithDesync(playerid, code);
  34.                 return 1;
  35.             }
  36.             default:
  37.             {
  38.                 new string[128],
  39.                     ip[16];
  40.                 GetPlayerIp(playerid, ip, sizeof(ip));
  41.                 format(string, sizeof(string), "[Nex-AC] %s [%s] dang su dung hack/cheat [#%d].",
  42.                 characterInfo[playerid][characterName], ip, code);
  43.                 adminMsg(COLOR_ORANGE, string);
  44.             }
  45.         }
  46.         new bool:adminOnline = false;
  47.         for(new i = GetPlayerPoolSize(); i >= 0; i--)
  48.         {
  49.             if(characterInfo[i][adminLevel] != 0)
  50.             {
  51.                 adminOnline = true;
  52.                 break;
  53.             }
  54.         }
  55.         if(!adminOnline) AntiCheatKickWithDesync(playerid, code);
  56.         return 1;
  57.     }  
  58. #endif
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top