Advertisement
Maki187

Anti Cheat Balkan Security v0.8 R1

Apr 29th, 2012
7,177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 61.07 KB | None | 0 0
  1. /* =======================[READ ME | READ INSTALATION.TXT]=============================
  2. --------------[24.12.2011 - 17.2.2012]--------------
  3. Credits:
  4. Mihail_Vukota - Help with testing AC (on version v0.1/v0.2)
  5. Gamestar - AntiSwear
  6. Gagi_Corleone(Mr.Gagi) - Help with foreach, anti health hack and with checking animations
  7. [FG]Snich_Wolf - explanation of how to remove the second "OK" button
  8. PLEASE DON'T CHANGE ANTICHEAT'S NAME!!! | SORRY FOR MY BAD ENGLISH!!
  9. ===================[v0.1]==[24.12.2011]===================
  10. Scripted Anti: Speed Hack, High Ping, Jet Pack and Bad Weapons
  11. ===================[v0.2]==[24.12.2011 && 25.12.2011]=====
  12. NEW: Anti Drive By, Anti Swear, Anti BunnyHop, RCON Protection, Anti AirBreake (beta test)
  13. Script fully optimized, removed timer for each player, and all check put in 1 timer.
  14. Now you can turn on/off some detection in AntiCHeat, over command /anticheat (RCON)
  15. ===================[v0.3]==[26.12.2011 && 29.12.2011-19:15]====
  16. Optimized Script
  17. NEW: Now anticheat can ignore admins, over command /adminduty in your mode(just need to set wef pvars)
  18. Now there is kick log, when player is kicked, his name, time, and reason will be in log.
  19. NEW BETA ANTICHEATS: Anti Money Hack
  20. FIXED AND UPGRADED: Anti AirBrake, Anti BunnyHop
  21. Happy New Year, 2012!!! :)
  22. ===================[v0.4]==[31.12.2011 && 2.1.2012]======
  23. FIXED AND UPGRADED: Anti Money Cheat, Anti AirBrake, fixed few little bugs with log files.
  24. NEW(BETA): Anti Health and Anti Armour Hack
  25. Now kicked player get's dialog with message that he is kicked/banned, with his name, reason, and ip adress.
  26. ===================[v0.5]==[4.1.2012 && 8.1.2012]========
  27. Optimized Script, and fixed some little bugs.
  28. From now and reseting money is going over AntiCheat.
  29. NEW: Anti Teleport[INT] - anit teleport in INTERIOR , Anti Fly Hack - if player is using Fly hack, anticheat will kick him.
  30. From now, you don't put stock funciton in mode, now you have include file!!
  31. "Printing" weapon names in text on bad weapon kick is now autimatic!
  32. ===================[v0.6]==[13.2.2012]========
  33. Optimized Script
  34. FIXED: Anti Money Cheat, Anti Teleport[INT]
  35. FIX AND UPGRADE: Anti Health Hack,  Anti Armour Hack
  36. ===================[v0.7]==[15.2.2012-17.2.2012]========
  37. NEW: Scripted new Anti AirBrake, detection is now perfect!
  38. Scripted Anti Teleport, teleport over menu and over map, there are 2 type of teleport, first type is when you press in s0beit f11 > teleports > some place, and that teleport on kick is flaged as Teleport Hack[1]
  39. And there is Map teleport, press esc > map > right click somvere on the map, and that teleport on kick is flaged as Teleport Hack[2].
  40. Scripted Anti Vehicle Repair.
  41. There are more changes, but tehy are not so important..
  42. ---[v0.7 R1]--
  43. FIXED: Old bugs with Anti Drive By,  and bug with sprunk on Health Hack
  44. ===================[v0.8]==[23.4.2012]========
  45. NEW: AntiSpam, Anti AFK
  46. Anti Teleport is now more secure, Anti Teleport[INT] is now Anti Interior Hack
  47. Fixed bug with Anti AirBrake, when you enter to building or come back from afk, you get kick, now that is fixed.
  48. Fixed bug with player name in Anti Vehicle repair
  49. //-----------[V0.8 R1 - 27.3.2012]-----------
  50. Fixed bug from v0.8 , v0.8 has made big lag on server, now that's fixed, Gigi_Falcone has found what's problem...
  51. */
  52. #define FILTERSCRIPT
  53.  
  54. #include <a_samp>
  55. #include <float>
  56. #include <zcmd>
  57. #include <foreach>
  58. #include <AC_Balkan_Security>
  59.  
  60. #define YELLOW 0xDABB3EAA
  61. #define BELA 0xFFFFFFAA
  62. #define RED 0xFF0000FF
  63. #define MAX_LEN 32
  64. #define MAX_ENTRY 120
  65. #define forum "www.balkan-rising.info"//type here your forum adress
  66. #define MAXAFK 900 // change this if you want more/less than 15 minutes (1 minute = 60 seconds | 15 minutes = 900 seconds)
  67. #error READ INSTALATION.TXT
  68.  
  69.  
  70. static reci[MAX_ENTRY][MAX_LEN];
  71.  
  72. new ime[MAX_PLAYER_NAME]; // player's name
  73. new Zastita[MAX_PLAYERS]; // protection for player
  74. new Skakuce[MAX_PLAYERS]; // how much time he has buny jumping
  75. new Pokusaji[MAX_PLAYERS];// how much time player is tried to login as rcon
  76. new Novac1[MAX_PLAYERS]; // player's money, if player have more money then it is in this variable, ac wil react
  77. new OpomenaNovca[MAX_PLAYERS]; // if he get 3 warning, player will be kicked
  78. new FlyOpomena[MAX_PLAYERS];// if it's on 1, player will get kick
  79. new Spawnovan[MAX_PLAYERS]; // help for protecting player
  80. new Float:Pozicija[MAX_PLAYERS][3]; // position on player is
  81. new Float:AutoHelti[MAX_PLAYERS]; // vehicel health
  82. new kikovan[MAX_PLAYER_NAME];
  83. new MuteIgraca[MAX_PLAYER_NAME]; // check if player is muted
  84. new IgracSpamuje[MAX_PLAYER_NAME]; // is player spamming
  85. new PrvaSpamOpomena[MAX_PLAYER_NAME]; // does player have alerdy spam warning
  86. new AFK[MAX_PLAYER_NAME]; // is player afk
  87. new AFK2[MAX_PLAYER_NAME]; // is player afk
  88. new VP = 1; // you change this ingame, over command /anticheat - too high ping (ON = 1 | OFF = 0)
  89. new PJP = 1; // you change this ingame, over command /anticheat - anti jet pack (ON = 1 | OFF = 0)
  90. new PB = 1; // you change this ingame, over command /anticheat - anti speed hack (ON = 1 | OFF = 0)
  91. new ZO = 1; // you change this ingame, over command /anticheat - bad weapons (ON = 1 | OFF = 0)
  92. new RCONZ = 1; // you change this ingame, over command /anticheat - rcon protection (ON = 1 | OFF = 0)
  93. new ZR = 1; // you change this ingame, over command /anticheat - anti swear (ON = 1 | OFF = 0)
  94. new DBP = 1; // you change this ingame, over command /anticheat - Anti Drive BY (ON = 1 | OFF = 0)
  95. new BHP = 1; // you change this ingame, over command /anticheat - anti bunny hop (ON = 1 | OFF = 0)
  96. new MPing = 700; //this is max ping, change this if you want!
  97. new Float:MBrzina = 235.0; //this is max speed, chage this if you want!
  98. new PAB = 1; // you change this ingame, over command /anticheat - anti airbrake (ON = 1 | OFF = 0)
  99. new NN = 1; // you change this ingame, over command /anticheat - anti money hack (ON = 1 | OFF = 0)
  100. new NH = 1; // you change this ingame, over command /anticheat - anti health hack (ON = 1 | OFF = 0)
  101. new NA = 1; // you change this ingame, over command /anticheat - anti armour hack (ON = 1 | OFF = 0)
  102. new NT = 1; // you change this ingame, over command /anticheat - anti interior teleport (ON = 1 | OFF = 0)
  103. new FP = 1; // you change this ingame, over command /anticheat - anti fly hack (ON = 1 | OFF = 0)
  104. new ANT = 1; // you change this ingame, over command /anticheat - anti teleport[1] (s0beit menu) (ON = 1 | OFF = 0)
  105. new ANT2 = 1; // you change this ingame, over command /anticheat - anti teleport[2] (map) (ON = 1 | OFF = 0)
  106. new AVR = 1; // you change this ingame, over command /anticheat - anti vehicle repair (ON = 1 | OFF = 0)
  107. new AS = 1; // you change this ingame, over command /anticheat - anti spam (ON = 1 | OFF = 0)
  108. new AAFK = 1; // you change this ingame, over command /anticheat -  anti afk (ON = 1 | OFF = 0)
  109. new y, m, d; new h,mi,s; new ipadresa[400]; new string2[600]; new Sekunde = 0;
  110.  
  111. forward AntiCheat();
  112. forward split(const strsrc[], strdest[][], delimiter);
  113. forward kick(playerid);
  114. forward nanula(playerid);
  115.  
  116. public OnFilterScriptInit()
  117. {
  118.     SetTimer("AntiCheat", 1000, 1); // DON'T CHANGE THIS, OR ANTICHEAT WILL NOT WORK
  119.     UcitajAC();
  120.     if(fexist("AC-BS/words.txt"))
  121.     {
  122.         new File:myFile,
  123.             line[MAX_LEN],
  124.             index=0;
  125.  
  126.         myFile=fopen("AC-BS/words.txt",filemode:io_read);
  127.  
  128.         while(fread(myFile,line,sizeof line) && (index != MAX_ENTRY))
  129.         {
  130.             if(strlen(line)>MAX_LEN) continue;
  131.             StripNewLine(line);
  132.             strmid(reci[index],line,0,strlen(line),sizeof line);
  133.             index++;
  134.         }
  135.     }
  136.     print("\n--------------------------------------");
  137.     print(" AntiCheat by: Maki187 (Marko_Dimitrijevic)");
  138.     print(" AntiCheat v0.8 R1");
  139.     print(" Balkan Rising - www.balkan-rising.info");
  140.     print(" -------------[REKLAMA]------------");
  141.     print(" Bestbalkandj.com - www.bestbalkandj.com");
  142.     print(" Serbian Warez - www.serbian-warez.in.rs");
  143.     print("--------------------------------------\n");
  144.     return 1;
  145. }
  146. public OnPlayerConnect(playerid)
  147. {
  148.     Zastita[playerid] = 1; kikovan[playerid] = 0; AFK[playerid] = 0; AFK2[playerid] = 0;
  149.     AutoHelti[playerid] = 1000; OpomenaNovca[playerid] = 0;
  150.     MuteIgraca[playerid] = 0; IgracSpamuje[playerid] = 0;
  151.     SetPVarInt(playerid, "SafeTeleport", 1); ACCREDITS PrvaSpamOpomena[playerid] = 0;
  152.     return 1;
  153. }
  154. public split(const strsrc[], strdest[][], delimiter)
  155. {
  156.     new i, li;
  157.     new aNum;
  158.     new len;
  159.     while(i <= strlen(strsrc)){
  160.         if(strsrc[i]==delimiter || i==strlen(strsrc)){
  161.             len = strmid(strdest[aNum], strsrc, li, i, 128);
  162.             strdest[aNum][len] = 0;
  163.             li = i+1;
  164.             aNum++;
  165.         }
  166.         i++;
  167.     }
  168.     return 1;
  169. }
  170. stock GetPlayerSpeed(playerid,bool:kmh) // by misco
  171. {
  172.     new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
  173.     if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
  174.     rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
  175.     return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
  176. }
  177. stock GetDistanceToPoint(playerid,Float:x2,Float:y2,Float:z2)
  178. {
  179.     new Float:dis;
  180.     new Float:x1,Float:y1,Float:z1;
  181.     if (!IsPlayerConnected(playerid)) return -1;
  182.     GetPlayerPos(playerid,x1,y1,z1);
  183.     dis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  184.     return floatround(dis);
  185. }
  186. stock KodSprunk(playerid)
  187. {
  188.     if(IsPlayerInRangeOfPoint(playerid, 4, -2420.219, 984.578, 44.297)) return 1;
  189.     else if(IsPlayerInRangeOfPoint(playerid, 4, -2420.180, 985.945, 44.297)) return 1;
  190.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2225.203, -1153.422, 1025.906)) return 1;
  191.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2576.703, -1284.430, 1061.094)) return 1;
  192.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2155.906, 1606.773, 1000.055)) return 1;
  193.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2209.906, 1607.195, 1000.055)) return 1;
  194.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2222.203, 1606.773, 1000.055)) return 1;
  195.     else if(IsPlayerInRangeOfPoint(playerid, 4, 495.969, -24.320, 1000.734)) return 1;
  196.     else if(IsPlayerInRangeOfPoint(playerid, 4, 501.828, -1.430, 1000.734)) return 1;
  197.     else if(IsPlayerInRangeOfPoint(playerid, 4, 373.828, -178.141, 1000.734)) return 1;
  198.     else if(IsPlayerInRangeOfPoint(playerid, 4, 330.680, 178.500, 1020.070)) return 1;
  199.     else if(IsPlayerInRangeOfPoint(playerid, 4, 331.922, 178.500, 1020.070)) return 1;
  200.     else if(IsPlayerInRangeOfPoint(playerid, 4, 350.906, 206.086, 1008.477)) return 1;
  201.     else if(IsPlayerInRangeOfPoint(playerid, 4, 361.563, 158.617, 1008.477)) return 1;
  202.     else if(IsPlayerInRangeOfPoint(playerid, 4, 371.594, 178.453, 1020.070)) return 1;
  203.     else if(IsPlayerInRangeOfPoint(playerid, 4, 374.891, 188.977, 1008.477)) return 1;
  204.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2155.844, 1607.875, 1000.063)) return 1;
  205.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2202.453, 1617.008, 1000.063)) return 1;
  206.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2209.242, 1621.211, 1000.063)) return 1;
  207.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2222.367, 1602.641, 1000.063)) return 1;
  208.     else if(IsPlayerInRangeOfPoint(playerid, 4, 500.563, -1.367, 1000.734)) return 1;
  209.     else if(IsPlayerInRangeOfPoint(playerid, 4, 379.039, -178.883, 1000.734)) return 1;
  210.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2480.86,-1959.27,12.9609)) return 1;
  211.     else if(IsPlayerInRangeOfPoint(playerid, 4, 1634.11,-2237.53,12.8906)) return 1;
  212.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2139.52,-1161.48,23.3594)) return 1;
  213.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2153.23,-1016.15,62.2344)) return 1;
  214.     else if(IsPlayerInRangeOfPoint(playerid, 4, -1350.12,493.859,10.5859)) return 1;
  215.     else if(IsPlayerInRangeOfPoint(playerid, 4, -2229.19,286.414,34.7031)) return 1;
  216.     else if(IsPlayerInRangeOfPoint(playerid, 4, 1659.46,1722.86,10.2188)) return 1;
  217.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2647.7,1129.66,10.2188)) return 1;
  218.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2845.73,1295.05,10.7891)) return 1;
  219.     else if(IsPlayerInRangeOfPoint(playerid, 4, 1398.84,2222.61,10.4219)) return 1;
  220.     else if(IsPlayerInRangeOfPoint(playerid, 4, -1455.12,2591.66,55.2344)) return 1;
  221.     else if(IsPlayerInRangeOfPoint(playerid, 4, -76.0312,1227.99,19.125)) return 1;
  222.     else if(IsPlayerInRangeOfPoint(playerid, 4, 662.43,-552.164,15.7109)) return 1;
  223.     else if(IsPlayerInRangeOfPoint(playerid, 4, -253.742,2599.76,62.2422)) return 1;
  224.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2271.73,-76.4609,25.9609)) return 1;
  225.     else if(IsPlayerInRangeOfPoint(playerid, 4, 1789.21,-1369.27,15.1641)) return 1;
  226.     else if(IsPlayerInRangeOfPoint(playerid, 4, 1729.79,-1943.05,12.9453)) return 1;
  227.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2060.12,-1897.64,12.9297)) return 1;
  228.     else if(IsPlayerInRangeOfPoint(playerid, 4, 1928.73,-1772.45,12.9453)) return 1;
  229.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2325.98,-1645.13,14.2109)) return 1;
  230.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2352.18,-1357.16,23.7734)) return 1;
  231.     else if(IsPlayerInRangeOfPoint(playerid, 4, 1154.73,-1460.89,15.1562)) return 1;
  232.     else if(IsPlayerInRangeOfPoint(playerid, 4, -1350.12,492.289,10.5859)) return 1;
  233.     else if(IsPlayerInRangeOfPoint(playerid, 4, -2118.97,-423.648,34.7266)) return 1;
  234.     else if(IsPlayerInRangeOfPoint(playerid, 4, -2118.62,-422.414,34.7266)) return 1;
  235.     else if(IsPlayerInRangeOfPoint(playerid, 4, -2097.27,-398.336,34.7266)) return 1;
  236.     else if(IsPlayerInRangeOfPoint(playerid, 4, -2092.09,-490.055,34.7266)) return 1;
  237.     else if(IsPlayerInRangeOfPoint(playerid, 4, -2063.27,-490.055,34.7266)) return 1;
  238.     else if(IsPlayerInRangeOfPoint(playerid, 4, -2005.65,-490.055,34.7266)) return 1;
  239.     else if(IsPlayerInRangeOfPoint(playerid, 4, -2034.46,-490.055,34.7266)) return 1;
  240.     else if(IsPlayerInRangeOfPoint(playerid, 4, -2068.56,-398.336,34.7266)) return 1;
  241.     else if(IsPlayerInRangeOfPoint(playerid, 4, -2039.85,-398.336,34.7266)) return 1;
  242.     else if(IsPlayerInRangeOfPoint(playerid, 4, -2011.14,-398.336,34.7266)) return 1;
  243.     else if(IsPlayerInRangeOfPoint(playerid, 4, -1980.79,142.664,27.0703)) return 1;
  244.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2319.99,2532.85,10.2188)) return 1;
  245.     else if(IsPlayerInRangeOfPoint(playerid, 4, 1520.15,1055.27,10.00)) return 1;
  246.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2503.14,1243.7,10.2188)) return 1;
  247.     else if(IsPlayerInRangeOfPoint(playerid, 4, 2085.77,2071.36,10.4531)) return 1;
  248.     else if(IsPlayerInRangeOfPoint(playerid, 4, -862.828,1536.61,21.9844)) return 1;
  249.     else if(IsPlayerInRangeOfPoint(playerid, 4, -14.7031,1175.36,18.9531)) return 1;
  250.     else if(IsPlayerInRangeOfPoint(playerid, 4, -253.742,2597.95,62.2422)) return 1;
  251.     else if(IsPlayerInRangeOfPoint(playerid, 4, 201.016,-107.617,0.898438)) return 1;
  252.     else if(IsPlayerInRangeOfPoint(playerid, 4, 1277.84,372.516,18.9531)) return 1;
  253.     else return 0;
  254. }
  255. //-------------------[ANTI BUNNY HOP]------------------
  256. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  257. {
  258. new string[128];
  259. GetPlayerIp(playerid, ipadresa, sizeof(ipadresa));
  260. if(BHP == 1)
  261. {
  262. if(GetPVarInt(playerid, "AdminProtect") == 0)
  263. {
  264. if((newkeys & KEY_UP && newkeys & KEY_JUMP) || (newkeys & KEY_UP && newkeys & KEY_SPRINT && newkeys & KEY_JUMP))
  265.     {
  266.             if(!IsPlayerInAnyVehicle(playerid))
  267.             {
  268.                     Skakuce[playerid] ++;
  269.                     if(Skakuce[playerid] == 30)
  270.                     {
  271.                         SendClientMessage(playerid,YELLOW, "[AC-Balkan Security]: First warning for Bunny Hop, after 4 warnings, you will be kicked!");
  272.                     }
  273.                     else if(Skakuce[playerid] == 45)
  274.                     {
  275.                         SendClientMessage(playerid,YELLOW, "[AC-Balkan Security]: First warning for Bunny Hop, after 4 warnings, you will be kicked!");
  276.                     }
  277.                     else if(Skakuce[playerid] == 65)
  278.                     {
  279.                         SendClientMessage(playerid,YELLOW, "[AC-Balkan Security]: First warning for Bunny Hop, after 4 warnings, you will be kicked!");
  280.                         SetTimerEx("nanula",180000, false, "i", playerid);
  281.                     }
  282.                     else if(Skakuce[playerid] == 80)
  283.                     {
  284.                         SendClientMessage(playerid,YELLOW, "[AC-Balkan Security]: First warning for Bunny Hop, after 4 warnings, you will be kicked!");
  285.                         SetTimerEx("nanula",180000, false, "i", playerid);
  286.                     }
  287.                     else if(Skakuce[playerid] == 100)
  288.                     {
  289.                     if(kikovan[playerid] == 0)
  290.                     {
  291.                         kikovan[playerid] = 1;
  292.                         GetPlayerName(playerid, ime, sizeof(ime));
  293.                         GetPlayerIp(playerid, ipadresa, sizeof(ipadresa));
  294.                         format(string, sizeof(string), "%s %s has been kicked for 4/4 Bunny hop warnings.",acime, ime);
  295.                         SendClientMessageToAll(RED, string);
  296.                         SendClientMessage(playerid,YELLOW, "[AC-Balkan Security]: You are kicked for 4/4 Bunny Hop warnings.");
  297.                         format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} 4/4 Bunny HOp warnings\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  298.                         ShowPlayerDialog(playerid, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "Ok");
  299.                         getdate(y,m,d);
  300.                         gettime(h,mi,s);
  301.                         format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for Bunny Hop",d,m,y,h,mi,s,ime);
  302.                         log(string);
  303.                         SetTimerEx("kick",10, false, "i", playerid);
  304.                     }
  305.                     }
  306.             }
  307.     }
  308. }
  309. }
  310. return 1;
  311. }
  312. //---------------------------[ANTI DRIVE BY]-----------------------
  313. public OnPlayerDeath(playerid, killerid, reason)
  314. {
  315.     new string[128];
  316.     if(DBP == 1)
  317.     {
  318.         if(GetPVarInt(playerid, "AdminProtect") == 0)
  319.         {
  320.             if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
  321.             {
  322.                 if(GetVehicleModel(GetPlayerVehicleID(killerid)) != 425 || GetVehicleModel(GetPlayerVehicleID(killerid)) != 520 || GetVehicleModel(GetPlayerVehicleID(killerid)) != 432)
  323.                 {
  324.                     if(kikovan[killerid] == 0)
  325.                     {
  326.                         kikovan[killerid] = 1;
  327.                         GetPlayerName(killerid, ime, sizeof(ime));
  328.                         GetPlayerIp(killerid, ipadresa, sizeof(ipadresa));
  329.                         format(string, sizeof(string), "%s %s has been kicked for DB-Drive By",acime, ime);
  330.                         SendClientMessageToAll(RED, string);
  331.                         format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Drive By\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  332.                         ShowPlayerDialog(killerid, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "Ok");
  333.                         getdate(y,m,d);
  334.                         gettime(h,mi,s);
  335.                         format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for DriveBy",d,m,y,h,mi,s,ime);
  336.                         log(string);
  337.                         SetTimerEx("kick",10, false, "i", killerid);
  338.                     }
  339.                 }
  340.             }
  341.         }
  342.     }
  343.     return 1;
  344. }
  345. //------------------------------[RCON PROTECTION]-------------------
  346. public OnRconLoginAttempt(ip[], password[], success)
  347. {
  348.     if(RCONZ == 1)
  349.     {
  350.         if(!success)
  351.         {
  352.             new p2[16]; new string[176];
  353.             foreach(Player, i)
  354.             {
  355.                 if(GetPVarInt(i, "AdminProtect") == 0)
  356.                 {
  357.                     GetPlayerIp(i, p2, sizeof(p2));
  358.                     if(!strcmp(ip, p2, true))
  359.                     {
  360.                         GetPlayerName(i, ime, sizeof(ime));
  361.                         if(Pokusaji[i] != 3)
  362.                         {
  363.                             Pokusaji[i] ++;
  364.                             SendClientMessage(i,RED, "[AC-Balkan Security]: Wrong Password ! If you type wrong password for more that 3 time, you will be baned!!");
  365.                         }
  366.                         else
  367.                         {
  368.                             if(kikovan[i] == 0)
  369.                             {
  370.                                 kikovan[i] = 1;
  371.                                 GetPlayerName(i, ime, sizeof(ime));
  372.                                 GetPlayerIp(i, ipadresa, sizeof(ipadresa));
  373.                                 format(string, sizeof(string), "%s %s has been banned because 3/3 warning for Bad RCON password",acime, ime);
  374.                                 SendClientMessageToAll(RED, string);
  375.                                 format(string2, sizeof(string2),"{CD0000}Banned!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} 3/3 RCON Warnings\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are banned for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  376.                                 ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  377.                                 getdate(y,m,d);
  378.                                 gettime(h,mi,s);
  379.                                 format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has banned %s because 3/3 RCON bad password warnings.",d,m,y,h,mi,s,ime);
  380.                                 log(string);
  381.                                 Ban(i);
  382.                             }
  383.                         }
  384.                     }
  385.                 }
  386.             }
  387.         }
  388.     }
  389.     return 1;
  390. }
  391. public OnPlayerSpawn(playerid)
  392. {
  393.     Spawnovan[playerid] = 1;
  394.     Skakuce[playerid] = 0;
  395.     Novac1[playerid] = GetPlayerMoney(playerid);
  396.     OpomenaNovca[playerid] = 0;
  397.     SetPVarInt(playerid, "SafeTeleport", 1);
  398.     SetPVarInt(playerid, "SafeInt", GetPlayerInterior(playerid));
  399.     SetPVarInt(playerid, "SafeVW", GetPlayerVirtualWorld(playerid));
  400.     return 1;
  401. }
  402.  
  403. stock SetPlayerSpawn(playerid)
  404. {
  405.     Skakuce[playerid] = 0;
  406.     OpomenaNovca[playerid] = 0;
  407.     Novac1[playerid] = GetPlayerMoney(playerid);
  408.     SetPVarInt(playerid, "SafeTeleport", 1);
  409.     SetPVarInt(playerid, "SafeInt", GetPlayerInterior(playerid));
  410.     SetPVarInt(playerid, "SafeVW", GetPlayerVirtualWorld(playerid));
  411.     return 1;
  412. }
  413. public OnPlayerText(playerid,text[])
  414. {
  415.     new string[128];
  416.     if(ZR == 1)
  417.     {
  418.         if(GetPVarInt(playerid, "AdminProtect") == 0)
  419.         {
  420.             for(new i=0; i<MAX_ENTRY; i++)
  421.             {
  422.                 if(!reci[i][0]) continue;
  423.                 Cenzura(text,reci[i]);
  424.             }
  425.         }
  426.     }
  427.     if(AS == 1)
  428.     {
  429.         if(MuteIgraca[playerid] != 0)
  430.         {
  431.             format(string, sizeof(string), "%s You can't talk, you are muted for %d seconds.",acime,MuteIgraca[playerid]);
  432.             SendClientMessage(playerid, RED, string);
  433.             return 0;
  434.         }
  435.         IgracSpamuje[playerid]++;
  436.         if(IgracSpamuje[playerid] >= 7)
  437.         {
  438.             if(PrvaSpamOpomena[playerid] == 0)
  439.             {
  440.                 PrvaSpamOpomena[playerid] = 1; IgracSpamuje[playerid] = 0;
  441.                 format(string, sizeof(string), "%s You will be muted if you don't stop with spam/",acime,MuteIgraca[playerid]);
  442.                 SendClientMessage(playerid, RED, string);
  443.                 return 1;
  444.             }
  445.             MuteIgraca[playerid] = 120; IgracSpamuje[playerid] = 0;
  446.             format(string, sizeof(string), "%s You are muted on 120 seconds for spaming",acime);
  447.             SendClientMessage(playerid, RED, string);
  448.             return 0;
  449.         }
  450.     }
  451.     return 1;
  452. }
  453. stock Letelica(carid)// here are all airplanes and vehicles what will anti speed hack ignore
  454. {
  455.     new v = GetVehicleModel(carid);
  456.     if(v == 593 || v == 592 || v == 577 || v == 553 || v == 520 || v == 519 || v == 511|| v == 460 || v == 563 || v == 548 || v == 497 || v == 488 || v == 487 || v == 469 || v == 447 || v == 417)
  457.     {
  458.         return 1;
  459.     }
  460.     return 0;
  461. }
  462. stock StripNewLine(str[])
  463. {
  464.     new l = strlen(str);
  465.     while (l-- && str[l] <= ' ') str[l] = '\0';
  466. }
  467.  
  468. stock Cenzura(string[],word[],destch='*')
  469. {
  470.     new start_index=(-1),
  471.         end_index=(-1);
  472.  
  473.     start_index=strfind(string,word,true);
  474.     if(start_index==(-1)) return false;
  475.     end_index=(start_index+strlen(word));
  476.  
  477.     for( ; start_index<end_index; start_index++)
  478.         string[start_index]=destch;
  479.  
  480.     return true;
  481. }
  482. public kick(playerid)
  483. {
  484.     ResetPlayerWeapons(playerid);
  485.     Kick(playerid);
  486.     return 1;
  487. }
  488.  
  489. public nanula(playerid)
  490. {
  491.     if(Skakuce[playerid] >= 65 && Skakuce[playerid] < 76)
  492.     {
  493.         Skakuce[playerid] = 0;
  494.     }
  495.     return 1;
  496. }
  497. stock log(string[])
  498. {
  499.     new entry[200];
  500.     format(entry, sizeof(entry), "%s\r\n",string);
  501.     new File:hFile;
  502.     hFile = fopen("AC-BS/log.log", io_append);
  503.     fwrite(hFile, entry);
  504.     fclose(hFile);
  505. }
  506. stock SnimiAC()
  507. {
  508.     new string[228];
  509.     format(string, sizeof(string), "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",VP,PJP,PB,ZO,RCONZ,ZR,DBP,BHP,PAB,NN,NH,NA,NT,FP,ANT,ANT2,AVR,AS,AAFK);
  510.     new File: file2 = fopen("AC-BS/anticheat.ini", io_write);
  511.     fwrite(file2, string);
  512.     fclose(file2);
  513.     return 1;
  514. }
  515. stock UcitajAC()
  516. {
  517.     new arrCoords[19][64];
  518.     new strFromFile2[128];
  519.     new File: file = fopen("AC-BS/anticheat.ini", io_read);
  520.     if (file)
  521.     {
  522.         fread(file, strFromFile2);
  523.         split(strFromFile2, arrCoords, ',');
  524.         VP = strval(arrCoords[0]);
  525.         PJP = strval(arrCoords[1]);
  526.         PB = strval(arrCoords[2]);
  527.         ZO = strval(arrCoords[3]);
  528.         RCONZ = strval(arrCoords[4]);
  529.         ZR = strval(arrCoords[5]);
  530.         DBP = strval(arrCoords[6]);
  531.         BHP = strval(arrCoords[7]);
  532.         PAB = strval(arrCoords[8]);
  533.         NN = strval(arrCoords[9]);
  534.         NH = strval(arrCoords[10]);
  535.         NA = strval(arrCoords[11]);
  536.         NT = strval(arrCoords[12]);
  537.         FP = strval(arrCoords[13]);
  538.         ANT = strval(arrCoords[14]);
  539.         ANT2 = strval(arrCoords[15]);
  540.         AVR  = strval(arrCoords[16]);
  541.         AS = strval(arrCoords[17]);
  542.         AAFK  = strval(arrCoords[18]);
  543.         fclose(file);
  544.     }
  545.     else
  546.     {
  547.         fopen("AC/anticheat.ini", io_write);
  548.         print("Sothing is not ok");
  549.         SnimiAC();
  550.         fclose(file);
  551.     }
  552.     return 1;
  553. }
  554. public OnPlayerStateChange(playerid, newstate, oldstate)
  555. {
  556.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  557.     {
  558.         new Float:vhelti; Zastita[playerid] = 2;
  559.         GetVehicleHealth(GetPlayerVehicleID(playerid), vhelti);
  560.         AutoHelti[playerid] = vhelti;
  561.     }
  562.     return 1;
  563. }
  564. public OnPlayerUpdate(playerid)
  565. {
  566.     if(AFK[playerid] > 2)
  567.     {
  568.         AFK[playerid] = 0;
  569.         AFK2[playerid] = 0;
  570.         return 1;
  571.     }
  572.     return 1;
  573. }
  574. //=====================[START OF ALL OTHER DETECTIONS]=====================
  575. public AntiCheat()
  576. {
  577. new string[428];
  578. foreach(Player, i)
  579. {
  580.     if(Spawnovan[i] == 1)
  581.     {
  582.         if(Zastita[i] != 0)
  583.         {
  584.             Zastita[i]++; Novac1[i] = GetPlayerMoney(i);
  585.             SetPVarInt(i, "SafeVW", GetPlayerVirtualWorld(i));
  586.             SetPVarInt(i, "SafeInt", GetPlayerInterior(i));
  587.             SetPVarInt(i, "SafeTeleport", 0);
  588.             new Float:Helti; new Float:Armor;
  589.             GetPlayerHealth(i,Helti);
  590.             SetPVarFloat(i,"SafeHealth",Helti+2);
  591.             GetPlayerArmour(i, Armor);
  592.             SetPVarFloat(i,"SafeArmour",Armor+2);
  593.             new Float:TelX; new Float:TelY; new Float:TelZ;
  594.             GetPlayerPos(i, TelX, TelY, TelZ);
  595.             Pozicija[i][0] = TelX; Pozicija[i][1] = TelY; Pozicija[i][2] = TelZ;
  596.             new Float:vhelti;
  597.             GetVehicleHealth(GetPlayerVehicleID(i), vhelti);
  598.             if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  599.             {
  600.                 AutoHelti[i] = vhelti;
  601.             }
  602.             if(Zastita[i] == 3)
  603.             {
  604.                 Zastita[i] = 0;
  605.             }
  606.         }
  607.     }
  608.     Sekunde++;
  609.     if(Sekunde == 3)
  610.     {
  611.         new Float:TelX; new Float:TelY; new Float:TelZ;
  612.         GetPlayerPos(i, TelX, TelY, TelZ);
  613.         Pozicija[i][0] = TelX;
  614.         Pozicija[i][1] = TelY;
  615.         Pozicija[i][2] = TelZ;
  616.         new Float:vhelti;
  617.         GetVehicleHealth(GetPlayerVehicleID(i), vhelti);
  618.         if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  619.         {
  620.             AutoHelti[i] = vhelti;
  621.         }
  622.         if(MuteIgraca[i] == 0)
  623.         {
  624.             IgracSpamuje[i] = 0;
  625.         }
  626.         Sekunde = 0;
  627.     }
  628.     if(MuteIgraca[i] != 0)
  629.     {
  630.         MuteIgraca[i]--;
  631.         if(PrvaSpamOpomena[i] != 0)
  632.         {
  633.             PrvaSpamOpomena[i] = 0;
  634.         }
  635.     }
  636.     //=====================[ANTI SPEED HACK]=============================
  637.     if(PB == 1)
  638.     {
  639.         if(GetPVarInt(i, "AdminProtect") == 0)
  640.         {
  641.             if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  642.             {
  643.                 new Float:X, Float:Y, Float:Z, Float:km;
  644.                 GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z);
  645.                 km = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)),  floatpower(Z, 2))), 135.0); // PROMENI ME PO POTREBI - SPEED2 (135.0)
  646.                 new Brzina2 = floatround(floatdiv(km, 0.75), floatround_floor);
  647.                 if(Brzina2 > MBrzina)
  648.                 {
  649.                     new vozilo = GetPlayerVehicleID(i);
  650.                     GetPlayerName(i, ime, sizeof(ime));
  651.                     GetPlayerIp(i, ipadresa, sizeof(ipadresa));
  652.                     if(!Letelica(vozilo) && kikovan[i] == 0)
  653.                     {
  654.                         kikovan[i] = 1;
  655.                         format(string, sizeof(string), "%s %s has been kicked for Speed Hack-a (%d km/h).",acime, ime, Brzina2);
  656.                         SendClientMessageToAll(RED, string);
  657.                         format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Speed Hack [%d km/h]\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,Brzina2,ipadresa,forum);
  658.                         ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  659.                         getdate(y,m,d);
  660.                         gettime(h,mi,s);
  661.                         format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for Speed Hack-a",d,m,y,h,mi,s,ime);
  662.                         log(string);
  663.                         SetTimerEx("kick",10, false, "i", i);
  664.                     }
  665.                 }
  666.             }
  667.         }
  668.     }
  669. //=====================[TOO HIGH PING]=====================
  670.     if(GetPVarInt(i, "AdminProtect") == 0)
  671.     {
  672.         if(VP == 0)
  673.         {
  674.             new ping = GetPlayerPing(i);
  675.             if(ping > MPing)
  676.             {
  677.                 if(Zastita[i] == 0 && kikovan[i] == 0)
  678.                 {
  679.                     kikovan[i] = 1;
  680.                     GetPlayerName(i, ime, sizeof(ime));
  681.                     GetPlayerIp(i, ipadresa, sizeof(ipadresa));
  682.                     format(string, sizeof(string), "%s %s has been kicked for Too High Ping : [%d/%d]",acime, ime,ping,MPing);
  683.                     SendClientMessageToAll(RED, string);
  684.                     format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Too High Ping [%d/%d]\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ping,MPing,ipadresa,forum);
  685.                     ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  686.                     getdate(y,m,d);
  687.                     gettime(h,mi,s);
  688.                     format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for Too High Ping [%d/%d]",d,m,y,h,mi,s,ime,ping,MPing);
  689.                     log(string);
  690.                     SetTimerEx("kick",10, false, "i", i);
  691.                 }
  692.             }
  693.         }
  694.     }
  695. //=====================[BAD WEAPON CHECK]=====================
  696.     new oruzije; new municija;
  697.     if(ZO == 1)
  698.     {
  699.         if(GetPVarInt(i, "AdminProtect") == 0)
  700.         {
  701.             for (new c = 0; c < 13; c++)
  702.             {
  703.                 GetPlayerWeaponData(i, c, oruzije, municija);
  704.                 if (oruzije != 0 && municija != 0 && kikovan[i] == 0)
  705.                 {
  706.                     new o = GetPlayerWeapon(i);
  707.                     GetPlayerName(i, ime, sizeof(ime));
  708.                     GetPlayerIp(i, ipadresa, sizeof(ipadresa));
  709.                     if(o == 1||o == 8||o == 9||o == 16||o == 17||o == 18||o == 39||o == 40||o == 35||o == 36||o == 37||o == 38) // CHANGE IF YOU WANT
  710.                     {
  711.                         new oru = GetPlayerWeapon(i); new imeoruzija[24]; kikovan[i] = 1;
  712.                         GetWeaponName(oru,imeoruzija, sizeof(imeoruzija));
  713.                         format(string, sizeof(string), "%s %s has been kicked for possession of: %s",acime,ime,imeoruzija);
  714.                         SendClientMessageToAll(RED, string);
  715.                         format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} %s\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,imeoruzija,ipadresa,forum);
  716.                         ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  717.                         getdate(y,m,d);
  718.                         gettime(h,mi,s);
  719.                         format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for possession of Bad Weapons: %s",d,m,y,h,mi,s,ime,imeoruzija);
  720.                         log(string);
  721.                         ResetPlayerWeapons(i);
  722.                         SetTimerEx("kick",10, false, "i", i);
  723.                     }
  724.                 }
  725.             }
  726.         }
  727.     }
  728. //=====================[ANTI JETPACK]=====================
  729.     if(PJP == 1)
  730.     {
  731.         if(GetPVarInt(i, "AdminProtect") == 0)
  732.         {
  733.             new jp = GetPlayerSpecialAction(i);
  734.             if (jp == SPECIAL_ACTION_USEJETPACK && kikovan[i] == 0)
  735.             {
  736.                 GetPlayerName(i, ime, sizeof(ime)); kikovan[i] = 1;
  737.                 GetPlayerIp(i, ipadresa, sizeof(ipadresa));
  738.                 format(string, sizeof(string), "%s %s je has been kicked for using JetPack",acime, ime);
  739.                 SendClientMessageToAll(RED, string);
  740.                 format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} JetPack\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  741.                 ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  742.                 getdate(y,m,d);
  743.                 gettime(h,mi,s);
  744.                 format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for using JetPack",d,m,y,h,mi,s,ime);
  745.                 log(string);
  746.                 SetTimerEx("kick",10, false, "i", i);
  747.             }
  748.         }
  749.     }
  750. //=====================[ANTI AIR BRAKE]=====================
  751.     if(PAB == 1)
  752.     {
  753.         if(GetPVarInt(i, "AdminProtect") == 0)
  754.         {
  755.             if(GetDistanceToPoint(i,Pozicija[i][0],Pozicija[i][1],Pozicija[i][2]) > 220 && Zastita[i] == 0 && GetPlayerInterior(i) == 0 && kikovan[i] == 0 && GetPVarInt(i, "SafeTeleport") == 0 && AFK2[i] == 0)
  756.             {
  757.             new ankategorija[320]; new anime[320];
  758.             GetAnimationName(GetPlayerAnimationIndex(i),ankategorija,320,anime,320);
  759.             GetPlayerName(i, ime, sizeof(ime));
  760.             GetPlayerIp(i, ipadresa, sizeof(ipadresa));
  761.             if(strcmp(anime,"RUN_PLAYER", false ) == 0 && strcmp(ankategorija,"PED", false ) == 0)
  762.             {
  763.                 format(string, sizeof(string), "%s %s has been kicked for AirBrake.",acime, ime);
  764.                 SendClientMessageToAll(RED, string); kikovan[i] = 1;
  765.                 format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} AirBrake\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  766.                 ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  767.                 getdate(y,m,d);
  768.                 gettime(h,mi,s);
  769.                 format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for AirBrake",d,m,y,h,mi,s,ime);
  770.                 log(string);
  771.                 SetTimerEx("kick",10, false, "i", i);
  772.             }
  773.             if(strcmp(anime,"WALK_PLAYER", false ) == 0 && strcmp(ankategorija,"PED", false ) == 0)
  774.             {
  775.                 format(string, sizeof(string), "%s %s has been kicked for AirBrake",acime, ime);
  776.                 SendClientMessageToAll(RED, string); kikovan[i] = 1;
  777.                 format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} AirBrake\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  778.                 ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  779.                 getdate(y,m,d);
  780.                 gettime(h,mi,s);
  781.                 format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for AirBrake",d,m,y,h,mi,s,ime);
  782.                 log(string);
  783.                 SetTimerEx("kick",10, false, "i", i);
  784.             }
  785.             }
  786.         }
  787.     }
  788. //=====================[ANTI MONEY HACK]=====================
  789.     if(NN == 1)
  790.     {
  791.         if(GetPVarInt(i, "AdminProtect") == 0)
  792.         {
  793.             new novac = GetPlayerMoney(i);
  794.             if(GetPVarInt(i, "SafeMoney") == 0 && novac > Novac1[i] && Zastita[i] == 0 && kikovan[i] == 0)
  795.             {
  796.                 GetPlayerName(i, ime, sizeof(ime));
  797.                 SendClientMessage(i,YELLOW, "[AC-Balkan Security]: Your money has been reseted on normal value, because you are using Money Cheats");
  798.                 ResetPlayerMoney (i);
  799.                 AC_BS_GivePlayerMoney (i, Novac1[i]);
  800.                 getdate(y,m,d);
  801.                 gettime(h,mi,s);
  802.                 format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has reseted %s money for using Money Hack-a",d,m,y,h,mi,s,ime);
  803.                 log(string);
  804.                 OpomenaNovca[i]++;
  805.                 if(OpomenaNovca[i] == 3)
  806.                 {
  807.                     ResetPlayerMoney (i); kikovan[i] = 1;
  808.                     AC_BS_GivePlayerMoney (i, Novac1[i]);
  809.                     GetPlayerName(i, ime, sizeof(ime));
  810.                     GetPlayerIp(i, ipadresa, sizeof(ipadresa));
  811.                     format(string, sizeof(string), "%s %s has been kicked for Money Hack-a(3/3 warnings).",acime, ime);
  812.                     SendClientMessageToAll(RED, string);
  813.                     format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} 3/3 Money Hack Warnings\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  814.                     ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  815.                     getdate(y,m,d);
  816.                     gettime(h,mi,s);
  817.                     format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for max Money Hack warnings (3x money hacking)",d,m,y,h,mi,s,ime);
  818.                     log(string);
  819.                     SetTimerEx("kick",10, false, "i", i);
  820.                 }
  821.             }
  822.             if(GetPVarInt(i, "SafeMoney") == 1)
  823.             {
  824.                 Zastita[i] = 1;
  825.                 Novac1[i] = GetPlayerMoney(i);
  826.                 SetPVarInt(i, "SafeMoney", 0);
  827.             }
  828.         }
  829.     }
  830. //=====================[ANTI HEALTH HACK]=====================
  831.     if(NH == 1)
  832.     {
  833.         if(GetPVarInt(i, "AdminProtect") == 0)
  834.         {
  835.             new Float:Helti;
  836.             GetPlayerHealth(i,Helti);
  837.             if(Helti < GetPVarFloat(i, "SafeHealth"))
  838.             {
  839.                 SetPVarFloat(i,"SafeHealth",Helti+2);
  840.             }
  841.             if(GetPVarFloat(i, "HealthProtection") == 1)
  842.             {
  843.                 Zastita[i] = 1;
  844.                 SetPVarFloat(i,"HealthProtection",0);
  845.             }
  846.             if(KodSprunk(i))
  847.             {
  848.                 SetPVarFloat(i,"SafeHealth",Helti+2);
  849.             }
  850.             if(Helti > GetPVarFloat(i, "SafeHealth") && Zastita[i] == 0 && kikovan[i] == 0 && !KodSprunk(i))
  851.             {
  852.                 GetPlayerName(i, ime, sizeof(ime)); kikovan[i] = 1;
  853.                 GetPlayerIp(i, ipadresa, sizeof(ipadresa));
  854.                 format(string, sizeof(string), "%s %s has been kicked for Health Hack.",acime, ime);
  855.                 SendClientMessageToAll(RED, string);
  856.                 format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Health Hack\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  857.                 ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  858.                 getdate(y,m,d);
  859.                 gettime(h,mi,s);
  860.                 format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for Health Hack",d,m,y,h,mi,s,ime);
  861.                 log(string);
  862.                 SetTimerEx("kick",10, false, "i", i);
  863.             }
  864.         }
  865.     }
  866. //=====================[ANTI ARMOUR HACK]================
  867.     if(NA == 1)
  868.     {
  869.         if(GetPVarInt(i, "AdminProtect") == 0)
  870.         {
  871.             new Float:Armor;
  872.             GetPlayerArmour(i, Armor);
  873.             if(Armor < GetPVarFloat(i, "SafeArmour"))
  874.             {
  875.                 SetPVarFloat(i,"SafeArmour",Armor+2);
  876.             }
  877.             if(GetPVarFloat(i, "ArmourProtection") == 1)
  878.             {
  879.                 Zastita[i] = 1;
  880.                 SetPVarFloat(i,"ArmourProtection",0);
  881.             }
  882.             if(Armor > GetPVarFloat(i, "SafeArmour") && Zastita[i] == 0 && kikovan[i] == 0)
  883.             {
  884.                 GetPlayerName(i, ime, sizeof(ime)); kikovan[i] = 1;
  885.                 GetPlayerIp(i, ipadresa, sizeof(ipadresa));
  886.                 format(string, sizeof(string), "%s %s has been kicked for Armour Hack.",acime, ime);
  887.                 SendClientMessageToAll(RED, string);
  888.                 format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Armour Hack\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  889.                 ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  890.                 getdate(y,m,d);
  891.                 gettime(h,mi,s);
  892.                 format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for Armour Hack",d,m,y,h,mi,s,ime);
  893.                 log(string);
  894.                 SetTimerEx("kick",10, false, "i", i);
  895.             }
  896.         }
  897.     }
  898. //====================[ANTI INTERIOR HACK]======================
  899.     if(NT == 1)
  900.     {
  901.         if(GetPVarInt(i, "AdminProtect") == 0)
  902.         {
  903.             if(GetPVarInt(i, "SafeTeleport") == 1)
  904.             {
  905.                 Zastita[i] = 1;
  906.                 SetPVarInt(i, "SafeVW", GetPlayerVirtualWorld(i));
  907.                 SetPVarInt(i, "SafeInt", GetPlayerInterior(i));
  908.                 SetPVarInt(i, "SafeTeleport", 0);
  909.             }
  910.             if(Zastita[i] == 0 && GetPVarInt(i, "SafeTeleport") == 0 && GetPVarInt(i, "SafeInt") != GetPlayerInterior(i))
  911.             {
  912.                 GetPlayerName(i, ime, sizeof(ime));
  913.                 GetPlayerIp(i, ipadresa, sizeof(ipadresa));
  914.                 if(kikovan[i] == 0)
  915.                 {
  916.                     kikovan[i] = 1;
  917.                     format(string, sizeof(string), "%s %s je kikovan zbog Interior Hack-a.",acime, ime);
  918.                     SendClientMessageToAll(RED, string);
  919.                     format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Interior Hack\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  920.                     ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  921.                     getdate(y,m,d);
  922.                     gettime(h,mi,s);
  923.                     format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for Interior Hack",d,m,y,h,mi,s,ime);
  924.                     log(string);
  925.                     SetTimerEx("kick",10, false, "i", i);
  926.                 }
  927.             }
  928.         }
  929.     }
  930. //=====================[ANTI FLY HACK]=====================
  931.     if(FP == 1)
  932.     {
  933.         if(GetPVarInt(i, "AdminProtect") == 0)
  934.         {
  935.             new Float:FlyPozicijaZ; new Float:FlyPozicijaY; new Float:FlyPozicijaX;
  936.             new ankategorija[320]; new anime[320]; new Float:helti2;
  937.             GetAnimationName(GetPlayerAnimationIndex(i),ankategorija,320,anime,320);
  938.             GetPlayerPos(i, FlyPozicijaX, FlyPozicijaY, FlyPozicijaZ);
  939.             GetPlayerName(i, ime, sizeof(ime)); GetPlayerHealth(i,helti2);
  940.             GetPlayerIp(i, ipadresa, sizeof(ipadresa));
  941.             if(strcmp(anime,"SWIM_CRAWL", false ) == 0 && strcmp(ankategorija,"SWIM", false ) == 0)
  942.             {
  943.                 if(!IsPlayerInAnyVehicle(i) && FlyPozicijaZ > 100 && helti2 > 2 && Zastita[i] == 0)
  944.                 {
  945.                     FlyOpomena[i] = 1;
  946.                 }
  947.             }
  948.             if(strcmp(anime,"SWIM_BREAST", false ) == 0 && strcmp(ankategorija,"SWIM", false ) == 0)
  949.             {
  950.                 if(!IsPlayerInAnyVehicle(i) && FlyPozicijaZ > 100 && helti2 > 2 && Zastita[i] == 0)
  951.                 {
  952.                     FlyOpomena[i] = 1;
  953.                 }
  954.             }
  955.             if(strcmp(anime,"SWIM_TREAD", false ) == 0 && strcmp(ankategorija,"SWIM", false ) == 0)
  956.             {
  957.                 if(!IsPlayerInAnyVehicle(i) && FlyPozicijaZ > 100 && helti2 > 2 && Zastita[i] == 0)
  958.                 {
  959.                     FlyOpomena[i] = 1;
  960.                 }
  961.             }
  962.             if(FlyOpomena[i]== 1 && kikovan[i] == 0)
  963.             {
  964.                 kikovan[i] = 1;
  965.                 format(string, sizeof(string), "%s %s has been kicked for Fly Hack",acime, ime);
  966.                 SendClientMessageToAll(RED, string);
  967.                 format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Fly Hack\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  968.                 ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  969.                 getdate(y,m,d);
  970.                 gettime(h,mi,s);
  971.                 format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for Fly Hack",d,m,y,h,mi,s,ime);
  972.                 log(string);
  973.                 FlyOpomena[i] = 0;
  974.                 SetTimerEx("kick",5, false, "i", i);
  975.             }
  976.         }
  977.     }
  978. //======================================[ANTI TELEPORT]==============================
  979.     if(ANT == 1)
  980.     {
  981.         if(GetPVarInt(i, "AdminProtect") == 0)
  982.         {
  983.             new Float:TePoZ; new Float:TePoY; new Float:TePoX;
  984.             GetPlayerPos(i, TePoX, TePoY, TePoZ);
  985.             if(GetDistanceToPoint(i,Pozicija[i][0],Pozicija[i][1],Pozicija[i][2]) > 220 && Zastita[i] == 0 && GetPlayerInterior(i) == 0 && TePoZ >= 1 && !IsPlayerInRangeOfPoint(i, 35, 131.7287,-67.8546,1.5781) && kikovan[i] == 0 && GetPVarInt(i, "SafeTeleport") == 0 && AFK2[i] == 0)
  986.             {
  987.                 new ankategorija[320]; new anime[320];
  988.                 GetAnimationName(GetPlayerAnimationIndex(i),ankategorija,320,anime,320);
  989.                 if(strcmp(anime,"FALL_FALL", false ) == 0 && strcmp(ankategorija,"PED", false ) == 0)
  990.                 {
  991.                     return 1;
  992.                 }
  993.                 if(strcmp(anime,"RUN_PLAYER", false ) == 0 && strcmp(ankategorija,"PED", false ) == 0)
  994.                 {
  995.                     return 1;
  996.                 }
  997.                 if(strcmp(anime,"WALK_PLAYER", false ) == 0 && strcmp(ankategorija,"PED", false ) == 0)
  998.                 {
  999.                     return 1;
  1000.                 }
  1001.                 if(IsPlayerInRangeOfPoint(i, 5, -1935.77, 228.79, 34.16)||IsPlayerInRangeOfPoint(i, 5, -2707.48, 218.65, 4.9)||IsPlayerInRangeOfPoint(i, 5, 2645.61, -2029.15, 14.28)||IsPlayerInRangeOfPoint(i, 5, 1041.26, -1036.77, 32.48)||
  1002.                 IsPlayerInRangeOfPoint(i, 5, 2387.55, 1035.70, 11.56)||IsPlayerInRangeOfPoint(i, 5, 1836.93, -1856.28, 14.13)||IsPlayerInRangeOfPoint(i, 5, 2006.11, 2292.87, 11.57)||IsPlayerInRangeOfPoint(i, 5, -1787.25, 1202.00, 25.84)||
  1003.                 IsPlayerInRangeOfPoint(i, 5, 720.10, -470.93, 17.07)||IsPlayerInRangeOfPoint(i, 5, -1420.21, 2599.45, 56.43)||IsPlayerInRangeOfPoint(i, 5, -100.16, 1100.79, 20.34)||IsPlayerInRangeOfPoint(i, 5, 2078.44, -1831.44, 14.13)||
  1004.                 IsPlayerInRangeOfPoint(i, 5, -2426.89, 1036.61, 51.14)||IsPlayerInRangeOfPoint(i, 5, 1957.96, 2161.96, 11.56)||IsPlayerInRangeOfPoint(i, 5, 488.29, -1724.85, 12.01)||IsPlayerInRangeOfPoint(i, 5, 1025.08, -1037.28, 32.28)||
  1005.                 IsPlayerInRangeOfPoint(i, 5, 2393.70, 1472.80, 11.42)||IsPlayerInRangeOfPoint(i, 5, -1904.97, 268.51, 41.04)||IsPlayerInRangeOfPoint(i, 5, 403.58, 2486.33, 17.23)||IsPlayerInRangeOfPoint(i, 5, 1578.24, 1245.20, 11.57)||
  1006.                 IsPlayerInRangeOfPoint(i, 5, -2105.79, 905.11, 77.07)||IsPlayerInRangeOfPoint(i, 5, 423.69, 2545.99, 17.07)||IsPlayerInRangeOfPoint(i, 5, 785.79, -513.12, 17.44)||IsPlayerInRangeOfPoint(i, 5, -2027.34, 141.02, 29.57)||
  1007.                 IsPlayerInRangeOfPoint(i, 5, 1698.10, -2095.88, 14.29)||IsPlayerInRangeOfPoint(i, 5, -361.10, 1185.23, 20.49)||IsPlayerInRangeOfPoint(i, 5, -2463.27, -124.86, 26.41)||IsPlayerInRangeOfPoint(i, 5, 2505.64, -1683.72, 14.25)||
  1008.                 IsPlayerInRangeOfPoint(i, 5, 1350.76, -615.56, 109.88)||IsPlayerInRangeOfPoint(i, 5, 2231.64, 156.93, 27.63)
  1009.                 )
  1010.                 {
  1011.                     kikovan[i] = 1;
  1012.                     format(string, sizeof(string), "%s %s has been kicked for Teleport Hack[1]",acime, ime);
  1013.                     SendClientMessageToAll(RED, string);
  1014.                     format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Teleport Hack[1]\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  1015.                     ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  1016.                     getdate(y,m,d);
  1017.                     gettime(h,mi,s);
  1018.                     format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for Teleport Hack[1]",d,m,y,h,mi,s,ime);
  1019.                     log(string);
  1020.                     SetTimerEx("kick",5, false, "i", i);
  1021.                 }
  1022.                 if(IsPlayerInRangeOfPoint(i, 5, -2695.51, 810.70, 50.57) || IsPlayerInRangeOfPoint(i, 5, 1293.61, 2529.54, 11.42)||IsPlayerInRangeOfPoint(i, 5, 1401.34, 1903.08, 11.99)||IsPlayerInRangeOfPoint(i, 5, 2436.50, 698.43, 11.60)||
  1023.                 IsPlayerInRangeOfPoint(i, 5, 322.65, -1780.30, 5.55)||IsPlayerInRangeOfPoint(i, 5, 917.46, 2012.14, 11.65)||IsPlayerInRangeOfPoint(i, 5, 1641.14, -1526.87, 14.30)||IsPlayerInRangeOfPoint(i, 5, -1617.58, 688.69, -4.50)||
  1024.                 IsPlayerInRangeOfPoint(i, 5, 837.05, -1101.93, 23.98)||IsPlayerInRangeOfPoint(i, 5, 2338.32, -1180.61, 1027.98)||IsPlayerInRangeOfPoint(i, 5, -975.5766, 1061.1312, 1345.6719)||IsPlayerInRangeOfPoint(i, 5, -750.80, 491.00, 1371.70)||
  1025.                 IsPlayerInRangeOfPoint(i, 5, -1400.2138, 106.8926, 1032.2779)||IsPlayerInRangeOfPoint(i, 5, -2015.6638, 147.2069, 29.3127)||IsPlayerInRangeOfPoint(i, 5, 2220.26, -1148.01, 1025.80)||IsPlayerInRangeOfPoint(i, 5, -2660.6185, 1426.8320, 907.3626)||
  1026.                 IsPlayerInRangeOfPoint(i, 5, -1394.20, 987.62, 1023.96)||IsPlayerInRangeOfPoint(i, 5, -1410.72, 1591.16, 1052.53)||IsPlayerInRangeOfPoint(i, 5, 315.8561, 1024.4964, 1949.7973)||IsPlayerInRangeOfPoint(i, 5, 2536.08, -1632.98, 13.79)||
  1027.                 IsPlayerInRangeOfPoint(i, 5, 1992.93, 1047.31, 10.82)||IsPlayerInRangeOfPoint(i, 5, 2033.00, -1416.02, 16.99)||IsPlayerInRangeOfPoint(i, 5, -2653.11, 634.78, 14.45)||IsPlayerInRangeOfPoint(i, 5, 1580.22, 1768.93, 10.82)||
  1028.                 IsPlayerInRangeOfPoint(i, 5, -1550.73, 99.29, 17.33)||IsPlayerInRangeOfPoint(i, 5, -2057.8000, 229.9000, 35.6204)||IsPlayerInRangeOfPoint(i, 5, -2366.0000, -1667.4000, 484.1011)||IsPlayerInRangeOfPoint(i, 5, 2503.7000, -1705.8000, 13.5480)||
  1029.                 IsPlayerInRangeOfPoint(i, 5, 1997.9000, 1056.3000, 10.8203)||IsPlayerInRangeOfPoint(i, 5, -2872.7000, 2712.6001, 275.2690)||IsPlayerInRangeOfPoint(i, 5, 904.1000, 608.0000, -32.3281)||IsPlayerInRangeOfPoint(i, 5, -236.9000, 2663.8000, 73.6513)
  1030.                 )
  1031.                 {
  1032.                     kikovan[i] = 1;
  1033.                     format(string, sizeof(string), "%s %s has been kicked for Teleport Hack[1]",acime, ime);
  1034.                     SendClientMessageToAll(RED, string);
  1035.                     format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Teleport Hack[1]\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  1036.                     ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  1037.                     getdate(y,m,d);
  1038.                     gettime(h,mi,s);
  1039.                     format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for Teleport Hack[1]",d,m,y,h,mi,s,ime);
  1040.                     log(string);
  1041.                     SetTimerEx("kick",5, false, "i", i);
  1042.                 }
  1043.                 if(ANT2 == 1)
  1044.                 {
  1045.                     kikovan[i] = 1;
  1046.                     format(string, sizeof(string), "%s %s has been kicked for Teleport Hack[2]",acime, ime);
  1047.                     SendClientMessageToAll(RED, string);
  1048.                     format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Teleport Hack[2]\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  1049.                     ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  1050.                     getdate(y,m,d);
  1051.                     gettime(h,mi,s);
  1052.                     format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for Teleport Hack[2]",d,m,y,h,mi,s,ime);
  1053.                     log(string);
  1054.                     SetTimerEx("kick",5, false, "i", i);
  1055.                 }
  1056.             }
  1057.         }
  1058.     }
  1059.     //======================[ANTI VEHICLE REPAIR]=============================
  1060.     if(AVR == 1)
  1061.     {
  1062.         if(GetPVarInt(i, "AdminProtect") == 0)
  1063.         {
  1064.             new Float:vhelti; GetVehicleHealth(GetPlayerVehicleID(i), vhelti);
  1065.             if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  1066.             {
  1067.                 if(vhelti < AutoHelti[i])
  1068.                 {
  1069.                     AutoHelti[i] = vhelti;
  1070.                 }
  1071.                 if(GetPVarInt(i, "VehicleRepair") == 1)
  1072.                 {
  1073.                     AutoHelti[i] = vhelti;
  1074.                     SetPVarInt(i, "VehicleRepair", 0);
  1075.                 }
  1076.                 if(IsPlayerInRangeOfPoint(i, 15, 719.9484,-457.3498,16.4282) || IsPlayerInRangeOfPoint(i, 15, -1420.6052,2584.6243,55.9356) || IsPlayerInRangeOfPoint(i, 15, -99.7463,1116.9677,19.8340)|| IsPlayerInRangeOfPoint(i, 15, 2063.4375,-1831.9276,13.6391)||
  1077.                     IsPlayerInRangeOfPoint(i, 15, -2425.9333,1022.5239,50.4900) || IsPlayerInRangeOfPoint(i, 15, 1974.0004,2162.5266,11.1561) || IsPlayerInRangeOfPoint(i, 15, 487.5558,-1739.5125,11.2265)|| IsPlayerInRangeOfPoint(i, 15, 1025.3940,-1024.2563,32.1938)||
  1078.                     IsPlayerInRangeOfPoint(i, 15, 2393.6174,1489.2686,10.9246)||IsPlayerInRangeOfPoint(i, 15, -1905.1163,283.4408,41.1392))
  1079.                 {
  1080.                     AutoHelti[i] = vhelti;
  1081.                     SetPVarInt(i, "VehicleRepair", 1);
  1082.                 }
  1083.                 if(vhelti > AutoHelti[i] && Zastita[i] == 0 && GetPlayerInterior(i) == 0 && kikovan[i] == 0 && GetPVarInt(i, "VehicleRepair") == 0)
  1084.                 {
  1085.                     if(!IsPlayerInRangeOfPoint(i, 15, 719.9484,-457.3498,16.4282) || !IsPlayerInRangeOfPoint(i, 15, -1420.6052,2584.6243,55.9356) || !IsPlayerInRangeOfPoint(i, 15, -99.7463,1116.9677,19.8340)|| !IsPlayerInRangeOfPoint(i, 15, 2063.4375,-1831.9276,13.6391)||
  1086.                     !IsPlayerInRangeOfPoint(i, 15, -2425.9333,1022.5239,50.4900) || !IsPlayerInRangeOfPoint(i, 15, 1974.0004,2162.5266,11.1561) || !IsPlayerInRangeOfPoint(i, 15, 487.5558,-1739.5125,11.2265)|| !IsPlayerInRangeOfPoint(i, 15, 1025.3940,-1024.2563,32.1938)||
  1087.                     !IsPlayerInRangeOfPoint(i, 15, 2393.6174,1489.2686,10.9246)||!IsPlayerInRangeOfPoint(i, 15, -1905.1163,283.4408,41.1392))
  1088.                     {
  1089.                         kikovan[i] = 1;
  1090.                         format(string, sizeof(string), "%s %s has been kicked for Vehicle Repair(Cheat)",acime, ime);
  1091.                         SendClientMessageToAll(RED, string);
  1092.                         format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Vehicle Repair\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,ipadresa,forum);
  1093.                         ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  1094.                         getdate(y,m,d);
  1095.                         gettime(h,mi,s);
  1096.                         format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for Vehicle Repair",d,m,y,h,mi,s,ime);
  1097.                         log(string);
  1098.                         SetTimerEx("kick",5, false, "i", i);
  1099.                     }
  1100.                 }
  1101.             }
  1102.         }
  1103.     }
  1104.     //==================================[ANTI AFK]=======================
  1105.     if(AAFK == 1)
  1106.     {
  1107.         if(GetPVarInt(i, "AdminProtect") == 0)
  1108.         {
  1109.             if(AFK[i] >= 13 && AFK2[i] == 0)
  1110.             {
  1111.                 AFK2[i] = 1;
  1112.             }
  1113.             if(AFK[i] > MAXAFK)
  1114.             {
  1115.                 if(kikovan[i] == 0)
  1116.                 {
  1117.                     kikovan[i] = 1;
  1118.                     format(string, sizeof(string), "%s %s has been kicked for AFK (%d minutes)",acime, ime, MAXAFK/60);
  1119.                     SendClientMessageToAll(RED, string);
  1120.                     format(string2, sizeof(string2),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} AFK (%d minutes)\n{FFF8DC}IP:{CD0000} %s\n \n{CD0000}If you think that you are kicked for no reason,\n press F8 and report mistake on forums.\n Web Site: %s",ime,MAXAFK/60,ipadresa,forum);
  1121.                     ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}[AC - Balkan Security]",string2, "Ok", "");
  1122.                     getdate(y,m,d);
  1123.                     gettime(h,mi,s);
  1124.                     format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d] [AC - Balkan Security] has kicked %s for AFK",d,m,y,h,mi,s,ime);
  1125.                     log(string);
  1126.                     SetTimerEx("kick",10, false, "i", i);
  1127.                 }
  1128.             }
  1129.         }
  1130.     }
  1131. //------[end of foreach]
  1132. }
  1133. //------[end of timer]
  1134. return 1;
  1135. }
  1136. //------------------[ANTICHEAT COMMANDS]---------------------
  1137. CMD:anticheat(playerid, params[])
  1138. {
  1139.     if(!IsPlayerAdmin(playerid))
  1140.     {
  1141.         SendClientMessage(playerid, BELA, "Nisi ovlascen da koristis ovu komandu!");
  1142.         return 1;
  1143.     }
  1144.     new string[900];
  1145.     new komande[] = "1. Turn ON/OFF: Too High Ping\n2. Turn ON/OFF: Anti JetPack-a\n3. Turn ON/OFF: Anti Speed Hack\n4. Turn ON/OFF: Bad Weapons\n5. Turn ON/OFF: Anti RCON Hack\n6. Turn ON/OFF: Anti Swear\n7. Turn ON/OFF: Anti Drive By\n8. Turn ON/OFF: Anti Bunny Hop\n9. Turn ON/OFF: Anti AirBrake\n10. Turn ON/OFF: Anti Money Hack";
  1146.     new komande2[] = "\n11. Turn ON/OFF: Anti Health Hack\n12. Turn ON/OFF: Anti Armour Hack\n13. Turn ON/OFF: Anti Interior Hack\n14. Turn ON/OFF: Anti Fly Hack\n15. Turn ON/OFF: Anti Teleport[1]\n16. Turn ON/OFF: Anti Teleport[2] \n17. Turn ON/OFF: Anti Vehicle Repair\n18. Turn ON/OFF: Anti Spam\n19. Turn ON/OFF: Anti AFK";
  1147.     format(string, sizeof(string),"%s %s",komande,komande2);
  1148.     ShowPlayerDialog(playerid, 19999, DIALOG_STYLE_LIST, "[Setting AntiCheat]",string, "Ok", "Cancle");
  1149.     return 1;
  1150. }
  1151. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1152. {
  1153.         if(dialogid == 19999)
  1154.         {
  1155.             if(response)
  1156.             {
  1157.                 if(listitem == 0) // too high ping
  1158.                 {
  1159.                 if(VP == 1)
  1160.                     {
  1161.                         SendClientMessage(playerid, BELA, "You have turned off High Ping Detection");
  1162.                         VP = 0;
  1163.                     }
  1164.                     else if(VP == 0)
  1165.                     {
  1166.                         SendClientMessage(playerid, BELA, "You have turned on High Ping Detection");
  1167.                         VP = 1;
  1168.                     }
  1169.                 }
  1170.                 else if(listitem == 1) // anti jetpack
  1171.                 {
  1172.                     if(PJP == 1)
  1173.                     {
  1174.                         SendClientMessage(playerid, BELA, "You have turned off Anti JetPack");
  1175.                         PJP = 0;
  1176.                     }
  1177.                     else if(PJP == 0)
  1178.                     {
  1179.                         SendClientMessage(playerid, BELA, "You have turned on Anti JetPack");
  1180.                         PJP = 1;
  1181.                     }
  1182.                 }
  1183.                 else if(listitem == 2)// anti speed
  1184.                 {
  1185.                     if(PB == 1)
  1186.                     {
  1187.                         SendClientMessage(playerid, BELA, "You have turned off Anti Speed Hack");
  1188.                         PB = 0;
  1189.                     }
  1190.                     else if(PB == 0)
  1191.                     {
  1192.                         SendClientMessage(playerid, BELA, "You have turned on Anti Speed Hack");
  1193.                         PB = 1;
  1194.                     }
  1195.                 }
  1196.                 else if(listitem == 3)// bad weapons
  1197.                 {
  1198.                     if(ZO == 1)
  1199.                     {
  1200.                         SendClientMessage(playerid, BELA, "You have turned off Bad Weapons Detection");
  1201.                         ZO = 0;
  1202.                     }
  1203.                     else if(ZO == 0)
  1204.                     {
  1205.                         SendClientMessage(playerid, BELA, "You have turned on Bad Weapons Detection!");
  1206.                         ZO = 1;
  1207.                     }
  1208.                 }
  1209.                 else if(listitem == 4) // rcon protection
  1210.                 {
  1211.                     if(RCONZ == 1)
  1212.                     {
  1213.                         RCONZ = 0;
  1214.                         SendClientMessage(playerid, BELA, "You have turned off Anti RCON Hack!");
  1215.                     }
  1216.                     else if(RCONZ == 0)
  1217.                     {
  1218.                         RCONZ = 1;
  1219.                         SendClientMessage(playerid, BELA, "You have turned on Atni RCON Hack");
  1220.                     }
  1221.                 }
  1222.                 else if(listitem == 5) // Anti Swear
  1223.                 {
  1224.                     if(ZR == 1)
  1225.                     {
  1226.                         ZR = 0;
  1227.                         SendClientMessage(playerid, BELA, "You have turned off Anti Swear!");
  1228.                     }
  1229.                     else if(ZR == 0)
  1230.                     {
  1231.                         ZR = 1;
  1232.                         SendClientMessage(playerid, BELA, "You have turned on Anti Swear");
  1233.                     }
  1234.                 }
  1235.                 else if(listitem == 6)// drive by
  1236.                 {
  1237.                     if(DBP == 1)
  1238.                     {
  1239.                         SendClientMessage(playerid, BELA, "You have turned off Atni Drive By!");
  1240.                         DBP = 0;
  1241.                     }
  1242.                     else if(DBP == 0)
  1243.                     {
  1244.                         SendClientMessage(playerid, BELA, "You have turned on Anti Drive By!");
  1245.                         DBP = 1;
  1246.                     }
  1247.                 }
  1248.                 else if(listitem == 7)// bunny hop
  1249.                 {
  1250.                     if(BHP == 1)
  1251.                     {
  1252.                         SendClientMessage(playerid, BELA, "You have turned off Anti Bunny Hop!");
  1253.                         BHP = 0;
  1254.                     }
  1255.                     else if(BHP == 0)
  1256.                     {
  1257.                         SendClientMessage(playerid, BELA, "You have turned on Anti Bunny Hop!");
  1258.                         BHP = 1;
  1259.                     }
  1260.                 }
  1261.                 else if(listitem == 8)// air brake
  1262.                 {
  1263.                     if(PAB == 1)
  1264.                     {
  1265.                         SendClientMessage(playerid, BELA, "You have turned off Anti AirBrake!");
  1266.                         PAB = 0;
  1267.                     }
  1268.                     else if(PAB == 0)
  1269.                     {
  1270.                         SendClientMessage(playerid, BELA, "You have turned on Anti AirBrake!");
  1271.                         PAB = 1;
  1272.                     }
  1273.                 }
  1274.                 else if(listitem == 9)// anty money
  1275.                 {
  1276.                     if(NN == 1)
  1277.                     {
  1278.                         SendClientMessage(playerid, BELA, "You have turned off Anti Money Hack!");
  1279.                         NN = 0;
  1280.                     }
  1281.                     else if(NN == 0)
  1282.                     {
  1283.                         SendClientMessage(playerid, BELA, "You have turned on Anti Money Hack!");
  1284.                         NN = 1;
  1285.                     }
  1286.                 }
  1287.                 else if(listitem == 10)// anti health
  1288.                 {
  1289.                     if(NH == 1)
  1290.                     {
  1291.                         SendClientMessage(playerid, BELA, "You have turned off Anti Health Hack!");
  1292.                         NH = 0;
  1293.                     }
  1294.                     else if(NH == 0)
  1295.                     {
  1296.                         SendClientMessage(playerid, BELA, "You have turned on Anti Health Hack!");
  1297.                         NH = 1;
  1298.                     }
  1299.                 }
  1300.                 else if(listitem == 11)// anti armour
  1301.                 {
  1302.                     if(NA == 1)
  1303.                     {
  1304.                         SendClientMessage(playerid, BELA, "You have turned off Anti Armour Hack!");
  1305.                         NA = 0;
  1306.                     }
  1307.                     else if(NA == 0)
  1308.                     {
  1309.                         SendClientMessage(playerid, BELA, "You have turned on Anti Armour Hack!");
  1310.                         NA = 1;
  1311.                     }
  1312.                 }
  1313.                 else if(listitem == 12)// anti interior teleport
  1314.                 {
  1315.                     if(NT == 1)
  1316.                     {
  1317.                         SendClientMessage(playerid, BELA, "You have turned off Anti Teleport[INT]!!!");
  1318.                         NT = 0;
  1319.                     }
  1320.                     else if(NT == 0)
  1321.                     {
  1322.                         SendClientMessage(playerid, BELA, "You have turned on Anti Teleport[INT]!!!");
  1323.                         NT = 1;
  1324.                     }
  1325.                 }
  1326.                 else if(listitem == 13)// anti fly hack
  1327.                 {
  1328.                     if(FP == 1)
  1329.                     {
  1330.                         SendClientMessage(playerid, BELA, "You have turned off Anti Fly Hack!");
  1331.                         FP = 0;
  1332.                     }
  1333.                     else if(FP == 0)
  1334.                     {
  1335.                         SendClientMessage(playerid, BELA, "You have turned on Anti Fly Hack!");
  1336.                         FP = 1;
  1337.                     }
  1338.                 }
  1339.                 else if(listitem == 14)// anti teleport[1]
  1340.                 {
  1341.                     if(ANT == 1)
  1342.                     {
  1343.                         SendClientMessage(playerid, BELA, "You have turned off Anti Teleport[1]");
  1344.                         ANT = 0;
  1345.                     }
  1346.                     else if(ANT == 0)
  1347.                     {
  1348.                         SendClientMessage(playerid, BELA, "You have turned on Anti Teleport[1]!");
  1349.                         ANT = 1;
  1350.                     }
  1351.                 }
  1352.                 else if(listitem == 15)// anti teleport[2]
  1353.                 {
  1354.                     if(ANT2 == 1)
  1355.                     {
  1356.                         SendClientMessage(playerid, BELA, "You have turned off Anti Teleport[2]");
  1357.                         ANT2 = 0;
  1358.                     }
  1359.                     else if(ANT2 == 0)
  1360.                     {
  1361.                         SendClientMessage(playerid, BELA, "You have turned on Anti Teleport[2]!");
  1362.                         ANT2 = 1;
  1363.                     }
  1364.                 }
  1365.                 else if(listitem == 16)// anti vehicle repair
  1366.                 {
  1367.                     if(AVR == 1)
  1368.                     {
  1369.                         SendClientMessage(playerid, BELA, "You have turned off Anti Vehicle Repair");
  1370.                         AVR = 0;
  1371.                     }
  1372.                     else if(AVR == 0)
  1373.                     {
  1374.                         SendClientMessage(playerid, BELA, "You have turned on Anti Vehicle Repair!");
  1375.                         AVR = 1;
  1376.                     }
  1377.                 }
  1378.                 else if(listitem == 17)// anti spam
  1379.                 {
  1380.                     if(AS == 1)
  1381.                     {
  1382.                         SendClientMessage(playerid, BELA, "You have turned off Anti Spam");
  1383.                         AS = 0;
  1384.                     }
  1385.                     else if(AS == 0)
  1386.                     {
  1387.                         SendClientMessage(playerid, BELA, "You have turned on Anti Spam!");
  1388.                         AS = 1;
  1389.                     }
  1390.                 }
  1391.                 else if(listitem == 18)// anti afk
  1392.                 {
  1393.                     if(AAFK == 1)
  1394.                     {
  1395.                         SendClientMessage(playerid, BELA, "You have turned off Anti AFK");
  1396.                         AAFK = 0;
  1397.                     }
  1398.                     else if(AAFK == 0)
  1399.                     {
  1400.                         SendClientMessage(playerid, BELA, "You have turned on Anti AFK!");
  1401.                         AAFK = 1;
  1402.                     }
  1403.                 }
  1404.             }
  1405.             SnimiAC();
  1406.         }
  1407.         return 1;
  1408. }
  1409. #error READ INSTALATION.TXT FOR SECOND TIME
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement