Advertisement
Voke_Bass

Anti-Cheat tb.kill [UPDATED 2020-12-17]

Feb 25th, 2019 (edited)
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.89 KB | None | 0 0
  1. //Updated 2020-12-17 | Rewiews: 176
  2. //Created by Vok3 | more: https://pastebin.com/u/Voke_Bass
  3.  
  4. new CheckCount[MAX_PLAYERS];
  5. new CheckSpam[MAX_PLAYERS];
  6.  
  7. public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
  8. {
  9.     if(GetPlayerWeapon(issuerid) == 0)
  10.     {
  11.         if(amount > 7)
  12.         {
  13.             if(CheckSpam[playerid]) return 1;
  14.            
  15.             new vehicleid = GetPlayerVehicleID(playerid);
  16.             new model = GetVehicleModel(vehicleid);
  17.            
  18.             if(model == 509 || model == 510 || model == 521 || model == 522 ||
  19.             model == 523 || model == 581) return 1;
  20.  
  21.             CheckCount[playerid] ++;
  22.             if(CheckCount[playerid] > 1)
  23.             {
  24.                 new String[150];
  25.                 format(String, sizeof(String), "[Anti-Cheat] Player %s was kicked out of the server!", /*GetPlayerName*/);
  26.                 SendClientMessageToAll(-1, String);
  27.  
  28.                 CheckSpam[playerid] = 1;
  29.                 Kick(playerid);
  30.             }
  31.         }
  32.     }
  33.     return 1;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement