Advertisement
Guest User

Anti Cheat 1.0 By [Mdi].[$]_Red_[MF]

a guest
Sep 14th, 2016
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.75 KB | None | 0 0
  1. /*
  2. Não adianta mudar os creditos não foi você que fez
  3.  
  4. Meu Server: 167.114.42.20:7762
  5. */
  6. #include <a_samp>
  7. new kickado[MAX_PLAYERS];
  8. public OnFilterScriptInit()
  9. {
  10.         print("\n-------------------------------------");
  11.         print("Anti Cheat 1.0 By [Mdi].[$]_Red_[MF] Loaded");
  12.         print("Meu Server ip: 167.114.42.20:7762\n");
  13.         print("-------------------------------------\n");
  14.         return 1;
  15. }
  16. public OnPlayerDisconnect(playerid)
  17. {
  18.     kickado[playerid] = 0;
  19.     return 1;
  20. }
  21. public OnPlayerUpdate(playerid)
  22. {
  23.     if(GetPlayerWeapon(playerid) != WEAPON_PARACHUTE && GetPlayerAnimationIndex(playerid) == 974 || GetPlayerWeapon(playerid) != WEAPON_PARACHUTE && GetPlayerAnimationIndex(playerid) == 972 || GetPlayerWeapon(playerid) != WEAPON_PARACHUTE && GetPlayerAnimationIndex(playerid) == 968)
  24.     {
  25.     if(kickado[playerid] == 0)
  26.     {
  27.     kickado[playerid]++;
  28.     new name[24], string[135];
  29.     GetPlayerName(playerid, name, sizeof(name));
  30.     format(string, sizeof(string), "[ANTI-CHEAT]: %s foi kickado [Motivo: Skin Bug]", name);
  31.     SendClientMessageToAll(-1, string);
  32.     SetTimerEx("rkick", 500, false, "i", playerid);
  33.     print(string);
  34.     }
  35.     }
  36.  
  37.     new Float:x, Float:y, Float:z;
  38.     GetPlayerPos(playerid, x, y, z);
  39.     if(GetPlayerWeapon(playerid) != WEAPON_PARACHUTE && GetPlayerAnimationIndex(playerid) == 959 || !IsPlayerInWater(playerid) && GetPlayerAnimationIndex(playerid) == 1539 && z > 14 || GetPlayerWeapon(playerid) != WEAPON_PARACHUTE && GetPlayerAnimationIndex(playerid) == 958 && z > 14)
  40.     {
  41.     if(kickado[playerid] == 0)
  42.     {
  43.     kickado[playerid]++;
  44.     new name[24], string[135];
  45.     GetPlayerName(playerid, name, sizeof(name));
  46.     format(string, sizeof(string), "[ANTI-CHEAT]: %s foi kickado [Motivo: Fly]", name);
  47.     SendClientMessageToAll(-1, string);
  48.     SetTimerEx("rkick", 500, false, "i", playerid);
  49.     print(string);
  50.     }
  51.     }
  52.     return 1;
  53. }
  54. forward rkick(playerid);
  55. public rkick(playerid)
  56. {
  57.     Kick(playerid);
  58.     return 1;
  59. }
  60.  
  61. stock IsPlayerInWater(playerid)//by stabker http://forum.sa-mp.com/showthread.php?t=400049
  62. {
  63.     new Float:Z;
  64.     GetPlayerPos(playerid,Z,Z,Z);
  65.     if(Z < 0.7) switch(GetPlayerAnimationIndex(playerid)) { case 1543,1538,1539: return 1; }
  66.     if(GetPlayerDistanceFromPoint(playerid,-965,2438,42) <= 700 && Z < 45)return 1;
  67.     new Float:water_places[][] =
  68.     {
  69.         {25.02313.0, -1417.0,    23.0},
  70.         {15.01280.0, -773.0,     1082.0},
  71.         {15.01279.0, -804.0,     86.0},
  72.         {20.01094.0, -674.0,     111.0},
  73.         {26.0194.0-1232.0,    76.0},
  74.         {25.02583.0, 2385.0,     15.0},
  75.         {25.0225.0-1187.0,    73.0},
  76.         {50.01973.0, -1198.0,    17.0}
  77.     };
  78.     for(new t=0; t < sizeof water_places; t++)
  79.         if(GetPlayerDistanceFromPoint(playerid,water_places[t][1],water_places[t][2],water_places[t][3]) <= water_places[t][0]) return 1;
  80.     return 0;
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement