Advertisement
Guest User

Nex-AC

a guest
Apr 27th, 2018
586
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 243.36 KB | None | 0 0
  1. //Nex-AC by Nexius v1.9.36 (0.3.7-R2)
  2.  
  3. #if defined _nex_ac_included
  4.     #endinput
  5. #endif
  6. #define _nex_ac_included
  7.  
  8. #include <a_samp>
  9.  
  10. #if !defined OnTrailerUpdate
  11.     #error Please download SA-MP 0.3.7 R2 server package!
  12. #endif
  13.  
  14. #if !defined FILTERSCRIPT
  15.  
  16. #if !defined DEBUG
  17.     #define DEBUG
  18. #endif
  19.  
  20. #if !defined _nex_ac_lang_included
  21.     #include <nex-ac_en.lang>   //Localization
  22. #endif
  23.  
  24. #define NEX_AC_VERSION              "1.9.36"
  25. #define AC_SERVER_VERSION           "0.3.7-R2"
  26.  
  27. #if !defined AC_CONFIG_FILE
  28.     #define AC_CONFIG_FILE              "nex-ac_settings.cfg"
  29. #endif
  30.  
  31. #if !defined AC_MAX_CLASSES
  32.     #define AC_MAX_CLASSES              320
  33. #endif
  34.  
  35. #if !defined AC_DEFAULT_COLOR
  36.     #define AC_DEFAULT_COLOR            -1
  37. #endif
  38.  
  39. #if !defined AC_USE_VENDING_MACHINES
  40.     #define AC_USE_VENDING_MACHINES     true
  41. #endif
  42.  
  43. #if !defined AC_USE_TUNING_GARAGES
  44.     #define AC_USE_TUNING_GARAGES       true
  45. #endif
  46.  
  47. #if !defined AC_USE_AMMUNATIONS
  48.     #define AC_USE_AMMUNATIONS          true
  49. #endif
  50.  
  51. #if !defined AC_USE_RESTAURANTS
  52.     #define AC_USE_RESTAURANTS          true
  53. #endif
  54.  
  55. #if !defined AC_USE_PAYNSPRAY
  56.     #define AC_USE_PAYNSPRAY            true
  57. #endif
  58.  
  59. #if !defined AC_USE_CASINOS
  60.     #define AC_USE_CASINOS              true
  61. #endif
  62.  
  63. #if !defined AC_USE_QUERY
  64.     #define AC_USE_QUERY                true
  65. #endif
  66.  
  67. #if !defined AC_MAX_CONNECTS_FROM_IP
  68.     #define AC_MAX_CONNECTS_FROM_IP     1
  69. #endif
  70.  
  71. #if !defined AC_MAX_RCON_LOGIN_ATTEMPT
  72.     #define AC_MAX_RCON_LOGIN_ATTEMPT   1
  73. #endif
  74.  
  75. #if !defined AC_MAX_MSGS_REC_DIFF
  76.     #define AC_MAX_MSGS_REC_DIFF        800
  77. #endif
  78.  
  79. #if !defined AC_MAX_PING
  80.     #define AC_MAX_PING                 500
  81. #endif
  82.  
  83. #if !defined AC_MIN_TIME_RECONNECT
  84.     #define AC_MIN_TIME_RECONNECT       12      //In seconds
  85. #endif
  86.  
  87. #if !defined AC_MAX_NOP_WARNINGS
  88.     #define AC_MAX_NOP_WARNINGS         3
  89. #endif
  90.  
  91. #if !defined AC_MAX_PING_WARNINGS
  92.     #define AC_MAX_PING_WARNINGS        5
  93. #endif
  94.  
  95. #if !defined AC_MAX_AIR_WARNINGS
  96.     #define AC_MAX_AIR_WARNINGS         3
  97. #endif
  98.  
  99. #if !defined AC_MAX_AIR_VEH_WARNINGS
  100.     #define AC_MAX_AIR_VEH_WARNINGS     3
  101. #endif
  102.  
  103. #if !defined AC_MAX_FLYHACK_VEH_WARNINGS
  104.     #define AC_MAX_FLYHACK_VEH_WARNINGS 3
  105. #endif
  106.  
  107. #if !defined AC_MAX_FLYHACK_B_WARNINGS
  108.     #define AC_MAX_FLYHACK_B_WARNINGS   5
  109. #endif
  110.  
  111. #if !defined AC_MAX_CARSHOT_WARNINGS
  112.     #define AC_MAX_CARSHOT_WARNINGS     3
  113. #endif
  114.  
  115. #if !defined AC_MAX_PRO_AIM_WARNINGS
  116.     #define AC_MAX_PRO_AIM_WARNINGS     2
  117. #endif
  118.  
  119. #if !defined AC_MAX_AFK_GHOST_WARNINGS
  120.     #define AC_MAX_AFK_GHOST_WARNINGS   2
  121. #endif
  122.  
  123. #if !defined AC_MAX_RAPID_FIRE_WARNINGS
  124.     #define AC_MAX_RAPID_FIRE_WARNINGS  3
  125. #endif
  126.  
  127. #if !defined AC_MAX_GODMODE_WARNINGS
  128.     #define AC_MAX_GODMODE_WARNINGS     2
  129. #endif
  130.  
  131. #if !defined AC_MAX_GODMODE_VEH_WARNINGS
  132.     #define AC_MAX_GODMODE_VEH_WARNINGS 2
  133. #endif
  134.  
  135. #if !defined AC_MAX_SILENT_AIM_WARNINGS
  136.     #define AC_MAX_SILENT_AIM_WARNINGS  2
  137. #endif
  138.  
  139. #if !defined AC_MAX_FLYHACK_WARNINGS
  140.     #define AC_MAX_FLYHACK_WARNINGS     2
  141. #endif
  142.  
  143. #if !defined AC_MAX_SPEEDHACK_WARNINGS
  144.     #define AC_MAX_SPEEDHACK_WARNINGS   1
  145. #endif
  146.  
  147. #if !defined AC_MAX_MONEY_WARNINGS
  148.     #define AC_MAX_MONEY_WARNINGS       2
  149. #endif
  150.  
  151. #define ac_fpublic%0(%1) forward %0(%1); public %0(%1)
  152. #define ac_AbsoluteAngle(%0) floatadd(floatround(%0, floatround_floor) % 360, floatfract(%0))
  153. #define ac_abs(%0) (((%0) < 0) ? (-(%0)) : ((%0)))
  154.  
  155. //These are the default settings that will be set if no configuration file will be found
  156. //Don't change these values if you already have 'scriptfiles\nex-ac_settings.cfg'
  157. static bool:ac_ACAllow[] =
  158. {
  159.     true,   //0 Anti-AirBreak (onfoot)
  160.     true,   //1 Anti-AirBreak (in vehicle)
  161.     true,   //2 Anti-teleport hack (onfoot)
  162.     true,   //3 Anti-teleport hack (in vehicle)
  163.     true,   //4 Anti-teleport hack (into/between vehicles)
  164.     true,   //5 Anti-teleport hack (vehicle to player)
  165.     true,   //6 Anti-teleport hack (pickups)
  166.     true,   //7 Anti-FlyHack (onfoot)
  167.     true,   //8 Anti-FlyHack (in vehicle)
  168.     true,   //9 Anti-SpeedHack (onfoot)
  169.     true,   //10 Anti-SpeedHack (in vehicle)
  170.     true,   //11 Anti-Health hack (in vehicle)
  171.     true,   //12 Anti-Health hack (onfoot)
  172.     true,   //13 Anti-Armour hack
  173.     true,   //14 Anti-Money hack
  174.     true,   //15 Anti-Weapon hack
  175.     true,   //16 Anti-Ammo hack (add)
  176.     true,   //17 Anti-Ammo hack (infinite)
  177.     true,   //18 Anti-Special actions hack
  178.     true,   //19 Anti-GodMode from bullets (onfoot)
  179.     true,   //20 Anti-GodMode from bullets (in vehicle)
  180.     true,   //21 Anti-Invisible hack
  181.     true,   //22 Anti-lagcomp-spoof
  182.     true,   //23 Anti-Tuning hack
  183.     false//24 Anti-Parkour mod
  184.     true,   //25 Anti-Quick turn
  185.     true,   //26 Anti-Rapid fire
  186.     true,   //27 Anti-FakeSpawn
  187.     true,   //28 Anti-FakeKill
  188.     true,   //29 Anti-Pro Aim
  189.     true,   //30 Anti-CJ run
  190.     true,   //31 Anti-CarShot
  191.     true,   //32 Anti-CarJack
  192.     false//33 Anti-UnFreeze
  193.     true,   //34 Anti-AFK Ghost
  194.     true,   //35 Anti-Full Aiming
  195.  
  196.     false//36 Anti-Fake NPC
  197.     true,   //37 Anti-Reconnect
  198.     true,   //38 Anti-High ping
  199.     true,   //39 Anti-Dialog hack
  200.     true,   //40 Protection from the sandbox
  201.     true,   //41 Protection against an invalid version
  202.     true,   //42 Anti-Rcon hack
  203.  
  204.     true,   //43 Anti-Tuning crasher
  205.     true,   //44 Anti-Invalid seat crasher
  206.     true,   //45 Anti-Dialog crasher
  207.     true,   //46 Anti-Attached object crasher
  208.     true,   //47 Anti-Weapon Crasher
  209.  
  210.     true,   //48 Flood protection connects to one slot
  211.     true,   //49 Anti-flood callback functions
  212.     true,   //50 Anti-flood change seat
  213.  
  214.     true,   //51 Anti-Ddos
  215.  
  216.     true    //52 Anti-NOP's
  217. };
  218.  
  219. static const ac_Mtfc[][] =
  220. {
  221.     {200, 5},   //0 OnDialogResponse
  222.     {800, 2},   //1 OnEnterExitModShop
  223.     {250, 3},   //2 OnPlayerClickMap
  224.     {450, 3},   //3 OnPlayerClickPlayer
  225.     {150, 8},   //4 OnPlayerClickTextDraw
  226.     {400, 3},   //5 OnPlayerCommandText
  227.     {150, 5},   //6 OnPlayerEnterVehicle
  228.     {150, 8},   //7 OnPlayerExitVehicle
  229.     {500, 8},   //8 OnPlayerPickUpPickup
  230.     {150, 8},   //9 OnPlayerRequestClass
  231.     {250, 5},   //10 OnPlayerSelectedMenuRow
  232.     {600, 3},   //11 OnPlayerStateChange
  233.     {500, 2},   //12 OnVehicleMod
  234.     {500, 2},   //13 OnVehiclePaintjob
  235.     {500, 2},   //14 OnVehicleRespray
  236.     {300, 1},   //15 OnVehicleDeath
  237.     {450, 2},   //16 OnPlayerText
  238.     {500, 5},   //17 OnPlayerEnterCheckpoint
  239.     {500, 5},   //18 OnPlayerLeaveCheckpoint
  240.     {150, 5},   //19 OnPlayerRequestSpawn
  241.     {250, 5},   //20 OnPlayerExitedMenu
  242.     {500, 5},   //21 OnPlayerEnterRaceCheckpoint
  243.     {500, 5},   //22 OnPlayerLeaveRaceCheckpoint
  244.     {150, 8},   //23 OnPlayerClickPlayerTextDraw
  245.     {51, 9},    //24 OnVehicleDamageStatusUpdate
  246.     {150, 5},   //25 OnVehicleSirenStateChange
  247.     {150, 5},   //26 OnPlayerSelectObject
  248.     {150, 8}    //27 Cross-public
  249. },
  250.  
  251. ac_wSlot[] =
  252. {
  253.     0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10, 10, 10,
  254.     10, 8, 8, 8, 0, 0, 0, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5,
  255.     4, 6, 6, 7, 7, 7, 7, 8, 12, 9, 9, 9, 11, 11, 11
  256. },
  257.  
  258. ac_wModel[] =
  259. {
  260.     0, 331, 333, 334, 335, 336, 337, 338, 339, 341, 321, 322, 323, 324, 325,
  261.     326, 342, 343, 344, 0, 0, 345, 346, 347, 348, 349, 350, 351, 352, 353, 355, 356,
  262.     372, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 371
  263. },
  264.  
  265. ac_vType[] =
  266. {
  267.     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
  268.     0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  269.     0, 0, 0, 0, 0, 0, 3, 2, 5, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0,
  270.     1, 5, 5, 5, 0, 0, 0, 0, 5, 2, 0, 5, 3, 3, 0, 0, 1, 0, 0, 0,
  271.     0, 4, 0, 0, 3, 0, 0, 2, 2, 0, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0,
  272.     0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 1, 1, 1, 0, 0, 0, 0, 0, 1,
  273.     1, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  274.     0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
  275.     0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
  276.     0, 5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 1, 1, 0, 3, 0, 0, 0, 0,
  277.     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  278. },
  279.  
  280. #if AC_USE_TUNING_GARAGES
  281.     ac_cPrice[] =
  282.     {
  283.         400, 550, 200, 250, 100, 150, 80, 500, 500, 200, 1000, 220, 250, 100, 400,
  284.         500, 200, 500, 350, 300, 250, 200, 150, 350, 50, 1000, 480, 480, 770, 680, 370,
  285.         370, 170, 120, 790, 150, 500, 690, 190, 390, 500, 390, 1000, 500, 500, 510, 710,
  286.         670, 530, 810, 620, 670, 530, 130, 210, 230, 520, 430, 620, 720, 530, 180, 550, 430,
  287.         830, 850, 750, 250, 200, 550, 450, 550, 450, 1100, 1030, 980, 1560, 1620, 1200,
  288.         1030, 900, 1230, 820, 1560, 1350, 770, 100, 1500, 150, 650, 450, 100, 750,
  289.         350, 450, 350, 1000, 620, 1140, 1000, 940, 780, 830, 3250, 1610, 1540, 780, 780, 780,
  290.         1610, 1540, 0, 0, 3340, 3250, 2130, 2050, 2040, 780, 940, 780, 940, 780, 860,
  291.         780, 1120, 3340, 3250, 3340, 1650, 3380, 3290, 1590, 830, 800, 1500, 1000, 800,
  292.         580, 470, 870, 980, 150, 150, 100, 100, 490, 600, 890, 1000, 1090, 840, 910,
  293.         1200, 1030, 1030, 920, 930, 550, 1050, 1050, 950, 650, 450, 550, 850, 950,
  294.         850, 950, 970, 880, 990, 900, 950, 1000, 900, 1000, 900, 2050, 2150, 2130,
  295.         2050, 2130, 2040, 2150, 2040, 2095, 2175, 2080, 2200, 1200, 1040, 940, 1100
  296.     },
  297. #endif
  298.  
  299. ac_MaxPassengers[] =
  300. {
  301.     0x10331113, 0x11311131, 0x11331313, 0x80133301, 0x1381F110,
  302.     0x10311103, 0x10001F10, 0x11113311, 0x13113311, 0x31101100,
  303.     0x30002301, 0x11031311, 0x11111331, 0x10013111, 0x01131100,
  304.     0x11111110, 0x11100031, 0x11130221, 0x33113311, 0x11111101,
  305.     0x33101133, 0x10100550, 0x03133111, 0xFF11113F, 0x13330111,
  306.     0xFF131111, 0x0000FF3F
  307. },
  308.  
  309. ac_vMods[] =
  310. {
  311.     0x033C2700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x021A27FA, 0x00000000, 0x00FFFE00,
  312.     0x00000007, 0x0003C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  313.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x023B2785, 0x00000000, 0x00FFFE00,
  314.     0x00000007, 0x00000000, 0x00000000, 0x02BC4703, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  315.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  316.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  317.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x03BA278A, 0x00000000, 0x00FFFE00,
  318.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  319.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  320.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  321.     0x028E078A, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  322.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  323.     0x02310744, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  324.     0x00000007, 0x00000000, 0x00000000, 0x0228073A, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  325.     0x02BD4701, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x023A2780, 0x00000000, 0x00FFFE00,
  326.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  327.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  328.     0x00000007, 0x00000000, 0x00000000, 0x0228077A, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  329.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  330.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  331.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  332.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  333.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  334.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  335.     0x027A27CA, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  336.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  337.     0x0282278A, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  338.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  339.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  340.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  341.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  342.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  343.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  344.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  345.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  346.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  347.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  348.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  349.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  350.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  351.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  352.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  353.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  354.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  355.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  356.     0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  357.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  358.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  359.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  360.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  361.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  362.     0x00000007, 0x00000000, 0x00000000, 0x023E07C0, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  363.     0x03703730, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  364.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  365.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  366.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  367.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  368.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  369.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  370.     0x00000007, 0x00000000, 0x00000000, 0x031D2775, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  371.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02BE4788, 0x00000000, 0x00FFFE00,
  372.     0x00000007, 0x0003C000, 0x00000000, 0x02010771, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  373.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  374.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  375.     0x029A0FCE, 0x00000000, 0x00FFFE00, 0x00000007, 0x0000C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  376.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  377.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x03382700, 0x00000000, 0x00FFFE00,
  378.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  379.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  380.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  381.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  382.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  383.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  384.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  385.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  386.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  387.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  388.     0x00000007, 0x00000000, 0x00000000, 0x023F8795, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  389.     0x029F078C, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000, 0x029627EA, 0x00000000, 0x00FFFE00,
  390.     0x00000007, 0x0003C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  391.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  392.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  393.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  394.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  395.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x0236C782, 0x00000000, 0x00FFFE00,
  396.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  397.     0x029E1FCA, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  398.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  399.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  400.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0xFC000437, 0x00000000, 0x021C0000,
  401.     0x02000700, 0x00000000, 0x00FFFE00, 0x03FE6007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  402.     0x00001B87, 0x00000001, 0x01E00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  403.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  404.     0x00000007, 0x00000000, 0x00000000, 0x039E07D2, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  405.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x023CC700, 0x00000000, 0x00FFFE00,
  406.     0x00000007, 0x00030000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  407.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  408.     0x00000007, 0x00000000, 0x00000000, 0x038E07D6, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  409.     0x023D0709, 0x00000000, 0x00FFFE00, 0x00000007, 0x0000C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  410.     0x00000007, 0x00000000, 0x00000000, 0x029E1F8A, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  411.     0x029C077A, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000, 0x02BD076C, 0x00000000, 0x00FFFE00,
  412.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  413.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  414.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  415.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  416.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0xFFFFFE00, 0x00000007, 0x00000000, 0x000001F8,
  417.     0x02000700, 0x00000000, 0x00FFFFFE, 0x00000007, 0xC0000000, 0x00002007, 0xFE000700, 0x00000003, 0x00FFFE00,
  418.     0x00000007, 0x00003C00, 0x00000600, 0xCE000700, 0xFF800000, 0x00FFFE01, 0x00000007, 0x3C000000, 0x00000000,
  419.     0x02000700, 0x000003FC, 0x00FFFE00, 0x00000007, 0x003C0000, 0x00001800, 0x02000700, 0x00000000, 0x00FFFE00,
  420.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  421.     0x02000700, 0x007FE000, 0x00FFFE00, 0x00000007, 0x03C00000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  422.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000047, 0x0000003E, 0x3C000000,
  423.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  424.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  425.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  426.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  427.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00001C00, 0x00FFFE00,
  428.     0x0000000F, 0x00000000, 0x0003C000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x000003C0, 0xC0000000,
  429.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  430.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  431.     0x029607C2, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  432.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  433.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  434.     0x00000007, 0x00000000, 0x00000000, 0x03FFE7CF, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  435.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  436.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  437.     0x031727F1, 0x00000000, 0x00FFFE00, 0x00000007, 0x00030000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  438.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  439.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  440.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  441.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  442.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  443.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  444.     0x00000007, 0x00000000, 0x00000000, 0x025627F0, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  445.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  446.     0x00000007, 0x00000000, 0x00000000, 0x039E07C2, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  447.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  448.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  449.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  450.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  451.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  452.     0x00000007, 0x00000000, 0x00000000
  453. },
  454.  
  455. #if AC_USE_AMMUNATIONS
  456.     ac_AmmuNationInfo[][] =
  457.     {
  458.         {300, 5}, {0, 0}, {0, 0},
  459.         {0, 0}, {0, 0}, {0, 0},
  460.         {200, 30}, {600, 30}, {1200, 15},
  461.         {600, 15}, {800, 12}, {1000, 10},
  462.         {500, 60}, {2000, 90}, {3500, 120},
  463.         {4500, 150}, {300, 60}, {1000, 20},
  464.         {5000, 10}, {10000, 5}, {12000, 5},
  465.         {6000, 80}, {10000, 500}, {2000, 1}
  466.     },
  467.  
  468.     Float:ac_AmmuNations[][] =
  469.     {
  470.         {296.5541, -38.5138, 1001.5156},
  471.         {295.7008, -80.8109, 1001.5156},
  472.         {290.1963, -109.7721, 1001.5156},
  473.         {312.2592, -166.1385, 999.601}
  474.     },
  475. #endif
  476.  
  477. #if AC_USE_RESTAURANTS
  478.     Float:ac_Restaurants[][] =
  479.     {
  480.         {374.0, -119.641, 1001.4922},
  481.         {368.789, -6.857, 1001.8516},
  482.         {375.566, -68.222, 1001.5151}
  483.     },
  484. #endif
  485.  
  486. #if AC_USE_PAYNSPRAY
  487.     Float:ac_PayNSpray[][] =
  488.     {
  489.         {2064.2842, -1831.4736, 13.5469},
  490.         {-2425.7822, 1021.1392, 50.3977},
  491.         {-1420.5195, 2584.2305, 55.8433},
  492.         {487.6401, -1739.9479, 11.1385},
  493.         {1024.8651, -1024.087, 32.1016},
  494.         {-1904.7019, 284.5968, 41.0469},
  495.         {1975.2384, 2162.5088, 11.0703},
  496.         {2393.4456, 1491.5537, 10.5616},
  497.         {720.0854, -455.2807, 16.3359},
  498.         {-99.9417, 1117.9048, 19.7417}
  499.     },
  500. #endif
  501.  
  502. #if AC_USE_VENDING_MACHINES
  503.     Float:ac_vMachines[][] =
  504.     {
  505.         {-862.82, 1536.6, 21.98},
  506.         {2271.72, -76.46, 25.96},
  507.         {1277.83, 372.51, 18.95},
  508.         {662.42, -552.16, 15.71},
  509.         {201.01, -107.61, 0.89},
  510.         {-253.74, 2597.95, 62.24},
  511.         {-253.74, 2599.75, 62.24},
  512.         {-76.03, 1227.99, 19.12},
  513.         {-14.7, 1175.35, 18.95},
  514.         {-1455.11, 2591.66, 55.23},
  515.         {2352.17, -1357.15, 23.77},
  516.         {2325.97, -1645.13, 14.21},
  517.         {2139.51, -1161.48, 23.35},
  518.         {2153.23, -1016.14, 62.23},
  519.         {1928.73, -1772.44, 12.94},
  520.         {1154.72, -1460.89, 15.15},
  521.         {2480.85, -1959.27, 12.96},
  522.         {2060.11, -1897.64, 12.92},
  523.         {1729.78, -1943.04, 12.94},
  524.         {1634.1, -2237.53, 12.89},
  525.         {1789.21, -1369.26, 15.16},
  526.         {-2229.18, 286.41, 34.7},
  527.         {2319.99, 2532.85, 10.21},
  528.         {2845.72, 1295.04, 10.78},
  529.         {2503.14, 1243.69, 10.21},
  530.         {2647.69, 1129.66, 10.21},
  531.         {-2420.21, 984.57, 44.29},
  532.         {-2420.17, 985.94, 44.29},
  533.         {2085.77, 2071.35, 10.45},
  534.         {1398.84, 2222.6, 10.42},
  535.         {1659.46, 1722.85, 10.21},
  536.         {1520.14, 1055.26, 10.0},
  537.         {-1980.78, 142.66, 27.07},
  538.         {-2118.96, -423.64, 34.72},
  539.         {-2118.61, -422.41, 34.72},
  540.         {-2097.27, -398.33, 34.72},
  541.         {-2092.08, -490.05, 34.72},
  542.         {-2063.27, -490.05, 34.72},
  543.         {-2005.64, -490.05, 34.72},
  544.         {-2034.46, -490.05, 34.72},
  545.         {-2068.56, -398.33, 34.72},
  546.         {-2039.85, -398.33, 34.72},
  547.         {-2011.14, -398.33, 34.72},
  548.         {-1350.11, 492.28, 10.58},
  549.         {-1350.11, 493.85, 10.58},
  550.         {2222.36, 1602.64, 1000.06},
  551.         {2222.2, 1606.77, 1000.05},
  552.         {2155.9, 1606.77, 1000.05},
  553.         {2155.84, 1607.87, 1000.06},
  554.         {2209.9, 1607.19, 1000.05},
  555.         {2202.45, 1617.0, 1000.06},
  556.         {2209.24, 1621.21, 1000.06},
  557.         {2576.7, -1284.43, 1061.09},
  558.         {330.67, 178.5, 1020.07},
  559.         {331.92, 178.5, 1020.07},
  560.         {350.9, 206.08, 1008.47},
  561.         {361.56, 158.61, 1008.47},
  562.         {371.59, 178.45, 1020.07},
  563.         {374.89, 188.97, 1008.47},
  564.         {-19.03, -57.83, 1003.63},
  565.         {-36.14, -57.87, 1003.63},
  566.         {316.87, -140.35, 998.58},
  567.         {2225.2, -1153.42, 1025.9},
  568.         {-15.1, -140.22, 1003.63},
  569.         {-16.53, -140.29, 1003.63},
  570.         {-35.72, -140.22, 1003.63},
  571.         {373.82, -178.14, 1000.73},
  572.         {379.03, -178.88, 1000.73},
  573.         {495.96, -24.32, 1000.73},
  574.         {500.56, -1.36, 1000.73},
  575.         {501.82, -1.42, 1000.73},
  576.         {-33.87, -186.76, 1003.63},
  577.         {-32.44, -186.69, 1003.63},
  578.         {-16.11, -91.64, 1003.63},
  579.         {-17.54, -91.71, 1003.63}
  580.     },
  581. #endif
  582.  
  583. #if AC_USE_CASINOS
  584.     Float:ac_Casinos[][] =
  585.     {
  586.         {2241.2878, 1617.1624, 1006.1797, 2.0},
  587.         {2240.9736, 1604.6592, 1006.1797, 6.0},
  588.         {2242.5427, 1592.8726, 1006.1836, 6.0},
  589.         {2230.2124, 1592.1426, 1006.1832, 6.0},
  590.         {2230.4717, 1604.484, 1006.186, 6.0},
  591.         {2230.3298, 1616.9272, 1006.1799, 3.0},
  592.         {2251.9407, 1586.1736, 1006.186, 1.0},
  593.         {2218.6785, 1587.3448, 1006.1749, 1.0},
  594.         {2219.2773, 1591.7467, 1006.1867, 1.0},
  595.         {2218.5408, 1589.3229, 1006.184, 1.0},
  596.         {2218.6477, 1593.6279, 1006.1797, 1.0},
  597.         {2221.926, 1603.8285, 1006.1797, 1.0},
  598.         {2218.5095, 1603.8385, 1006.1797, 1.0},
  599.         {2219.9597, 1603.9216, 1006.1797, 1.0},
  600.         {2216.3054, 1603.7996, 1006.1819, 1.0},
  601.         {2218.731, 1619.8046, 1006.1794, 1.0},
  602.         {2218.9407, 1617.8413, 1006.1821, 1.0},
  603.         {2218.668, 1615.4681, 1006.1797, 1.0},
  604.         {2218.6418, 1613.2629, 1006.1797, 1.0},
  605.         {2252.4272, 1589.8412, 1006.1797, 5.0},
  606.         {2252.4229, 1596.6169, 1006.1797, 5.0},
  607.         {2255.1565, 1608.8784, 1006.186, 1.0},
  608.         {2254.8496, 1610.8605, 1006.1797, 1.0},
  609.         {2255.2917, 1612.9167, 1006.1797, 1.0},
  610.         {2255.033, 1614.8892, 1006.1797, 1.0},
  611.         {2255.1213, 1616.8284, 1006.1797, 1.0},
  612.         {2255.2161, 1618.8005, 1006.1797, 1.0},
  613.         {2268.5281, 1606.4894, 1006.1797, 1.0},
  614.         {2270.4922, 1606.8539, 1006.1797, 1.0},
  615.         {2272.5693, 1606.4473, 1006.1797, 1.0},
  616.         {2274.5391, 1607.0122, 1006.1797, 1.0},
  617.         {2271.8447, 1586.1633, 1006.1797, 1.0},
  618.         {2261.4844, 1586.1724, 1006.1797, 1.0},
  619.         {2257.4507, 1589.6555, 1006.1797, 5.0},
  620.         {2267.8994, 1589.8672, 1006.1797, 5.0},
  621.         {2262.8486, 1590.026, 1006.1797, 5.0},
  622.         {2272.6458, 1589.7704, 1006.1797, 5.0},
  623.         {2272.6533, 1596.5682, 1006.1797, 5.0},
  624.         {2270.4895, 1596.4606, 1006.1797, 5.0},
  625.         {2265.4441, 1596.4299, 1006.1797, 5.0},
  626.         {2260.0308, 1596.7987, 1006.1797, 5.0},
  627.         {2254.9907, 1596.241, 1006.1797, 5.0},
  628.         {1956.9524, 988.2533, 992.4688, 2.0},
  629.         {1961.6155, 993.0375, 992.4688, 2.0},
  630.         {1963.7998, 998.4406, 992.4745, 2.0},
  631.         {1936.2885, 987.1995, 992.4745, 2.0},
  632.         {1944.9768, 986.3937, 992.4688, 2.0},
  633.         {1940.7397, 990.9521, 992.4609, 2.0},
  634.         {1940.0966, 1005.8996, 992.4688, 6.0},
  635.         {1938.8785, 1014.1768, 992.4688, 6.0},
  636.         {1938.8811, 1021.4434, 992.4688, 6.0},
  637.         {1966.5975, 1006.6469, 992.4745, 6.0},
  638.         {1966.5979, 1014.1024, 992.4688, 6.0},
  639.         {1939.8351, 1029.912, 992.4688, 6.0},
  640.         {1956.854, 1047.3718, 992.4688, 6.0},
  641.         {1961.356, 1042.8112, 992.4688, 6.0},
  642.         {1963.811, 1037.1263, 992.4745, 6.0},
  643.         {1961.733, 1025.8929, 992.4688, 10.0},
  644.         {1961.708, 1010.3194, 992.4688, 10.0},
  645.         {1966.5989, 1029.7954, 992.4745, 6.0},
  646.         {1961.4139, 1017.8281, 992.4688, 10.0},
  647.         {1966.5985, 1021.7686, 992.4688, 6.0},
  648.         {1128.7106, -1.9779, 1000.6797, 1.0},
  649.         {1125.2388, 1.61, 1000.6797, 1.0},
  650.         {1125.1249, -5.0489, 1000.6797, 1.0},
  651.         {1127.4139, 3.0199, 1000.6797, 1.0},
  652.         {1135.0634, -3.8695, 1000.6797, 1.0},
  653.         {1135.0861, 0.6107, 1000.6797, 1.0},
  654.         {1132.8943, -1.7139, 1000.6797, 1.0},
  655.         {1125.3727, 3.0315, 1000.6797, 1.0},
  656.         {1119.0272, -1.4916, 1000.6924, 1.0}
  657.     },
  658. #endif
  659.  
  660. ac_pAmmo[] =
  661. {
  662.     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  663.     1, 1, 1, 8, 8, 8, 0, 0, 4, 30, 10, 10, 15,
  664.     10, 10, 60, 60, 80, 80, 60, 20, 10, 4, 3,
  665.     100, 500, 5, 1, 500, 500, 36, 1, 1, 1
  666. },
  667.  
  668. Float:ac_wRange[] =
  669. {
  670.     30.0, 30.0, 30.0, 40.0, 30.0, 40.0,
  671.     30.0, 40.0, 50.0, 50.0, 30.0, 60.0,
  672.     60.0, 50.0, 50.0, 4.0, 65.0
  673. };
  674.  
  675. enum acInfo
  676. {
  677.     Float:acPosX,
  678.     Float:acPosY,
  679.     Float:acPosZ,
  680.     Float:acDropJpX,
  681.     Float:acDropJpY,
  682.     Float:acDropJpZ,
  683.     Float:acSetPosX,
  684.     Float:acSetPosY,
  685.     Float:acSetPosZ,
  686.     Float:acSetVehHealth,
  687.     acSpeed,
  688.     acHealth,
  689.     acArmour,
  690.     acMoney,
  691.     acLastShot,
  692.     acLastWeapon,
  693.     acEnterVeh,
  694.     acLastVeh,
  695.     acVeh,
  696.     acSeat,
  697.     acDialog,
  698.     acNextDialog,
  699.     acInt,
  700.     acAnim,
  701.     acDmgRes,
  702.     acSpecAct,
  703.     acNextSpecAct,
  704.     acLastSpecAct,
  705.     acLastPickup,
  706.     acReloadTime,
  707.     acShotTime,
  708.     acSpawnTime,
  709.     acUpdateTime,
  710.     acEnterVehTime,
  711.     acSpawnWeapon1,
  712.     acSpawnWeapon2,
  713.     acSpawnWeapon3,
  714.     acSpawnAmmo1,
  715.     acSpawnAmmo2,
  716.     acSpawnAmmo3,
  717.     acSpawnRes,
  718.     acTimerID,
  719.     acKickTimerID,
  720.     acLogged,
  721.     acKicked,
  722.     acIp[16],
  723.     acSet[13],
  724.     acGtc[18],
  725.     acWeapon[13],
  726.     acAmmo[13],
  727.     acSetWeapon[13],
  728.     acGiveAmmo[13],
  729.     acGtcSetWeapon[13],
  730.     acGtcGiveAmmo[13],
  731.     acNOPCount[12],
  732.     acCheatCount[17],
  733.     acCall[sizeof ac_Mtfc],
  734.     acFloodCount[sizeof ac_Mtfc],
  735.     bool:acACAllow[sizeof ac_ACAllow],
  736.     bool:acStuntBonus,
  737.     bool:acModShop,
  738.     bool:acUnFrozen,
  739.     bool:acOnline,
  740.     bool:acDeathRes,
  741.     bool:acVehDmgRes,
  742.     bool:acDead,
  743.     bool:acTpToZ,
  744.     bool:acParachute,
  745.     bool:acIntEnterExits,
  746.     bool:acSpec
  747. }
  748.  
  749. enum acVehInfo
  750. {
  751.     Float:acVelX,
  752.     Float:acVelY,
  753.     Float:acVelZ,
  754.     Float:acPosDiff,
  755.     Float:acZAngle,
  756.     Float:acHealth,
  757.     acSpeedDiff,
  758.     acDriver,
  759.     acInt,
  760.     acPaintJob,
  761.     bool:acSpawned
  762. }
  763.  
  764. enum acPickInfo
  765. {
  766.     Float:acPosX,
  767.     Float:acPosY,
  768.     Float:acPosZ,
  769.     acType,
  770.     acWeapon,
  771.     bool:acIsStatic
  772. }
  773.  
  774. static
  775.     ac_sInfo[6],
  776.     ac_Class[AC_MAX_CLASSES][3][2],
  777.     ACInfo[MAX_PLAYERS][acInfo],
  778.     ACVehInfo[MAX_VEHICLES][acVehInfo],
  779.     ACPickInfo[MAX_PICKUPS][acPickInfo],
  780.     bool:ac_IntEnterExits = true,
  781.     bool:ac_StuntBonus = true,
  782.     bool:ac_VehFriendlyFire,
  783.     bool:ac_LagCompMode,
  784.     #if !AC_USE_QUERY
  785.         bool:ac_QueryEnable,
  786.     #endif
  787.     bool:ac_RconEnable,
  788.     bool:ac_PedAnims;
  789.  
  790. ac_fpublic ac_AddStaticVehicle(vehicleid)
  791. {
  792.     ACVehInfo[vehicleid][acInt] =
  793.     ACVehInfo[vehicleid][acSpeedDiff] = 0;
  794.     ACVehInfo[vehicleid][acPaintJob] = 3;
  795.     ACVehInfo[vehicleid][acSpawned] = true;
  796.     ACVehInfo[vehicleid][acHealth] = 1000.0;
  797.     ACVehInfo[vehicleid][acPosDiff] =
  798.     ACVehInfo[vehicleid][acVelX] =
  799.     ACVehInfo[vehicleid][acVelY] =
  800.     ACVehInfo[vehicleid][acVelZ] = 0.0;
  801.     ACVehInfo[vehicleid][acDriver] = INVALID_PLAYER_ID;
  802.     return 1;
  803. }
  804.  
  805. ac_fpublic ac_CreateVehicle(vehicleid, ac_vehicletype)
  806. {
  807.     ACVehInfo[vehicleid][acInt] =
  808.     ACVehInfo[vehicleid][acSpeedDiff] = 0;
  809.     ACVehInfo[vehicleid][acPaintJob] = 3;
  810.     ACVehInfo[vehicleid][acHealth] = 1000.0;
  811.     ACVehInfo[vehicleid][acPosDiff] =
  812.     ACVehInfo[vehicleid][acVelX] =
  813.     ACVehInfo[vehicleid][acVelY] =
  814.     ACVehInfo[vehicleid][acVelZ] = 0.0;
  815.     if(!(569 <= ac_vehicletype <= 570)) ACVehInfo[vehicleid][acSpawned] = true;
  816.     ACVehInfo[vehicleid][acDriver] = INVALID_PLAYER_ID;
  817.     return 1;
  818. }
  819.  
  820. ac_fpublic ac_AddPlayerClass(ac_classid, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo)
  821. {
  822.     if(ac_classid < AC_MAX_CLASSES)
  823.     {
  824.         #undef AC_MAX_CLASSES
  825.         ac_Class[ac_classid][0][0] = ac_weapon1;
  826.         ac_Class[ac_classid][0][1] = ac_weapon1_ammo;
  827.         ac_Class[ac_classid][1][0] = ac_weapon2;
  828.         ac_Class[ac_classid][1][1] = ac_weapon2_ammo;
  829.         ac_Class[ac_classid][2][0] = ac_weapon3;
  830.         ac_Class[ac_classid][2][1] = ac_weapon3_ammo;
  831.     }
  832.     return 1;
  833. }
  834.  
  835. ac_fpublic ac_SetSpawnInfo(playerid, ac_team, ac_skin, Float:ac_x, Float:ac_y, Float:ac_z, Float:ac_rotation, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo)
  836. {
  837.     if(!SetSpawnInfo(playerid, ac_team, ac_skin, ac_x, ac_y, ac_z, ac_rotation, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo)) return 0;
  838.     ACInfo[playerid][acSpawnWeapon1] = ac_weapon1;
  839.     ACInfo[playerid][acSpawnAmmo1] = ac_weapon1_ammo;
  840.     ACInfo[playerid][acSpawnWeapon2] = ac_weapon2;
  841.     ACInfo[playerid][acSpawnAmmo2] = ac_weapon2_ammo;
  842.     ACInfo[playerid][acSpawnWeapon3] = ac_weapon3;
  843.     ACInfo[playerid][acSpawnAmmo3] = ac_weapon3_ammo;
  844.     return 1;
  845. }
  846.  
  847. ac_fpublic ac_AddStaticPickup(pickupid, ac_model, ac_type, Float:ac_X, Float:ac_Y, Float:ac_Z)
  848. {
  849.     ACPickInfo[pickupid][acWeapon] = 0;
  850.     switch(ac_type)
  851.     {
  852.         case 2, 3, 15, 22:
  853.         {
  854.             switch(ac_model)
  855.             {
  856.                 case 370: ACPickInfo[pickupid][acType] = 2;
  857.                 case 1240: ACPickInfo[pickupid][acType] = 3;
  858.                 case 1242: ACPickInfo[pickupid][acType] = 4;
  859.                 case 321..326, 331, 333..339, 341..353, 355..369, 371, 372:
  860.                 {
  861.                     for(new ac_i = 46; ac_i >= 0; --ac_i)
  862.                     {
  863.                         if(ac_wModel[ac_i] == ac_model)
  864.                         {
  865.                             ACPickInfo[pickupid][acType] = 1;
  866.                             ACPickInfo[pickupid][acWeapon] = ac_i;
  867.                             break;
  868.                         }
  869.                     }
  870.                 }
  871.             }
  872.         }
  873.     }
  874.     ACPickInfo[pickupid][acIsStatic] = true;
  875.     ACPickInfo[pickupid][acPosX] = ac_X;
  876.     ACPickInfo[pickupid][acPosY] = ac_Y;
  877.     ACPickInfo[pickupid][acPosZ] = ac_Z;
  878.     return 1;
  879. }
  880.  
  881. ac_fpublic ac_CreatePickup(pickupid, ac_model, ac_type, Float:ac_X, Float:ac_Y, Float:ac_Z)
  882. {
  883.     ACPickInfo[pickupid][acWeapon] = 0;
  884.     switch(ac_type)
  885.     {
  886.         case 2, 3, 15, 22:
  887.         {
  888.             switch(ac_model)
  889.             {
  890.                 case 370: ACPickInfo[pickupid][acType] = 2;
  891.                 case 1240: ACPickInfo[pickupid][acType] = 3;
  892.                 case 1242: ACPickInfo[pickupid][acType] = 4;
  893.                 case 321..326, 331, 333..339, 341..353, 355..369, 371, 372:
  894.                 {
  895.                     for(new ac_i = 46; ac_i >= 0; --ac_i)
  896.                     {
  897.                         if(ac_wModel[ac_i] == ac_model)
  898.                         {
  899.                             ACPickInfo[pickupid][acType] = 1;
  900.                             ACPickInfo[pickupid][acWeapon] = ac_i;
  901.                             break;
  902.                         }
  903.                     }
  904.                 }
  905.             }
  906.         }
  907.     }
  908.     ACPickInfo[pickupid][acIsStatic] = false;
  909.     ACPickInfo[pickupid][acPosX] = ac_X;
  910.     ACPickInfo[pickupid][acPosY] = ac_Y;
  911.     ACPickInfo[pickupid][acPosZ] = ac_Z;
  912.     return 1;
  913. }
  914.  
  915. #if defined Streamer_SetIntData
  916.     #if defined STREAMER_ENABLE_TAGS
  917.         ac_fpublic ac_CreateDynamicPickup(STREAMER_TAG_PICKUP pickupid, ac_modelid, ac_type)
  918.     #else
  919.         ac_fpublic ac_CreateDynamicPickup(pickupid, ac_modelid, ac_type)
  920.     #endif
  921.     {
  922.         Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, 0);
  923.         switch(ac_type)
  924.         {
  925.             case 2, 3, 15, 22:
  926.             {
  927.                 switch(ac_modelid)
  928.                 {
  929.                     case 370: Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, 2);
  930.                     case 1240: Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, 3);
  931.                     case 1242: Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, 4);
  932.                     case 321..326, 331, 333..339, 341..353, 355..369, 371, 372:
  933.                     {
  934.                         for(new ac_i = 46; ac_i >= 0; --ac_i)
  935.                         {
  936.                             if(ac_wModel[ac_i] == ac_modelid)
  937.                             {
  938.                                 Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, ac_i + 100);
  939.                                 break;
  940.                             }
  941.                         }
  942.                     }
  943.                 }
  944.             }
  945.         }
  946.         return 1;
  947.     }
  948. #endif
  949.  
  950. #if defined Streamer_UpdateEx
  951.     stock ac_Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, type = -1, compensatedtime = -1, freezeplayer = 1)
  952.     {
  953.         if(!Streamer_UpdateEx(playerid, x, y, z, worldid, interiorid, type, compensatedtime, freezeplayer)) return 0;
  954.         if(compensatedtime >= 0)
  955.         {
  956.             ACInfo[playerid][acSet][8] = 4;
  957.             ACInfo[playerid][acNOPCount][10] = 0;
  958.             ACInfo[playerid][acSetPosX] = x;
  959.             ACInfo[playerid][acSetPosY] = y;
  960.             ACInfo[playerid][acSetPosZ] = z;
  961.             ACInfo[playerid][acGtc][11] = GetTickCount() + 2650;
  962.         }
  963.         return 1;
  964.     }
  965.  
  966.     #if defined _ALS_Streamer_UpdateEx
  967.         #undef Streamer_UpdateEx
  968.     #else
  969.         #define _ALS_Streamer_UpdateEx
  970.     #endif
  971.     #define Streamer_UpdateEx ac_Streamer_UpdateEx
  972. #endif
  973.  
  974. ac_fpublic ac_DestroyVehicle(vehicleid)
  975. {
  976.     if(!DestroyVehicle(vehicleid)) return 0;
  977.     ACVehInfo[vehicleid][acSpawned] = false;
  978.     return 1;
  979. }
  980.  
  981. ac_fpublic ac_DestroyPickup(pickupid)
  982. {
  983.     if(!DestroyPickup(pickupid)) return 0;
  984.     ACPickInfo[pickupid][acType] = 0;
  985.     return 1;
  986. }
  987.  
  988. ac_fpublic ac_DisableInteriorEnterExits()
  989. {
  990.     ac_IntEnterExits = false;
  991.     return DisableInteriorEnterExits();
  992. }
  993.  
  994. ac_fpublic ac_UsePlayerPedAnims()
  995. {
  996.     ac_PedAnims = true;
  997.     return UsePlayerPedAnims();
  998. }
  999.  
  1000. ac_fpublic ac_EnableVehicleFriendlyFire()
  1001. {
  1002.     ac_VehFriendlyFire = true;
  1003.     return EnableVehicleFriendlyFire();
  1004. }
  1005.  
  1006. ac_fpublic ac_EnableStuntBonusForAll(enable)
  1007. {
  1008.     ac_StuntBonus = !!enable;
  1009.     #if defined foreach
  1010.         foreach(new ac_i : Player) ACInfo[ac_i][acStuntBonus] = ac_StuntBonus;
  1011.     #else
  1012.         for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1013.         {
  1014.             if(IsPlayerConnected(ac_i)) ACInfo[ac_i][acStuntBonus] = ac_StuntBonus;
  1015.         }
  1016.     #endif
  1017.     return EnableStuntBonusForAll(enable);
  1018. }
  1019.  
  1020. ac_fpublic ac_EnableStuntBonusForPlayer(playerid, enable)
  1021. {
  1022.     if(!EnableStuntBonusForPlayer(playerid, enable)) return 0;
  1023.     ACInfo[playerid][acStuntBonus] = !!enable;
  1024.     return 1;
  1025. }
  1026.  
  1027. ac_fpublic ac_ShowPlayerDialog(playerid, ac_dialogid)
  1028. {
  1029.     ACInfo[playerid][acDialog] = ac_dialogid;
  1030.     return 1;
  1031. }
  1032.  
  1033. ac_fpublic ac_fs_ShowPlayerDialog(playerid, ac_dialogid)
  1034. {
  1035.     ACInfo[playerid][acNextDialog] = ac_dialogid;
  1036.     return 1;
  1037. }
  1038.  
  1039. ac_fpublic ac_TogglePlayerControllable(playerid, toggle)
  1040. {
  1041.     if(!TogglePlayerControllable(playerid, toggle)) return 0;
  1042.     ACInfo[playerid][acUnFrozen] = !!toggle;
  1043.     return 1;
  1044. }
  1045.  
  1046. ac_fpublic ac_TogglePlayerSpectating(playerid, toggle)
  1047. {
  1048.     if(!TogglePlayerSpectating(playerid, toggle)) return 0;
  1049.     if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING || ACInfo[playerid][acSet][6] != -1)
  1050.     {
  1051.         if(!toggle)
  1052.         {
  1053.             if(ACInfo[playerid][acDead]) ACInfo[playerid][acSet][7] = 4;
  1054.             else
  1055.             {
  1056.                 ACInfo[playerid][acSet][3] =
  1057.                 ACInfo[playerid][acSet][4] =
  1058.                 ACInfo[playerid][acSet][5] =
  1059.                 ACInfo[playerid][acSet][6] =
  1060.                 ACInfo[playerid][acSet][8] =
  1061.                 ACInfo[playerid][acSet][9] =
  1062.                 ACInfo[playerid][acNextSpecAct] = -1;
  1063.                 for(new ac_i = 12; ac_i >= 0; --ac_i)
  1064.                 {
  1065.                     ACInfo[playerid][acSetWeapon][ac_i] = -1;
  1066.                     ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  1067.                 }
  1068.                 ACInfo[playerid][acUnFrozen] = true;
  1069.                 ACInfo[playerid][acTpToZ] = false;
  1070.                 ACInfo[playerid][acSet][7] = 1;
  1071.             }
  1072.             ACInfo[playerid][acSpawnRes]++;
  1073.             ACInfo[playerid][acSpec] = false;
  1074.             ACInfo[playerid][acSpawnTime] = ACInfo[playerid][acNOPCount][9] = 0;
  1075.             ACInfo[playerid][acGtc][13] = GetTickCount() + 500;
  1076.         }
  1077.     }
  1078.     else if(toggle)
  1079.     {
  1080.         ACInfo[playerid][acSet][6] = 1;
  1081.         ACInfo[playerid][acNOPCount][8] = 0;
  1082.         ACInfo[playerid][acGtc][12] = GetTickCount() + 500;
  1083.     }
  1084.     return 1;
  1085. }
  1086.  
  1087. ac_fpublic ac_SpawnPlayer(playerid)
  1088. {
  1089.     if(!SpawnPlayer(playerid)) return 0;
  1090.     if(ACInfo[playerid][acDead]) ACInfo[playerid][acSet][7] = 5;
  1091.     else
  1092.     {
  1093.         ACInfo[playerid][acSet][3] =
  1094.         ACInfo[playerid][acSet][4] =
  1095.         ACInfo[playerid][acSet][5] =
  1096.         ACInfo[playerid][acSet][8] =
  1097.         ACInfo[playerid][acSet][9] =
  1098.         ACInfo[playerid][acNextSpecAct] = -1;
  1099.         for(new ac_i = 12; ac_i >= 0; --ac_i)
  1100.         {
  1101.             ACInfo[playerid][acSetWeapon][ac_i] = -1;
  1102.             ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  1103.         }
  1104.         ACInfo[playerid][acTpToZ] = false;
  1105.         ACInfo[playerid][acUnFrozen] = true;
  1106.         ACInfo[playerid][acSet][7] = 2;
  1107.     }
  1108.     ACInfo[playerid][acSpawnRes]++;
  1109.     ACInfo[playerid][acSpawnTime] = ACInfo[playerid][acNOPCount][9] = 0;
  1110.     ACInfo[playerid][acGtc][13] = GetTickCount() + 500;
  1111.     return 1;
  1112. }
  1113.  
  1114. ac_fpublic ac_SetPlayerHealth(playerid, Float:ac_health)
  1115. {
  1116.     if(!SetPlayerHealth(playerid, ac_health)) return 0;
  1117.     if(floatcmp(ac_health, 0.0) == -1) ac_health = 0.0;
  1118.     ACInfo[playerid][acNOPCount][3] = 0;
  1119.     ACInfo[playerid][acSet][1] = floatround(ac_health, floatround_tozero);
  1120.     ACInfo[playerid][acGtc][3] = GetTickCount() + 500;
  1121.     return 1;
  1122. }
  1123.  
  1124. ac_fpublic ac_SetPlayerArmour(playerid, Float:ac_armour)
  1125. {
  1126.     if(!SetPlayerArmour(playerid, ac_armour)) return 0;
  1127.     if(floatcmp(ac_armour, 0.0) == -1) ac_armour = 0.0;
  1128.     ACInfo[playerid][acNOPCount][5] = 0;
  1129.     ACInfo[playerid][acSet][2] = floatround(ac_armour, floatround_tozero);
  1130.     ACInfo[playerid][acGtc][5] = GetTickCount() + 500;
  1131.     return 1;
  1132. }
  1133.  
  1134. ac_fpublic ac_GivePlayerWeapon(playerid, ac_weaponid, ac_ammo)
  1135. {
  1136.     if(0 <= ac_weaponid <= 18 || 22 <= ac_weaponid <= 46)
  1137.     {
  1138.         new ac_s = ac_wSlot[ac_weaponid];
  1139.         ACInfo[playerid][acNOPCount][0] = ACInfo[playerid][acNOPCount][1] = 0;
  1140.         if(16 <= ac_weaponid <= 18 || 22 <= ac_weaponid <= 43)
  1141.         {
  1142.             if(3 <= ac_s <= 5 || (ACInfo[playerid][acSetWeapon][ac_s] == -1
  1143.             ? ACInfo[playerid][acWeapon][ac_s] : ACInfo[playerid][acSetWeapon][ac_s]) == ac_weaponid)
  1144.             {
  1145.                 ACInfo[playerid][acGiveAmmo][ac_s] =
  1146.                 (ACInfo[playerid][acGiveAmmo][ac_s] == -65535 ? ACInfo[playerid][acAmmo][ac_s]
  1147.                 : ACInfo[playerid][acGiveAmmo][ac_s]) + ac_ammo;
  1148.             }
  1149.             else ACInfo[playerid][acGiveAmmo][ac_s] = ac_ammo;
  1150.             if(ACInfo[playerid][acGiveAmmo][ac_s] < -32768) ac_ammo = ACInfo[playerid][acGiveAmmo][ac_s] = -32768;
  1151.             else if(ACInfo[playerid][acGiveAmmo][ac_s] > 32767) ac_ammo = ACInfo[playerid][acGiveAmmo][ac_s] = 32767;
  1152.             ACInfo[playerid][acSetWeapon][ac_s] = ACInfo[playerid][acSet][3] = ac_weaponid;
  1153.             ACInfo[playerid][acReloadTime] = 0;
  1154.         }
  1155.         else
  1156.         {
  1157.             ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  1158.             ACInfo[playerid][acSetWeapon][ac_s] = ACInfo[playerid][acSet][3] = ac_weaponid;
  1159.         }
  1160.         ACInfo[playerid][acGtcGiveAmmo][ac_s] =
  1161.         ACInfo[playerid][acGtcSetWeapon][ac_s] = ACInfo[playerid][acGtc][2] = GetTickCount() + 1650;
  1162.     }
  1163.     return GivePlayerWeapon(playerid, ac_weaponid, ac_ammo);
  1164. }
  1165.  
  1166. ac_fpublic ac_SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo)
  1167. {
  1168.     if(ac_ammo < -32768) ac_ammo = -32768;
  1169.     else if(ac_ammo > 32767) ac_ammo = 32767;
  1170.     if(16 <= ac_weaponslot <= 43)
  1171.     {
  1172.         new ac_s = ac_wSlot[ac_weaponslot];
  1173.         if(ACInfo[playerid][acWeapon][ac_s] > 0 || ACInfo[playerid][acSetWeapon][ac_s] > 0)
  1174.         {
  1175.             ACInfo[playerid][acNOPCount][1] = 0;
  1176.             ACInfo[playerid][acGiveAmmo][ac_s] = ac_ammo;
  1177.             ACInfo[playerid][acGtcGiveAmmo][ac_s] = GetTickCount() + 500;
  1178.         }
  1179.     }
  1180.     return SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo);
  1181. }
  1182.  
  1183. ac_fpublic ac_SetPlayerArmedWeapon(playerid, ac_weaponid)
  1184. {
  1185.     if(!SetPlayerArmedWeapon(playerid, ac_weaponid)) return 0;
  1186.     if(0 <= ac_weaponid <= 18 || 22 <= ac_weaponid <= 46)
  1187.     {
  1188.         new ac_s = ac_wSlot[ac_weaponid];
  1189.         if((ac_weaponid == ACInfo[playerid][acWeapon][ac_s] || ac_weaponid == ACInfo[playerid][acSetWeapon][ac_s]) &&
  1190.         (ACInfo[playerid][acAmmo][ac_s] != 0 || ACInfo[playerid][acGiveAmmo][ac_s] != 0))
  1191.         {
  1192.             ACInfo[playerid][acNOPCount][0] = 0;
  1193.             ACInfo[playerid][acSet][3] = ac_weaponid;
  1194.             ACInfo[playerid][acGtc][2] = GetTickCount() + 1650;
  1195.         }
  1196.     }
  1197.     return 1;
  1198. }
  1199.  
  1200. ac_fpublic ac_ResetPlayerWeapons(playerid)
  1201. {
  1202.     if(!ResetPlayerWeapons(playerid)) return 0;
  1203.     for(new ac_i = 12; ac_i >= 0; --ac_i)
  1204.     {
  1205.         ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acAmmo][ac_i] = 0;
  1206.         ACInfo[playerid][acSetWeapon][ac_i] = -1;
  1207.         ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  1208.     }
  1209.     ACInfo[playerid][acSet][3] = -1;
  1210.     ACInfo[playerid][acGtc][7] = GetTickCount() + 300;
  1211.     return 1;
  1212. }
  1213.  
  1214. ac_fpublic ac_GivePlayerMoney(playerid, ac_money)
  1215. {
  1216.     if(!GivePlayerMoney(playerid, ac_money)) return 0;
  1217.     ACInfo[playerid][acNOPCount][11] = AC_MAX_MONEY_WARNINGS;
  1218.     ACInfo[playerid][acMoney] += ac_money;
  1219.     #undef AC_MAX_MONEY_WARNINGS
  1220.     return 1;
  1221. }
  1222.  
  1223. ac_fpublic ac_ResetPlayerMoney(playerid)
  1224. {
  1225.     if(!ResetPlayerMoney(playerid)) return 0;
  1226.     ACInfo[playerid][acNOPCount][11] = 0;
  1227.     ACInfo[playerid][acMoney] = 0;
  1228.     return 1;
  1229. }
  1230.  
  1231. static bad_GetPlayerMoney(playerid) return GetPlayerMoney(playerid);
  1232.  
  1233. ac_fpublic ac_SetPlayerSpecialAction(playerid, ac_actionid)
  1234. {
  1235.     if(!SetPlayerSpecialAction(playerid, ac_actionid)) return 0;
  1236.     if(ac_actionid == SPECIAL_ACTION_USEJETPACK || SPECIAL_ACTION_CUFFED <= ac_actionid <= SPECIAL_ACTION_CARRY ||
  1237.     (ac_actionid == SPECIAL_ACTION_USECELLPHONE || ac_actionid == 68 || SPECIAL_ACTION_DANCE1 <= ac_actionid <= SPECIAL_ACTION_DANCE4) && ACInfo[playerid][acVeh] == 0 ||
  1238.     ac_actionid == SPECIAL_ACTION_STOPUSECELLPHONE && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_USECELLPHONE ||
  1239.     (ac_actionid == SPECIAL_ACTION_HANDSUP || SPECIAL_ACTION_DRINK_BEER <= ac_actionid <= SPECIAL_ACTION_DRINK_SPRUNK) && ACInfo[playerid][acSpecAct] != SPECIAL_ACTION_ENTER_VEHICLE && ACInfo[playerid][acVeh] == 0 ||
  1240.     ac_actionid == SPECIAL_ACTION_NONE && ACInfo[playerid][acSpecAct] != SPECIAL_ACTION_DUCK &&
  1241.     ACInfo[playerid][acSpecAct] != SPECIAL_ACTION_ENTER_VEHICLE && ACInfo[playerid][acSpecAct] != SPECIAL_ACTION_HANDSUP)
  1242.     {
  1243.         ACInfo[playerid][acNOPCount][6] = 0;
  1244.         if((ac_actionid == 68 || SPECIAL_ACTION_HANDSUP <= ac_actionid <= SPECIAL_ACTION_USECELLPHONE ||
  1245.         SPECIAL_ACTION_DRINK_BEER <= ac_actionid <= SPECIAL_ACTION_CARRY) && SPECIAL_ACTION_DANCE1 <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_DANCE4 ||
  1246.         SPECIAL_ACTION_DRINK_BEER <= ac_actionid <= SPECIAL_ACTION_CARRY && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_DUCK ||
  1247.         (ac_actionid == SPECIAL_ACTION_NONE || SPECIAL_ACTION_CUFFED <= ac_actionid <= SPECIAL_ACTION_CARRY) && ACInfo[playerid][acVeh] ||
  1248.         SPECIAL_ACTION_CUFFED <= ac_actionid <= SPECIAL_ACTION_CARRY && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_ENTER_VEHICLE) ACInfo[playerid][acNextSpecAct] = ac_actionid;
  1249.         else
  1250.         {
  1251.             if(ac_actionid == SPECIAL_ACTION_STOPUSECELLPHONE) ac_actionid = SPECIAL_ACTION_NONE;
  1252.             else if(ac_actionid == SPECIAL_ACTION_USEJETPACK || ac_actionid == SPECIAL_ACTION_HANDSUP ||
  1253.             SPECIAL_ACTION_DANCE1 <= ac_actionid <= SPECIAL_ACTION_DANCE4) ACInfo[playerid][acNextSpecAct] = ACInfo[playerid][acSpecAct];
  1254.             else ACInfo[playerid][acNextSpecAct] = -1;
  1255.             ACInfo[playerid][acSet][4] = ac_actionid;
  1256.             ACInfo[playerid][acGtc][6] = GetTickCount() + 2650;
  1257.         }
  1258.     }
  1259.     return 1;
  1260. }
  1261.  
  1262. ac_fpublic ac_SetPlayerInterior(playerid, ac_interiorid)
  1263. {
  1264.     if(!SetPlayerInterior(playerid, ac_interiorid)) return 0;
  1265.     ACInfo[playerid][acNOPCount][2] = 0;
  1266.     ACInfo[playerid][acSet][0] = ac_interiorid % 256;
  1267.     ACInfo[playerid][acGtc][0] = GetTickCount() + 1650;
  1268.     return 1;
  1269. }
  1270.  
  1271. ac_fpublic ac_SetPlayerPos(playerid, Float:ac_x, Float:ac_y, Float:ac_z)
  1272. {
  1273.     if(!SetPlayerPos(playerid, ac_x, ac_y, ac_z)) return 0;
  1274.     ACInfo[playerid][acSet][8] = 1;
  1275.     ACInfo[playerid][acNOPCount][10] = 0;
  1276.     ACInfo[playerid][acSetPosX] = ac_x;
  1277.     ACInfo[playerid][acSetPosY] = ac_y;
  1278.     ACInfo[playerid][acSetPosZ] = ac_z;
  1279.     ACInfo[playerid][acGtc][11] = GetTickCount() + 2650;
  1280.     return 1;
  1281. }
  1282.  
  1283. ac_fpublic ac_SetPlayerPosFindZ(playerid, Float:ac_x, Float:ac_y, Float:ac_z)
  1284. {
  1285.     if(!SetPlayerPosFindZ(playerid, ac_x, ac_y, ac_z)) return 0;
  1286.     ACInfo[playerid][acSet][8] = 2;
  1287.     ACInfo[playerid][acTpToZ] = true;
  1288.     ACInfo[playerid][acNOPCount][10] = 0;
  1289.     ACInfo[playerid][acSetPosX] = ac_x;
  1290.     ACInfo[playerid][acSetPosY] = ac_y;
  1291.     ACInfo[playerid][acGtc][11] = GetTickCount() + 2650;
  1292.     return 1;
  1293. }
  1294.  
  1295. ac_fpublic ac_SetPlayerVelocity(playerid, Float:ac_X, Float:ac_Y, Float:ac_Z)
  1296. {
  1297.     if(!SetPlayerVelocity(playerid, ac_X, ac_Y, ac_Z)) return 0;
  1298.     ACInfo[playerid][acSpeed] = ac_GetSpeed3D(ac_X, ac_Y, ac_Z);
  1299.     ACInfo[playerid][acGtc][10] = GetTickCount() + 300;
  1300.     return 1;
  1301. }
  1302.  
  1303. ac_fpublic ac_PutPlayerInVehicle(playerid, ac_vehicleid, ac_seatid)
  1304. {
  1305.     if(!PutPlayerInVehicle(playerid, ac_vehicleid, ac_seatid)) return 0;
  1306.     if(!(SPECIAL_ACTION_DANCE1 <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_DANCE4) &&
  1307.     !(SPECIAL_ACTION_DRINK_BEER <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_DRINK_SPRUNK) &&
  1308.     GetPlayerVirtualWorld(playerid) == GetVehicleVirtualWorld(ac_vehicleid))
  1309.     {
  1310.         new ac_model = GetVehicleModel(ac_vehicleid) - 400;
  1311.         ACInfo[playerid][acNOPCount][7] = 0;
  1312.         ACInfo[playerid][acSet][9] = ac_vehicleid;
  1313.         if(ac_model == 31 || ac_model == 37 || ac_IsVehicleSeatOccupied(ac_vehicleid, ac_seatid) ||
  1314.         ac_seatid > ac_MaxPassengers[ac_model >>> 3] >>> ((ac_model & 7) << 2) & 0xF) ACInfo[playerid][acSet][5] = -1;
  1315.         else ACInfo[playerid][acSet][5] = ac_seatid;
  1316.         ACInfo[playerid][acGtc][1] = GetTickCount() + 800;
  1317.     }
  1318.     return 1;
  1319. }
  1320.  
  1321. ac_fpublic ac_RemovePlayerFromVehicle(playerid)
  1322. {
  1323.     if(!RemovePlayerFromVehicle(playerid)) return 0;
  1324.     ACInfo[playerid][acSet][11] = 1;
  1325.     ACInfo[playerid][acGtc][8] = GetTickCount() + 3150;
  1326.     return 1;
  1327. }
  1328.  
  1329. ac_fpublic ac_SetVehiclePos(vehicleid, Float:ac_x, Float:ac_y, Float:ac_z)
  1330. {
  1331.     if(!SetVehiclePos(vehicleid, ac_x, ac_y, ac_z)) return 0;
  1332.     ACVehInfo[vehicleid][acVelX] = ACVehInfo[vehicleid][acVelY] = ACVehInfo[vehicleid][acVelZ] = 0.0;
  1333.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1334.     if(ac_driver != INVALID_PLAYER_ID)
  1335.     {
  1336.         ACInfo[ac_driver][acSet][8] = 3;
  1337.         ACInfo[ac_driver][acNOPCount][10] = 0;
  1338.         ACInfo[ac_driver][acSetPosX] = ac_x;
  1339.         ACInfo[ac_driver][acSetPosY] = ac_y;
  1340.         ACInfo[ac_driver][acSetPosZ] = ac_z;
  1341.         ACInfo[ac_driver][acGtc][11] =
  1342.         ACInfo[ac_driver][acGtc][9] = GetTickCount() + 2650;
  1343.     }
  1344.     return 1;
  1345. }
  1346.  
  1347. ac_fpublic ac_SetVehicleVelocity(vehicleid, Float:ac_X, Float:ac_Y, Float:ac_Z)
  1348. {
  1349.     if(!SetVehicleVelocity(vehicleid, ac_X, ac_Y, ac_Z)) return 0;
  1350.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1351.     if(ac_driver != INVALID_PLAYER_ID)
  1352.     {
  1353.         ACVehInfo[vehicleid][acVelX] = ac_X;
  1354.         ACVehInfo[vehicleid][acVelY] = ac_Y;
  1355.         ACVehInfo[vehicleid][acVelZ] = ac_Z;
  1356.         ACInfo[ac_driver][acGtc][9] = GetTickCount() + 300;
  1357.     }
  1358.     return 1;
  1359. }
  1360.  
  1361. ac_fpublic ac_SetVehicleAngularVelocity(vehicleid, Float:ac_X, Float:ac_Y, Float:ac_Z)
  1362. {
  1363.     if(!SetVehicleAngularVelocity(vehicleid, ac_X, ac_Y, ac_Z)) return 0;
  1364.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1365.     if(ac_driver != INVALID_PLAYER_ID)
  1366.     {
  1367.         ACVehInfo[vehicleid][acVelX] = ac_X;
  1368.         ACVehInfo[vehicleid][acVelY] = ac_Y;
  1369.         ACVehInfo[vehicleid][acVelZ] = ac_Z;
  1370.         ACInfo[ac_driver][acGtc][9] = GetTickCount() + 300;
  1371.     }
  1372.     return 1;
  1373. }
  1374.  
  1375. ac_fpublic ac_LinkVehicleToInterior(vehicleid, ac_interiorid)
  1376. {
  1377.     if(!LinkVehicleToInterior(vehicleid, ac_interiorid)) return 0;
  1378.     ACVehInfo[vehicleid][acInt] = ac_interiorid % 256;
  1379.     return 1;
  1380. }
  1381.  
  1382. ac_fpublic ac_ChangeVehiclePaintjob(vehicleid, ac_paintjobid)
  1383. {
  1384.     if(GetVehicleModel(vehicleid) > 0) ACVehInfo[vehicleid][acPaintJob] = ac_paintjobid;
  1385.     return ChangeVehiclePaintjob(vehicleid, ac_paintjobid);
  1386. }
  1387.  
  1388. ac_fpublic ac_SetVehicleHealth(vehicleid, Float:ac_health)
  1389. {
  1390.     if(!SetVehicleHealth(vehicleid, ac_health)) return 0;
  1391.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1392.     if(ac_driver != INVALID_PLAYER_ID)
  1393.     {
  1394.         ACInfo[ac_driver][acNOPCount][4] = 0;
  1395.         ACInfo[ac_driver][acSetVehHealth] = ac_health;
  1396.         ACInfo[ac_driver][acGtc][4] = GetTickCount() + 800;
  1397.     }
  1398.     else ACVehInfo[vehicleid][acHealth] = ac_health;
  1399.     return 1;
  1400. }
  1401.  
  1402. ac_fpublic ac_RepairVehicle(vehicleid)
  1403. {
  1404.     if(!RepairVehicle(vehicleid)) return 0;
  1405.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1406.     if(ac_driver != INVALID_PLAYER_ID)
  1407.     {
  1408.         ACInfo[ac_driver][acNOPCount][4] = 0;
  1409.         ACInfo[ac_driver][acSetVehHealth] = 1000.0;
  1410.         ACInfo[ac_driver][acGtc][4] = GetTickCount() + 800;
  1411.     }
  1412.     else ACVehInfo[vehicleid][acHealth] = 1000.0;
  1413.     return 1;
  1414. }
  1415.  
  1416. ac_fpublic ac_SetVehicleToRespawn(vehicleid)
  1417. {
  1418.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1419.     if(ac_driver != INVALID_PLAYER_ID) ACInfo[ac_driver][acGtc][9] = GetTickCount() + 300;
  1420.     return SetVehicleToRespawn(vehicleid);
  1421. }
  1422.  
  1423. ac_fpublic ac_EnableAntiCheat(acid, enable)
  1424. {
  1425.     if(!(0 <= acid < sizeof ac_ACAllow)) return 0;
  1426.     if(acid == 42)
  1427.     {
  1428.         if(enable)
  1429.         {
  1430.             if(!ac_ACAllow[acid])
  1431.             {
  1432.                 #if !AC_USE_QUERY
  1433.                     ac_QueryEnable = !!GetConsoleVarAsBool("query");
  1434.                 #endif
  1435.                 ac_RconEnable = !!GetConsoleVarAsBool("rcon");
  1436.             }
  1437.             #if !AC_USE_QUERY
  1438.                 SendRconCommand("query 0");
  1439.             #endif
  1440.             SendRconCommand("rcon 0");
  1441.         }
  1442.         else
  1443.         {
  1444.             static ac_strtmp[9];
  1445.             #if !AC_USE_QUERY
  1446.                 format(ac_strtmp, sizeof ac_strtmp, "query %b", ac_QueryEnable);
  1447.                 SendRconCommand(ac_strtmp);
  1448.             #endif
  1449.             format(ac_strtmp, sizeof ac_strtmp, "rcon %b", ac_RconEnable);
  1450.             SendRconCommand(ac_strtmp);
  1451.         }
  1452.     }
  1453.     ac_ACAllow[acid] = !!enable;
  1454.     if(enable)
  1455.     {
  1456.         #if defined foreach
  1457.             foreach(new ac_i : Player)
  1458.         #else
  1459.             for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1460.             {
  1461.                 if(IsPlayerConnected(ac_i))
  1462.         #endif
  1463.         {
  1464.             ACInfo[ac_i][acACAllow][acid] = ac_ACAllow[acid];
  1465.             switch(acid)
  1466.             {
  1467.                 case 7: ACInfo[ac_i][acCheatCount][15] = 0;
  1468.                 case 8: ACInfo[ac_i][acCheatCount][3] = 0;
  1469.                 case 10: ACInfo[ac_i][acCheatCount][16] = 0;
  1470.                 case 15: ACInfo[ac_i][acCheatCount][10] = 0;
  1471.                 case 17: ACInfo[ac_i][acCheatCount][7] = 0;
  1472.                 case 19: ACInfo[ac_i][acCheatCount][9] = 0;
  1473.                 case 20: ACInfo[ac_i][acCheatCount][11] = 0;
  1474.                 case 23: ACInfo[ac_i][acCheatCount][12] = 0;
  1475.                 case 26: ACInfo[ac_i][acCheatCount][14] = ACInfo[ac_i][acCheatCount][8] = 0;
  1476.                 case 29: ACInfo[ac_i][acCheatCount][13] = ACInfo[ac_i][acCheatCount][6] = 0;
  1477.                 case 31: ACInfo[ac_i][acCheatCount][4] = 0;
  1478.                 case 34: ACInfo[ac_i][acCheatCount][5] = 0;
  1479.                 case 38: ACInfo[ac_i][acCheatCount][0] = 0;
  1480.             }
  1481.         }
  1482.         #if !defined foreach
  1483.             }
  1484.         #endif
  1485.     }
  1486.     else
  1487.     {
  1488.         #if defined foreach
  1489.             foreach(new ac_i : Player) ACInfo[ac_i][acACAllow][acid] = ac_ACAllow[acid];
  1490.         #else
  1491.             for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1492.             {
  1493.                 if(IsPlayerConnected(ac_i)) ACInfo[ac_i][acACAllow][acid] = ac_ACAllow[acid];
  1494.             }
  1495.         #endif
  1496.     }
  1497.     return 1;
  1498. }
  1499.  
  1500. ac_fpublic ac_EnableAntiCheatForPlayer(playerid, acid, enable)
  1501. {
  1502.     if(!(0 <= acid < sizeof ac_ACAllow)) return 0;
  1503.     ACInfo[playerid][acACAllow][acid] = !!enable;
  1504.     if(enable)
  1505.     {
  1506.         switch(acid)
  1507.         {
  1508.             case 7: ACInfo[playerid][acCheatCount][15] = 0;
  1509.             case 8: ACInfo[playerid][acCheatCount][3] = 0;
  1510.             case 10: ACInfo[playerid][acCheatCount][16] = 0;
  1511.             case 15: ACInfo[playerid][acCheatCount][10] = 0;
  1512.             case 17: ACInfo[playerid][acCheatCount][7] = 0;
  1513.             case 19: ACInfo[playerid][acCheatCount][9] = 0;
  1514.             case 20: ACInfo[playerid][acCheatCount][11] = 0;
  1515.             case 23: ACInfo[playerid][acCheatCount][12] = 0;
  1516.             case 26: ACInfo[playerid][acCheatCount][14] = ACInfo[playerid][acCheatCount][8] = 0;
  1517.             case 29: ACInfo[playerid][acCheatCount][13] = ACInfo[playerid][acCheatCount][6] = 0;
  1518.             case 31: ACInfo[playerid][acCheatCount][4] = 0;
  1519.             case 34: ACInfo[playerid][acCheatCount][5] = 0;
  1520.             case 38: ACInfo[playerid][acCheatCount][0] = 0;
  1521.         }
  1522.     }
  1523.     return 1;
  1524. }
  1525.  
  1526. ac_fpublic ac_IsAntiCheatEnabled(acid)
  1527. {
  1528.     if(!(0 <= acid < sizeof ac_ACAllow)) return 0;
  1529.     return ac_ACAllow[acid];
  1530. }
  1531.  
  1532. ac_fpublic ac_IsAntiCheatEnabledForPlayer(playerid, acid)
  1533. {
  1534.     if(!(0 <= acid < sizeof ac_ACAllow)) return 0;
  1535.     return ACInfo[playerid][acACAllow][acid];
  1536. }
  1537.  
  1538. ac_fpublic ac_AntiCheatGetSpeed(playerid) return ACInfo[playerid][acSpeed];
  1539.  
  1540. ac_fpublic ac_AntiCheatGetAnimationIndex(playerid) return ACInfo[playerid][acAnim];
  1541.  
  1542. ac_fpublic ac_AntiCheatGetDialog(playerid) return ACInfo[playerid][acDialog];
  1543.  
  1544. ac_fpublic ac_AntiCheatGetMoney(playerid) return ACInfo[playerid][acMoney];
  1545.  
  1546. ac_fpublic ac_AntiCheatGetEnterVehicle(playerid) return ACInfo[playerid][acEnterVeh];
  1547.  
  1548. ac_fpublic ac_AntiCheatGetVehicleID(playerid) return ACInfo[playerid][acVeh];
  1549.  
  1550. ac_fpublic ac_AntiCheatGetWeapon(playerid) return ACInfo[playerid][acLastWeapon];
  1551.  
  1552. ac_fpublic ac_AntiCheatGetVehicleSeat(playerid) return ACInfo[playerid][acSeat];
  1553.  
  1554. ac_fpublic ac_AntiCheatGetSpecialAction(playerid) return ACInfo[playerid][acSpecAct];
  1555.  
  1556. ac_fpublic ac_AntiCheatGetLastSpecialActio(playerid) return ACInfo[playerid][acLastSpecAct];
  1557.  
  1558. ac_fpublic ac_AntiCheatGetLastShotWeapon(playerid) return ACInfo[playerid][acLastShot];
  1559.  
  1560. ac_fpublic ac_AntiCheatGetLastPickup(playerid) return ACInfo[playerid][acLastPickup];
  1561.  
  1562. ac_fpublic ac_AntiCheatGetLastUpdateTime(playerid) return ACInfo[playerid][acUpdateTime];
  1563.  
  1564. ac_fpublic ac_AntiCheatGetLastReloadTime(playerid) return ACInfo[playerid][acReloadTime];
  1565.  
  1566. ac_fpublic ac_AntiCheatGetLastEnteredVehTi(playerid) return ACInfo[playerid][acEnterVehTime];
  1567.  
  1568. ac_fpublic ac_AntiCheatGetLastShotTime(playerid) return ACInfo[playerid][acShotTime];
  1569.  
  1570. ac_fpublic ac_AntiCheatGetLastSpawnTime(playerid) return ACInfo[playerid][acSpawnTime];
  1571.  
  1572. ac_fpublic ac_AntiCheatIntEnterExitsIsEnab(playerid) return ACInfo[playerid][acIntEnterExits];
  1573.  
  1574. ac_fpublic ac_AntiCheatStuntBonusIsEnabled(playerid) return ACInfo[playerid][acStuntBonus];
  1575.  
  1576. ac_fpublic ac_AntiCheatIsInModShop(playerid) return ACInfo[playerid][acModShop];
  1577.  
  1578. ac_fpublic ac_AntiCheatIsFrozen(playerid) return !ACInfo[playerid][acUnFrozen];
  1579.  
  1580. ac_fpublic ac_AntiCheatIsDead(playerid) return ACInfo[playerid][acDead];
  1581.  
  1582. ac_fpublic ac_AntiCheatIsConnected(playerid) return ACInfo[playerid][acOnline];
  1583.  
  1584. ac_fpublic ac_AntiCheatGetNextDialog(playerid) return ACInfo[playerid][acNextDialog];
  1585.  
  1586. #endif
  1587.  
  1588. stock acc_AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2)
  1589. {
  1590.     new ac_vehicleid = AddStaticVehicle(modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2);
  1591.     if(ac_vehicleid != INVALID_VEHICLE_ID)
  1592.     {
  1593.         #if defined FILTERSCRIPT
  1594.             CallRemoteFunction("ac_AddStaticVehicle", "i", ac_vehicleid);
  1595.         #else
  1596.             ac_AddStaticVehicle(ac_vehicleid);
  1597.         #endif
  1598.     }
  1599.     return ac_vehicleid;
  1600. }
  1601.  
  1602. #if defined _ALS_AddStaticVehicle
  1603.     #undef AddStaticVehicle
  1604. #else
  1605.     #define _ALS_AddStaticVehicle
  1606. #endif
  1607. #define AddStaticVehicle acc_AddStaticVehicle
  1608.  
  1609. stock acc_AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay, addsiren = 0)
  1610. {
  1611.     new ac_vehicleid = AddStaticVehicleEx(modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2, respawn_delay, addsiren);
  1612.     if(ac_vehicleid != INVALID_VEHICLE_ID)
  1613.     {
  1614.         #if defined FILTERSCRIPT
  1615.             CallRemoteFunction("ac_AddStaticVehicle", "i", ac_vehicleid);
  1616.         #else
  1617.             ac_AddStaticVehicle(ac_vehicleid);
  1618.         #endif
  1619.     }
  1620.     return ac_vehicleid;
  1621. }
  1622.  
  1623. #if defined _ALS_AddStaticVehicleEx
  1624.     #undef AddStaticVehicleEx
  1625. #else
  1626.     #define _ALS_AddStaticVehicleEx
  1627. #endif
  1628. #define AddStaticVehicleEx acc_AddStaticVehicleEx
  1629.  
  1630. stock acc_CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, addsiren = 0)
  1631. {
  1632.     new ac_vehicleid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay, addsiren);
  1633.     if(ac_vehicleid != INVALID_VEHICLE_ID)
  1634.     {
  1635.         #if defined FILTERSCRIPT
  1636.             CallRemoteFunction("ac_CreateVehicle", "ii", ac_vehicleid, vehicletype);
  1637.         #else
  1638.             ac_CreateVehicle(ac_vehicleid, vehicletype);
  1639.         #endif
  1640.     }
  1641.     return ac_vehicleid;
  1642. }
  1643.  
  1644. #if defined _ALS_CreateVehicle
  1645.     #undef CreateVehicle
  1646. #else
  1647.     #define _ALS_CreateVehicle
  1648. #endif
  1649. #define CreateVehicle acc_CreateVehicle
  1650.  
  1651. stock acc_AddPlayerClass(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
  1652. {
  1653.     new ac_classid = AddPlayerClass(modelid, spawn_x, spawn_y, spawn_z, z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1654.     #if defined FILTERSCRIPT
  1655.         CallRemoteFunction("ac_AddPlayerClass", "iiiiiii", ac_classid, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1656.     #else
  1657.         ac_AddPlayerClass(ac_classid, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1658.     #endif
  1659.     return ac_classid;
  1660. }
  1661.  
  1662. #if defined _ALS_AddPlayerClass
  1663.     #undef AddPlayerClass
  1664. #else
  1665.     #define _ALS_AddPlayerClass
  1666. #endif
  1667. #define AddPlayerClass acc_AddPlayerClass
  1668.  
  1669. stock acc_AddPlayerClassEx(teamid, modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
  1670. {
  1671.     new ac_classid = AddPlayerClassEx(teamid, modelid, spawn_x, spawn_y, spawn_z, z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1672.     #if defined FILTERSCRIPT
  1673.         CallRemoteFunction("ac_AddPlayerClass", "iiiiiii", ac_classid, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1674.     #else
  1675.         ac_AddPlayerClass(ac_classid, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1676.     #endif
  1677.     return ac_classid;
  1678. }
  1679.  
  1680. #if defined _ALS_AddPlayerClassEx
  1681.     #undef AddPlayerClassEx
  1682. #else
  1683.     #define _ALS_AddPlayerClassEx
  1684. #endif
  1685. #define AddPlayerClassEx acc_AddPlayerClassEx
  1686.  
  1687. stock acc_SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
  1688. {
  1689.     #if defined FILTERSCRIPT
  1690.         return CallRemoteFunction("ac_SetSpawnInfo", "iiiffffiiiiii", playerid, team, skin, x, y, z, rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1691.     #else
  1692.         return ac_SetSpawnInfo(playerid, team, skin, x, y, z, rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1693.     #endif
  1694. }
  1695.  
  1696. #if defined _ALS_SetSpawnInfo
  1697.     #undef SetSpawnInfo
  1698. #else
  1699.     #define _ALS_SetSpawnInfo
  1700. #endif
  1701. #define SetSpawnInfo acc_SetSpawnInfo
  1702.  
  1703. stock acc_AddStaticPickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0)
  1704. {
  1705.     new ac_pickupid = CreatePickup(model, type, X, Y, Z, virtualworld);
  1706.     if(ac_pickupid != -1)
  1707.     {
  1708.         #if defined FILTERSCRIPT
  1709.             return CallRemoteFunction("ac_AddStaticPickup", "iiifff", ac_pickupid, model, type, X, Y, Z);
  1710.         #else
  1711.             return ac_AddStaticPickup(ac_pickupid, model, type, X, Y, Z);
  1712.         #endif
  1713.     }
  1714.     return 0;
  1715. }
  1716.  
  1717. #if defined _ALS_AddStaticPickup
  1718.     #undef AddStaticPickup
  1719. #else
  1720.     #define _ALS_AddStaticPickup
  1721. #endif
  1722. #define AddStaticPickup acc_AddStaticPickup
  1723.  
  1724. stock acc_CreatePickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0)
  1725. {
  1726.     new ac_pickupid = CreatePickup(model, type, X, Y, Z, virtualworld);
  1727.     if(ac_pickupid != -1)
  1728.     {
  1729.         #if defined FILTERSCRIPT
  1730.             CallRemoteFunction("ac_CreatePickup", "iiifff", ac_pickupid, model, type, X, Y, Z);
  1731.         #else
  1732.             ac_CreatePickup(ac_pickupid, model, type, X, Y, Z);
  1733.         #endif
  1734.     }
  1735.     return ac_pickupid;
  1736. }
  1737.  
  1738. #if defined _ALS_CreatePickup
  1739.     #undef CreatePickup
  1740. #else
  1741.     #define _ALS_CreatePickup
  1742. #endif
  1743. #define CreatePickup acc_CreatePickup
  1744.  
  1745. #if defined CreateDynamicPickup
  1746.     #if defined STREAMER_ENABLE_TAGS
  1747.         stock STREAMER_TAG_PICKUP acc_CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0)
  1748.         {
  1749.             new STREAMER_TAG_PICKUP ac_pickupid = CreateDynamicPickup(modelid, type, x, y, z, worldid, interiorid, playerid, streamdistance, areaid, priority);
  1750.     #else
  1751.         stock acc_CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, areaid = -1, priority = 0)
  1752.         {
  1753.             new ac_pickupid = CreateDynamicPickup(modelid, type, x, y, z, worldid, interiorid, playerid, streamdistance, areaid, priority);
  1754.     #endif
  1755.         if(_:ac_pickupid > 0)
  1756.         {
  1757.             #if defined FILTERSCRIPT
  1758.                 CallRemoteFunction("ac_CreateDynamicPickup", "iii", ac_pickupid, modelid, type);
  1759.             #else
  1760.                 ac_CreateDynamicPickup(ac_pickupid, modelid, type);
  1761.             #endif
  1762.         }
  1763.         return ac_pickupid;
  1764.     }
  1765.  
  1766.     #if defined _ALS_CreateDynamicPickup
  1767.         #undef CreateDynamicPickup
  1768.     #else
  1769.         #define _ALS_CreateDynamicPickup
  1770.     #endif
  1771.     #define CreateDynamicPickup acc_CreateDynamicPickup
  1772. #endif
  1773.  
  1774. #if defined CreateDynamicPickupEx
  1775.     #if defined STREAMER_ENABLE_TAGS
  1776.         stock STREAMER_TAG_PICKUP acc_CreateDynamicPickupEx(modelid, type, Float:x, Float:y, Float:z, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, STREAMER_TAG_AREA areas[] = { STREAMER_TAG_AREA -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas)
  1777.         {
  1778.             new STREAMER_TAG_PICKUP ac_pickupid = CreateDynamicPickupEx(modelid, type, x, y, z, streamdistance, worlds, interiors, players, areas, priority, maxworlds, maxinteriors, maxplayers, maxareas);
  1779.     #else
  1780.             stock acc_CreateDynamicPickupEx(modelid, type, Float:x, Float:y, Float:z, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, areas[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas)
  1781.         {
  1782.             new ac_pickupid = CreateDynamicPickupEx(modelid, type, x, y, z, streamdistance, worlds, interiors, players, areas, priority, maxworlds, maxinteriors, maxplayers, maxareas);
  1783.     #endif
  1784.         if(_:ac_pickupid > 0)
  1785.         {
  1786.             #if defined FILTERSCRIPT
  1787.                 CallRemoteFunction("ac_CreateDynamicPickup", "iii", ac_pickupid, modelid, type);
  1788.             #else
  1789.                 ac_CreateDynamicPickup(ac_pickupid, modelid, type);
  1790.             #endif
  1791.         }
  1792.         return ac_pickupid;
  1793.     }
  1794.  
  1795.     #if defined _ALS_CreateDynamicPickupEx
  1796.         #undef CreateDynamicPickupEx
  1797.     #else
  1798.         #define _ALS_CreateDynamicPickupEx
  1799.     #endif
  1800.     #define CreateDynamicPickupEx acc_CreateDynamicPickupEx
  1801. #endif
  1802.  
  1803. stock acc_DestroyVehicle(vehicleid)
  1804. {
  1805.     #if defined FILTERSCRIPT
  1806.         return CallRemoteFunction("ac_DestroyVehicle", "i", vehicleid);
  1807.     #else
  1808.         return ac_DestroyVehicle(vehicleid);
  1809.     #endif
  1810. }
  1811.  
  1812. #if defined _ALS_DestroyVehicle
  1813.     #undef DestroyVehicle
  1814. #else
  1815.     #define _ALS_DestroyVehicle
  1816. #endif
  1817. #define DestroyVehicle acc_DestroyVehicle
  1818.  
  1819. stock acc_DestroyPickup(pickup)
  1820. {
  1821.     #if defined FILTERSCRIPT
  1822.         return CallRemoteFunction("ac_DestroyPickup", "i", pickup);
  1823.     #else
  1824.         return ac_DestroyPickup(pickup);
  1825.     #endif
  1826. }
  1827.  
  1828. #if defined _ALS_DestroyPickup
  1829.     #undef DestroyPickup
  1830. #else
  1831.     #define _ALS_DestroyPickup
  1832. #endif
  1833. #define DestroyPickup acc_DestroyPickup
  1834.  
  1835. stock acc_DisableInteriorEnterExits()
  1836. {
  1837.     #if defined FILTERSCRIPT
  1838.         return CallRemoteFunction("ac_DisableInteriorEnterExits", "");
  1839.     #else
  1840.         return ac_DisableInteriorEnterExits();
  1841.     #endif
  1842. }
  1843.  
  1844. #if defined _ALS_DisableInteriorEnterExits
  1845.     #undef DisableInteriorEnterExits
  1846. #else
  1847.     #define _ALS_DisableInteriorEnterExits
  1848. #endif
  1849. #define DisableInteriorEnterExits acc_DisableInteriorEnterExits
  1850.  
  1851. stock acc_UsePlayerPedAnims()
  1852. {
  1853.     #if defined FILTERSCRIPT
  1854.         return CallRemoteFunction("ac_UsePlayerPedAnims", "");
  1855.     #else
  1856.         return ac_UsePlayerPedAnims();
  1857.     #endif
  1858. }
  1859.  
  1860. #if defined _ALS_UsePlayerPedAnims
  1861.     #undef UsePlayerPedAnims
  1862. #else
  1863.     #define _ALS_UsePlayerPedAnims
  1864. #endif
  1865. #define UsePlayerPedAnims acc_UsePlayerPedAnims
  1866.  
  1867. stock acc_EnableVehicleFriendlyFire()
  1868. {
  1869.     #if defined FILTERSCRIPT
  1870.         return CallRemoteFunction("ac_EnableVehicleFriendlyFire", "");
  1871.     #else
  1872.         return ac_EnableVehicleFriendlyFire();
  1873.     #endif
  1874. }
  1875.  
  1876. #if defined _ALS_EnableVehicleFriendlyFire
  1877.     #undef EnableVehicleFriendlyFire
  1878. #else
  1879.     #define _ALS_EnableVehicleFriendlyFire
  1880. #endif
  1881. #define EnableVehicleFriendlyFire acc_EnableVehicleFriendlyFire
  1882.  
  1883. stock acc_EnableStuntBonusForAll(enable)
  1884. {
  1885.     #if defined FILTERSCRIPT
  1886.         return CallRemoteFunction("ac_EnableStuntBonusForAll", "i", enable);
  1887.     #else
  1888.         return ac_EnableStuntBonusForAll(enable);
  1889.     #endif
  1890. }
  1891.  
  1892. #if defined _ALS_EnableStuntBonusForAll
  1893.     #undef EnableStuntBonusForAll
  1894. #else
  1895.     #define _ALS_EnableStuntBonusForAll
  1896. #endif
  1897. #define EnableStuntBonusForAll acc_EnableStuntBonusForAll
  1898.  
  1899. stock acc_EnableStuntBonusForPlayer(playerid, enable)
  1900. {
  1901.     #if defined FILTERSCRIPT
  1902.         return CallRemoteFunction("ac_EnableStuntBonusForPlayer", "ii", playerid, enable);
  1903.     #else
  1904.         return ac_EnableStuntBonusForPlayer(playerid, enable);
  1905.     #endif
  1906. }
  1907.  
  1908. #if defined _ALS_EnableStuntBonusForPlayer
  1909.     #undef EnableStuntBonusForPlayer
  1910. #else
  1911.     #define _ALS_EnableStuntBonusForPlayer
  1912. #endif
  1913. #define EnableStuntBonusForPlayer acc_EnableStuntBonusForPlayer
  1914.  
  1915. #if defined _inc_y_dialog || defined _INC_y_dialog
  1916.     stock ac_Dialog_Show(playerid, style, string:title[], string:caption[], string:button1[], string:button2[] = "", dialog = -1)
  1917.     {
  1918.         if(IsPlayerConnected(playerid))
  1919.         {
  1920.             #if defined FILTERSCRIPT
  1921.                 CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, dialog);
  1922.             #else
  1923.                 ac_ShowPlayerDialog(playerid, dialog);
  1924.             #endif
  1925.         }
  1926.         return Dialog_Show(playerid, style, title, caption, button1, button2, dialog);
  1927.     }
  1928.  
  1929.     #if defined _ALS_Dialog_Show
  1930.         #undef Dialog_Show
  1931.     #else
  1932.         #define _ALS_Dialog_Show
  1933.     #endif
  1934.     #define Dialog_Show ac_Dialog_Show
  1935. #endif
  1936.  
  1937. stock acc_ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
  1938. {
  1939.     if(ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2))
  1940.     {
  1941.         #if defined FILTERSCRIPT
  1942.             return CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, dialogid);
  1943.         #else
  1944.             return ac_ShowPlayerDialog(playerid, dialogid);
  1945.         #endif
  1946.     }
  1947.     return 0;
  1948. }
  1949.  
  1950. #if defined _ALS_ShowPlayerDialog
  1951.     #undef ShowPlayerDialog
  1952. #else
  1953.     #define _ALS_ShowPlayerDialog
  1954. #endif
  1955. #define ShowPlayerDialog acc_ShowPlayerDialog
  1956.  
  1957. stock acc_TogglePlayerControllable(playerid, toggle)
  1958. {
  1959.     #if defined FILTERSCRIPT
  1960.         return CallRemoteFunction("ac_TogglePlayerControllable", "ii", playerid, toggle);
  1961.     #else
  1962.         return ac_TogglePlayerControllable(playerid, toggle);
  1963.     #endif
  1964. }
  1965.  
  1966. #if defined _ALS_TogglePlayerControllable
  1967.     #undef TogglePlayerControllable
  1968. #else
  1969.     #define _ALS_TogglePlayerControllable
  1970. #endif
  1971. #define TogglePlayerControllable acc_TogglePlayerControllable
  1972.  
  1973. stock acc_TogglePlayerSpectating(playerid, toggle)
  1974. {
  1975.     #if defined FILTERSCRIPT
  1976.         return CallRemoteFunction("ac_TogglePlayerSpectating", "ii", playerid, toggle);
  1977.     #else
  1978.         return ac_TogglePlayerSpectating(playerid, toggle);
  1979.     #endif
  1980. }
  1981.  
  1982. #if defined _ALS_TogglePlayerSpectating
  1983.     #undef TogglePlayerSpectating
  1984. #else
  1985.     #define _ALS_TogglePlayerSpectating
  1986. #endif
  1987. #define TogglePlayerSpectating acc_TogglePlayerSpectating
  1988.  
  1989. stock acc_SpawnPlayer(playerid)
  1990. {
  1991.     #if defined FILTERSCRIPT
  1992.         return CallRemoteFunction("ac_SpawnPlayer", "i", playerid);
  1993.     #else
  1994.         return ac_SpawnPlayer(playerid);
  1995.     #endif
  1996. }
  1997.  
  1998. #if defined _ALS_SpawnPlayer
  1999.     #undef SpawnPlayer
  2000. #else
  2001.     #define _ALS_SpawnPlayer
  2002. #endif
  2003. #define SpawnPlayer acc_SpawnPlayer
  2004.  
  2005. stock acc_SetPlayerHealth(playerid, Float:health)
  2006. {
  2007.     if(floatcmp(health, 1048576.0) >= 0) health = 1048575.0;
  2008.     #if defined FILTERSCRIPT
  2009.         return CallRemoteFunction("ac_SetPlayerHealth", "if", playerid, health);
  2010.     #else
  2011.         return ac_SetPlayerHealth(playerid, health);
  2012.     #endif
  2013. }
  2014.  
  2015. #if defined _ALS_SetPlayerHealth
  2016.     #undef SetPlayerHealth
  2017. #else
  2018.     #define _ALS_SetPlayerHealth
  2019. #endif
  2020. #define SetPlayerHealth acc_SetPlayerHealth
  2021.  
  2022. stock acc_SetPlayerArmour(playerid, Float:armour)
  2023. {
  2024.     if(floatcmp(armour, 1048576.0) >= 0) armour = 1048575.0;
  2025.     #if defined FILTERSCRIPT
  2026.         return CallRemoteFunction("ac_SetPlayerArmour", "if", playerid, armour);
  2027.     #else
  2028.         return ac_SetPlayerArmour(playerid, armour);
  2029.     #endif
  2030. }
  2031.  
  2032. #if defined _ALS_SetPlayerArmour
  2033.     #undef SetPlayerArmour
  2034. #else
  2035.     #define _ALS_SetPlayerArmour
  2036. #endif
  2037. #define SetPlayerArmour acc_SetPlayerArmour
  2038.  
  2039. stock acc_GivePlayerWeapon(playerid, weaponid, ammo)
  2040. {
  2041.     if(!IsPlayerConnected(playerid)) return 0;
  2042.     #if defined FILTERSCRIPT
  2043.         return CallRemoteFunction("ac_GivePlayerWeapon", "iid", playerid, weaponid, ammo);
  2044.     #else
  2045.         return ac_GivePlayerWeapon(playerid, weaponid, ammo);
  2046.     #endif
  2047. }
  2048.  
  2049. #if defined _ALS_GivePlayerWeapon
  2050.     #undef GivePlayerWeapon
  2051. #else
  2052.     #define _ALS_GivePlayerWeapon
  2053. #endif
  2054. #define GivePlayerWeapon acc_GivePlayerWeapon
  2055.  
  2056. stock acc_SetPlayerAmmo(playerid, weaponslot, ammo)
  2057. {
  2058.     if(!IsPlayerConnected(playerid)) return 0;
  2059.     #if defined FILTERSCRIPT
  2060.         return CallRemoteFunction("ac_SetPlayerAmmo", "iid", playerid, weaponslot, ammo);
  2061.     #else
  2062.         return ac_SetPlayerAmmo(playerid, weaponslot, ammo);
  2063.     #endif
  2064. }
  2065.  
  2066. #if defined _ALS_SetPlayerAmmo
  2067.     #undef SetPlayerAmmo
  2068. #else
  2069.     #define _ALS_SetPlayerAmmo
  2070. #endif
  2071. #define SetPlayerAmmo acc_SetPlayerAmmo
  2072.  
  2073. stock acc_SetPlayerArmedWeapon(playerid, weaponid)
  2074. {
  2075.     #if defined FILTERSCRIPT
  2076.         return CallRemoteFunction("ac_SetPlayerArmedWeapon", "ii", playerid, weaponid);
  2077.     #else
  2078.         return ac_SetPlayerArmedWeapon(playerid, weaponid);
  2079.     #endif
  2080. }
  2081.  
  2082. #if defined _ALS_SetPlayerArmedWeapon
  2083.     #undef SetPlayerArmedWeapon
  2084. #else
  2085.     #define _ALS_SetPlayerArmedWeapon
  2086. #endif
  2087. #define SetPlayerArmedWeapon acc_SetPlayerArmedWeapon
  2088.  
  2089. stock acc_ResetPlayerWeapons(playerid)
  2090. {
  2091.     #if defined FILTERSCRIPT
  2092.         return CallRemoteFunction("ac_ResetPlayerWeapons", "i", playerid);
  2093.     #else
  2094.         return ac_ResetPlayerWeapons(playerid);
  2095.     #endif
  2096. }
  2097.  
  2098. #if defined _ALS_ResetPlayerWeapons
  2099.     #undef ResetPlayerWeapons
  2100. #else
  2101.     #define _ALS_ResetPlayerWeapons
  2102. #endif
  2103. #define ResetPlayerWeapons acc_ResetPlayerWeapons
  2104.  
  2105. stock acc_GivePlayerMoney(playerid, money)
  2106. {
  2107.     #if defined FILTERSCRIPT
  2108.         return CallRemoteFunction("ac_GivePlayerMoney", "id", playerid, money);
  2109.     #else
  2110.         return ac_GivePlayerMoney(playerid, money);
  2111.     #endif
  2112. }
  2113.  
  2114. #if defined _ALS_GivePlayerMoney
  2115.     #undef GivePlayerMoney
  2116. #else
  2117.     #define _ALS_GivePlayerMoney
  2118. #endif
  2119. #define GivePlayerMoney acc_GivePlayerMoney
  2120.  
  2121. stock acc_ResetPlayerMoney(playerid)
  2122. {
  2123.     #if defined FILTERSCRIPT
  2124.         return CallRemoteFunction("ac_ResetPlayerMoney", "i", playerid);
  2125.     #else
  2126.         return ac_ResetPlayerMoney(playerid);
  2127.     #endif
  2128. }
  2129.  
  2130. #if defined _ALS_ResetPlayerMoney
  2131.     #undef ResetPlayerMoney
  2132. #else
  2133.     #define _ALS_ResetPlayerMoney
  2134. #endif
  2135. #define ResetPlayerMoney acc_ResetPlayerMoney
  2136.  
  2137. stock acc_GetPlayerMoney(playerid)
  2138. {
  2139.     if(!IsPlayerConnected(playerid)) return 0;
  2140.     #if defined FILTERSCRIPT
  2141.         return CallRemoteFunction("ac_AntiCheatGetMoney", "i", playerid);
  2142.     #else
  2143.         return ac_AntiCheatGetMoney(playerid);
  2144.     #endif
  2145. }
  2146.  
  2147. #if defined _ALS_GetPlayerMoney
  2148.     #undef GetPlayerMoney
  2149. #else
  2150.     #define _ALS_GetPlayerMoney
  2151. #endif
  2152. #define GetPlayerMoney acc_GetPlayerMoney
  2153.  
  2154. stock acc_SetPlayerSpecialAction(playerid, actionid)
  2155. {
  2156.     #if defined FILTERSCRIPT
  2157.         return CallRemoteFunction("ac_SetPlayerSpecialAction", "ii", playerid, actionid);
  2158.     #else
  2159.         return ac_SetPlayerSpecialAction(playerid, actionid);
  2160.     #endif
  2161. }
  2162.  
  2163. #if defined _ALS_SetPlayerSpecialAction
  2164.     #undef SetPlayerSpecialAction
  2165. #else
  2166.     #define _ALS_SetPlayerSpecialAction
  2167. #endif
  2168. #define SetPlayerSpecialAction acc_SetPlayerSpecialAction
  2169.  
  2170. stock acc_SetPlayerInterior(playerid, interiorid)
  2171. {
  2172.     #if defined FILTERSCRIPT
  2173.         return CallRemoteFunction("ac_SetPlayerInterior", "ii", playerid, interiorid);
  2174.     #else
  2175.         return ac_SetPlayerInterior(playerid, interiorid);
  2176.     #endif
  2177. }
  2178.  
  2179. #if defined _ALS_SetPlayerInterior
  2180.     #undef SetPlayerInterior
  2181. #else
  2182.     #define _ALS_SetPlayerInterior
  2183. #endif
  2184. #define SetPlayerInterior acc_SetPlayerInterior
  2185.  
  2186. stock acc_SetPlayerPos(playerid, Float:x, Float:y, Float:z)
  2187. {
  2188.     #if defined FILTERSCRIPT
  2189.         return CallRemoteFunction("ac_SetPlayerPos", "ifff", playerid, x, y, z);
  2190.     #else
  2191.         return ac_SetPlayerPos(playerid, x, y, z);
  2192.     #endif
  2193. }
  2194.  
  2195. #if defined _ALS_SetPlayerPos
  2196.     #undef SetPlayerPos
  2197. #else
  2198.     #define _ALS_SetPlayerPos
  2199. #endif
  2200. #define SetPlayerPos acc_SetPlayerPos
  2201.  
  2202. stock acc_SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z)
  2203. {
  2204.     #if defined FILTERSCRIPT
  2205.         return CallRemoteFunction("ac_SetPlayerPosFindZ", "ifff", playerid, x, y, z);
  2206.     #else
  2207.         return ac_SetPlayerPosFindZ(playerid, x, y, z);
  2208.     #endif
  2209. }
  2210.  
  2211. #if defined _ALS_SetPlayerPosFindZ
  2212.     #undef SetPlayerPosFindZ
  2213. #else
  2214.     #define _ALS_SetPlayerPosFindZ
  2215. #endif
  2216. #define SetPlayerPosFindZ acc_SetPlayerPosFindZ
  2217.  
  2218. stock acc_SetPlayerVelocity(playerid, Float:X, Float:Y, Float:Z)
  2219. {
  2220.     #if defined FILTERSCRIPT
  2221.         return CallRemoteFunction("ac_SetPlayerVelocity", "ifff", playerid, X, Y, Z);
  2222.     #else
  2223.         return ac_SetPlayerVelocity(playerid, X, Y, Z);
  2224.     #endif
  2225. }
  2226.  
  2227. #if defined _ALS_SetPlayerVelocity
  2228.     #undef SetPlayerVelocity
  2229. #else
  2230.     #define _ALS_SetPlayerVelocity
  2231. #endif
  2232. #define SetPlayerVelocity acc_SetPlayerVelocity
  2233.  
  2234. stock acc_PutPlayerInVehicle(playerid, vehicleid, seatid)
  2235. {
  2236.     #if defined FILTERSCRIPT
  2237.         return CallRemoteFunction("ac_PutPlayerInVehicle", "iii", playerid, vehicleid, seatid);
  2238.     #else
  2239.         return ac_PutPlayerInVehicle(playerid, vehicleid, seatid);
  2240.     #endif
  2241. }
  2242.  
  2243. #if defined _ALS_PutPlayerInVehicle
  2244.     #undef PutPlayerInVehicle
  2245. #else
  2246.     #define _ALS_PutPlayerInVehicle
  2247. #endif
  2248. #define PutPlayerInVehicle acc_PutPlayerInVehicle
  2249.  
  2250. stock acc_RemovePlayerFromVehicle(playerid)
  2251. {
  2252.     #if defined FILTERSCRIPT
  2253.         return CallRemoteFunction("ac_RemovePlayerFromVehicle", "i", playerid);
  2254.     #else
  2255.         return ac_RemovePlayerFromVehicle(playerid);
  2256.     #endif
  2257. }
  2258.  
  2259. #if defined _ALS_RemovePlayerFromVehicle
  2260.     #undef RemovePlayerFromVehicle
  2261. #else
  2262.     #define _ALS_RemovePlayerFromVehicle
  2263. #endif
  2264. #define RemovePlayerFromVehicle acc_RemovePlayerFromVehicle
  2265.  
  2266. stock acc_SetVehiclePos(vehicleid, Float:x, Float:y, Float:z)
  2267. {
  2268.     #if defined FILTERSCRIPT
  2269.         return CallRemoteFunction("ac_SetVehiclePos", "ifff", vehicleid, x, y, z);
  2270.     #else
  2271.         return ac_SetVehiclePos(vehicleid, x, y, z);
  2272.     #endif
  2273. }
  2274.  
  2275. #if defined _ALS_SetVehiclePos
  2276.     #undef SetVehiclePos
  2277. #else
  2278.     #define _ALS_SetVehiclePos
  2279. #endif
  2280. #define SetVehiclePos acc_SetVehiclePos
  2281.  
  2282. stock acc_SetVehicleVelocity(vehicleid, Float:X, Float:Y, Float:Z)
  2283. {
  2284.     #if defined FILTERSCRIPT
  2285.         return CallRemoteFunction("ac_SetVehicleVelocity", "ifff", vehicleid, X, Y, Z);
  2286.     #else
  2287.         return ac_SetVehicleVelocity(vehicleid, X, Y, Z);
  2288.     #endif
  2289. }
  2290.  
  2291. #if defined _ALS_SetVehicleVelocity
  2292.     #undef SetVehicleVelocity
  2293. #else
  2294.     #define _ALS_SetVehicleVelocity
  2295. #endif
  2296. #define SetVehicleVelocity acc_SetVehicleVelocity
  2297.  
  2298. stock acc_SetVehicleAngularVelocity(vehicleid, Float:X, Float:Y, Float:Z)
  2299. {
  2300.     #if defined FILTERSCRIPT
  2301.         return CallRemoteFunction("ac_SetVehicleAngularVelocity", "ifff", vehicleid, X, Y, Z);
  2302.     #else
  2303.         return ac_SetVehicleAngularVelocity(vehicleid, X, Y, Z);
  2304.     #endif
  2305. }
  2306.  
  2307. #if defined _ALS_SetVehicleAngularVelocity
  2308.     #undef SetVehicleAngularVelocity
  2309. #else
  2310.     #define _ALS_SetVehicleAngularVelocity
  2311. #endif
  2312. #define SetVehicleAngularVelocity acc_SetVehicleAngularVelocity
  2313.  
  2314. stock acc_LinkVehicleToInterior(vehicleid, interiorid)
  2315. {
  2316.     #if defined FILTERSCRIPT
  2317.         return CallRemoteFunction("ac_LinkVehicleToInterior", "ii", vehicleid, interiorid);
  2318.     #else
  2319.         return ac_LinkVehicleToInterior(vehicleid, interiorid);
  2320.     #endif
  2321. }
  2322.  
  2323. #if defined _ALS_LinkVehicleToInterior
  2324.     #undef LinkVehicleToInterior
  2325. #else
  2326.     #define _ALS_LinkVehicleToInterior
  2327. #endif
  2328. #define LinkVehicleToInterior acc_LinkVehicleToInterior
  2329.  
  2330. stock acc_ChangeVehiclePaintjob(vehicleid, paintjobid)
  2331. {
  2332.     #if defined FILTERSCRIPT
  2333.         return CallRemoteFunction("ac_ChangeVehiclePaintjob", "ii", vehicleid, paintjobid);
  2334.     #else
  2335.         return ac_ChangeVehiclePaintjob(vehicleid, paintjobid);
  2336.     #endif
  2337. }
  2338.  
  2339. #if defined _ALS_ChangeVehiclePaintjob
  2340.     #undef ChangeVehiclePaintjob
  2341. #else
  2342.     #define _ALS_ChangeVehiclePaintjob
  2343. #endif
  2344. #define ChangeVehiclePaintjob acc_ChangeVehiclePaintjob
  2345.  
  2346. stock acc_SetVehicleHealth(vehicleid, Float:health)
  2347. {
  2348.     if(floatcmp(health, 0.0) == -1) health = 0.0;
  2349.     #if defined FILTERSCRIPT
  2350.         return CallRemoteFunction("ac_SetVehicleHealth", "if", vehicleid, health);
  2351.     #else
  2352.         return ac_SetVehicleHealth(vehicleid, health);
  2353.     #endif
  2354. }
  2355.  
  2356. #if defined _ALS_SetVehicleHealth
  2357.     #undef SetVehicleHealth
  2358. #else
  2359.     #define _ALS_SetVehicleHealth
  2360. #endif
  2361. #define SetVehicleHealth acc_SetVehicleHealth
  2362.  
  2363. stock acc_RepairVehicle(vehicleid)
  2364. {
  2365.     #if defined FILTERSCRIPT
  2366.         return CallRemoteFunction("ac_RepairVehicle", "i", vehicleid);
  2367.     #else
  2368.         return ac_RepairVehicle(vehicleid);
  2369.     #endif
  2370. }
  2371.  
  2372. #if defined _ALS_RepairVehicle
  2373.     #undef RepairVehicle
  2374. #else
  2375.     #define _ALS_RepairVehicle
  2376. #endif
  2377. #define RepairVehicle acc_RepairVehicle
  2378.  
  2379. stock acc_SetVehicleToRespawn(vehicleid)
  2380. {
  2381.     if(GetVehicleModel(vehicleid) > 0)
  2382.     {
  2383.         #if defined FILTERSCRIPT
  2384.             return CallRemoteFunction("ac_SetVehicleToRespawn", "i", vehicleid);
  2385.         #else
  2386.             return ac_SetVehicleToRespawn(vehicleid);
  2387.         #endif
  2388.     }
  2389.     return 0;
  2390. }
  2391.  
  2392. #if defined _ALS_SetVehicleToRespawn
  2393.     #undef SetVehicleToRespawn
  2394. #else
  2395.     #define _ALS_SetVehicleToRespawn
  2396. #endif
  2397. #define SetVehicleToRespawn acc_SetVehicleToRespawn
  2398.  
  2399. stock EnableAntiCheat(acid, enable)
  2400. {
  2401.     #if defined FILTERSCRIPT
  2402.         return CallRemoteFunction("ac_EnableAntiCheat", "ii", acid, enable);
  2403.     #else
  2404.         return ac_EnableAntiCheat(acid, enable);
  2405.     #endif
  2406. }
  2407.  
  2408. stock EnableAntiCheatForPlayer(playerid, acid, enable)
  2409. {
  2410.     if(!IsPlayerConnected(playerid)) return 0;
  2411.     #if defined FILTERSCRIPT
  2412.         return CallRemoteFunction("ac_EnableAntiCheatForPlayer", "iii", playerid, acid, enable);
  2413.     #else
  2414.         return ac_EnableAntiCheatForPlayer(playerid, acid, enable);
  2415.     #endif
  2416. }
  2417.  
  2418. stock IsAntiCheatEnabled(acid)
  2419. {
  2420.     #if defined FILTERSCRIPT
  2421.         return CallRemoteFunction("ac_IsAntiCheatEnabled", "i", acid);
  2422.     #else
  2423.         return ac_IsAntiCheatEnabled(acid);
  2424.     #endif
  2425. }
  2426.  
  2427. stock IsAntiCheatEnabledForPlayer(playerid, acid)
  2428. {
  2429.     if(!IsPlayerConnected(playerid)) return 0;
  2430.     #if defined FILTERSCRIPT
  2431.         return CallRemoteFunction("ac_IsAntiCheatEnabledForPlayer", "ii", playerid, acid);
  2432.     #else
  2433.         return ac_IsAntiCheatEnabledForPlayer(playerid, acid);
  2434.     #endif
  2435. }
  2436.  
  2437. stock AntiCheatGetSpeed(playerid)
  2438. {
  2439.     if(!IsPlayerConnected(playerid)) return 0;
  2440.     #if defined FILTERSCRIPT
  2441.         return CallRemoteFunction("ac_AntiCheatGetSpeed", "i", playerid);
  2442.     #else
  2443.         return ac_AntiCheatGetSpeed(playerid);
  2444.     #endif
  2445. }
  2446.  
  2447. stock AntiCheatGetAnimationIndex(playerid)
  2448. {
  2449.     if(!IsPlayerConnected(playerid)) return 0;
  2450.     #if defined FILTERSCRIPT
  2451.         return CallRemoteFunction("ac_AntiCheatGetAnimationIndex", "i", playerid);
  2452.     #else
  2453.         return ac_AntiCheatGetAnimationIndex(playerid);
  2454.     #endif
  2455. }
  2456.  
  2457. stock AntiCheatGetDialog(playerid)
  2458. {
  2459.     if(!IsPlayerConnected(playerid)) return 0;
  2460.     #if defined FILTERSCRIPT
  2461.         return CallRemoteFunction("ac_AntiCheatGetDialog", "i", playerid);
  2462.     #else
  2463.         return ac_AntiCheatGetDialog(playerid);
  2464.     #endif
  2465. }
  2466.  
  2467. stock AntiCheatGetMoney(playerid)
  2468. {
  2469.     if(!IsPlayerConnected(playerid)) return 0;
  2470.     #if defined FILTERSCRIPT
  2471.         return CallRemoteFunction("ac_AntiCheatGetMoney", "i", playerid);
  2472.     #else
  2473.         return ac_AntiCheatGetMoney(playerid);
  2474.     #endif
  2475. }
  2476.  
  2477. stock AntiCheatGetClass(playerid)
  2478. {
  2479.     if(!IsPlayerConnected(playerid)) return 0;
  2480.     #if defined FILTERSCRIPT
  2481.         return CallRemoteFunction("ac_AntiCheatGetClass", "i", playerid);
  2482.     #else
  2483.         return ac_AntiCheatGetClass(playerid);
  2484.     #endif
  2485. }
  2486.  
  2487. stock AntiCheatGetEnterVehicle(playerid)
  2488. {
  2489.     if(!IsPlayerConnected(playerid)) return 0;
  2490.     #if defined FILTERSCRIPT
  2491.         return CallRemoteFunction("ac_AntiCheatGetEnterVehicle", "i", playerid);
  2492.     #else
  2493.         return ac_AntiCheatGetEnterVehicle(playerid);
  2494.     #endif
  2495. }
  2496.  
  2497. stock AntiCheatGetVehicleID(playerid)
  2498. {
  2499.     if(!IsPlayerConnected(playerid)) return 0;
  2500.     #if defined FILTERSCRIPT
  2501.         return CallRemoteFunction("ac_AntiCheatGetVehicleID", "i", playerid);
  2502.     #else
  2503.         return ac_AntiCheatGetVehicleID(playerid);
  2504.     #endif
  2505. }
  2506.  
  2507. stock AntiCheatGetWeapon(playerid)
  2508. {
  2509.     if(!IsPlayerConnected(playerid)) return -1;
  2510.     #if defined FILTERSCRIPT
  2511.         return CallRemoteFunction("ac_AntiCheatGetWeapon", "i", playerid);
  2512.     #else
  2513.         return ac_AntiCheatGetWeapon(playerid);
  2514.     #endif
  2515. }
  2516.  
  2517. stock AntiCheatGetVehicleSeat(playerid)
  2518. {
  2519.     if(!IsPlayerConnected(playerid)) return -1;
  2520.     #if defined FILTERSCRIPT
  2521.         return CallRemoteFunction("ac_AntiCheatGetVehicleSeat", "i", playerid);
  2522.     #else
  2523.         return ac_AntiCheatGetVehicleSeat(playerid);
  2524.     #endif
  2525. }
  2526.  
  2527. stock AntiCheatGetSpecialAction(playerid)
  2528. {
  2529.     if(!IsPlayerConnected(playerid)) return 0;
  2530.     #if defined FILTERSCRIPT
  2531.         return CallRemoteFunction("ac_AntiCheatGetSpecialAction", "i", playerid);
  2532.     #else
  2533.         return ac_AntiCheatGetSpecialAction(playerid);
  2534.     #endif
  2535. }
  2536.  
  2537. stock AntiCheatGetLastSpecialAction(playerid)
  2538. {
  2539.     if(!IsPlayerConnected(playerid)) return 0;
  2540.     #if defined FILTERSCRIPT
  2541.         return CallRemoteFunction("ac_AntiCheatGetLastSpecialActio", "i", playerid);
  2542.     #else
  2543.         return ac_AntiCheatGetLastSpecialActio(playerid);
  2544.     #endif
  2545. }
  2546.  
  2547. stock AntiCheatGetLastShotWeapon(playerid)
  2548. {
  2549.     if(!IsPlayerConnected(playerid)) return -1;
  2550.     #if defined FILTERSCRIPT
  2551.         return CallRemoteFunction("ac_AntiCheatGetLastShotWeapon", "i", playerid);
  2552.     #else
  2553.         return ac_AntiCheatGetLastShotWeapon(playerid);
  2554.     #endif
  2555. }
  2556.  
  2557. stock AntiCheatGetLastPickup(playerid)
  2558. {
  2559.     if(!IsPlayerConnected(playerid)) return -1;
  2560.     #if defined FILTERSCRIPT
  2561.         return CallRemoteFunction("ac_AntiCheatGetLastPickup", "i", playerid);
  2562.     #else
  2563.         return ac_AntiCheatGetLastPickup(playerid);
  2564.     #endif
  2565. }
  2566.  
  2567. stock AntiCheatGetLastUpdateTime(playerid)
  2568. {
  2569.     if(!IsPlayerConnected(playerid)) return 0;
  2570.     #if defined FILTERSCRIPT
  2571.         return CallRemoteFunction("ac_AntiCheatGetLastUpdateTime", "i", playerid);
  2572.     #else
  2573.         return ac_AntiCheatGetLastUpdateTime(playerid);
  2574.     #endif
  2575. }
  2576.  
  2577. stock AntiCheatGetLastReloadTime(playerid)
  2578. {
  2579.     if(!IsPlayerConnected(playerid)) return 0;
  2580.     #if defined FILTERSCRIPT
  2581.         return CallRemoteFunction("ac_AntiCheatGetLastReloadTime", "i", playerid);
  2582.     #else
  2583.         return ac_AntiCheatGetLastReloadTime(playerid);
  2584.     #endif
  2585. }
  2586.  
  2587. stock AntiCheatGetLastEnteredVehTime(playerid)
  2588. {
  2589.     if(!IsPlayerConnected(playerid)) return 0;
  2590.     #if defined FILTERSCRIPT
  2591.         return CallRemoteFunction("ac_AntiCheatGetLastEnteredVehTi", "i", playerid);
  2592.     #else
  2593.         return ac_AntiCheatGetLastEnteredVehTi(playerid);
  2594.     #endif
  2595. }
  2596.  
  2597. stock AntiCheatGetLastShotTime(playerid)
  2598. {
  2599.     if(!IsPlayerConnected(playerid)) return 0;
  2600.     #if defined FILTERSCRIPT
  2601.         return CallRemoteFunction("ac_AntiCheatGetLastShotTime", "i", playerid);
  2602.     #else
  2603.         return ac_AntiCheatGetLastShotTime(playerid);
  2604.     #endif
  2605. }
  2606.  
  2607. stock AntiCheatGetLastSpawnTime(playerid)
  2608. {
  2609.     if(!IsPlayerConnected(playerid)) return 0;
  2610.     #if defined FILTERSCRIPT
  2611.         return CallRemoteFunction("ac_AntiCheatGetLastSpawnTime", "i", playerid);
  2612.     #else
  2613.         return ac_AntiCheatGetLastSpawnTime(playerid);
  2614.     #endif
  2615. }
  2616.  
  2617. stock AntiCheatIntEnterExitsIsEnabled(playerid)
  2618. {
  2619.     if(!IsPlayerConnected(playerid)) return 0;
  2620.     #if defined FILTERSCRIPT
  2621.         return CallRemoteFunction("ac_AntiCheatIntEnterExitsIsEnab", "i", playerid);
  2622.     #else
  2623.         return ac_AntiCheatIntEnterExitsIsEnab(playerid);
  2624.     #endif
  2625. }
  2626.  
  2627. stock AntiCheatStuntBonusIsEnabled(playerid)
  2628. {
  2629.     if(!IsPlayerConnected(playerid)) return 0;
  2630.     #if defined FILTERSCRIPT
  2631.         return CallRemoteFunction("ac_AntiCheatStuntBonusIsEnabled", "i", playerid);
  2632.     #else
  2633.         return ac_AntiCheatStuntBonusIsEnabled(playerid);
  2634.     #endif
  2635. }
  2636.  
  2637. stock AntiCheatIsInModShop(playerid)
  2638. {
  2639.     if(!IsPlayerConnected(playerid)) return 0;
  2640.     #if defined FILTERSCRIPT
  2641.         return CallRemoteFunction("ac_AntiCheatIsInModShop", "i", playerid);
  2642.     #else
  2643.         return ac_AntiCheatIsInModShop(playerid);
  2644.     #endif
  2645. }
  2646.  
  2647. stock AntiCheatIsFrozen(playerid)
  2648. {
  2649.     if(!IsPlayerConnected(playerid)) return 0;
  2650.     #if defined FILTERSCRIPT
  2651.         return CallRemoteFunction("ac_AntiCheatIsFrozen", "i", playerid);
  2652.     #else
  2653.         return ac_AntiCheatIsFrozen(playerid);
  2654.     #endif
  2655. }
  2656.  
  2657. stock AntiCheatIsDead(playerid)
  2658. {
  2659.     if(!IsPlayerConnected(playerid)) return 0;
  2660.     #if defined FILTERSCRIPT
  2661.         return CallRemoteFunction("ac_AntiCheatIsDead", "i", playerid);
  2662.     #else
  2663.         return ac_AntiCheatIsDead(playerid);
  2664.     #endif
  2665. }
  2666.  
  2667. stock AntiCheatIsConnected(playerid)
  2668. {
  2669.     if(!IsPlayerConnected(playerid)) return 0;
  2670.     #if defined FILTERSCRIPT
  2671.         return CallRemoteFunction("ac_AntiCheatIsConnected", "i", playerid);
  2672.     #else
  2673.         return ac_AntiCheatIsConnected(playerid);
  2674.     #endif
  2675. }
  2676.  
  2677. #if defined _inc_y_hooks || defined _INC_y_hooks
  2678.     DEFINE_HOOK_REPLACEMENT(SirenState, Siren);
  2679.     DEFINE_HOOK_REPLACEMENT(Vehicle, Veh);
  2680. #endif
  2681.  
  2682. #if defined FILTERSCRIPT
  2683.  
  2684. static fs_AntiCheatGetNextDialog(playerid)
  2685. {
  2686.     if(!IsPlayerConnected(playerid)) return 0;
  2687.     return CallRemoteFunction("ac_AntiCheatGetNextDialog", "i", playerid);
  2688. }
  2689.  
  2690. static fs_AntiCheatSetDialog(playerid, dialogid)
  2691. {
  2692.     if(!IsPlayerConnected(playerid)) return 0;
  2693.     return CallRemoteFunction("ac_ShowPlayerDialog", "id", playerid, dialogid);
  2694. }
  2695.  
  2696. static fs_AntiCheatSetNextDialog(playerid, dialogid)
  2697. {
  2698.     if(!IsPlayerConnected(playerid)) return 0;
  2699.     return CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, dialogid);
  2700. }
  2701.  
  2702. #else
  2703.  
  2704. #if defined _inc_y_hooks || defined _INC_y_hooks
  2705.     hook OnGameModeInit()
  2706. #else
  2707.     public OnGameModeInit()
  2708. #endif
  2709. {
  2710.     if(!ac_LoadCfg()) printf(CFG_OPENING_ERROR, AC_CONFIG_FILE);
  2711.     if(ac_ACAllow[42])
  2712.     {
  2713.         #if !AC_USE_QUERY
  2714.             ac_QueryEnable = !!GetConsoleVarAsBool("query");
  2715.             SendRconCommand("query 0");
  2716.         #endif
  2717.         #undef AC_USE_QUERY
  2718.         ac_RconEnable = !!GetConsoleVarAsBool("rcon");
  2719.         SendRconCommand("rcon 0");
  2720.     }
  2721.     #if AC_MAX_CONNECTS_FROM_IP > 1
  2722.         ac_ACAllow[37] = false;
  2723.     #endif
  2724.     ac_LagCompMode = !!GetConsoleVarAsInt("lagcompmode");
  2725.     print(" ");
  2726.     print("--------------------------------------");
  2727.     print(LOADED_MSG_1);
  2728.     printf(LOADED_MSG_2, NEX_AC_VERSION);
  2729.     print(LOADED_MSG_3);
  2730.     print("--------------------------------------\n");
  2731.     new ac_a = 1;
  2732.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  2733.         && defined ac_OnGameModeInit
  2734.         ac_a = ac_OnGameModeInit();
  2735.     #endif
  2736.     static ac_strtmp[10];
  2737.     GetConsoleVarAsString("version", ac_strtmp, sizeof ac_strtmp);
  2738.     if(strcmp(ac_strtmp, AC_SERVER_VERSION)) print(VERSION_WARNING);
  2739.     #undef AC_SERVER_VERSION
  2740.     return ac_a;
  2741. }
  2742.  
  2743. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  2744.     #if defined _ALS_OnGameModeInit
  2745.         #undef OnGameModeInit
  2746.     #else
  2747.         #define _ALS_OnGameModeInit
  2748.     #endif
  2749.     #define OnGameModeInit ac_OnGameModeInit
  2750.     #if defined ac_OnGameModeInit
  2751.         forward ac_OnGameModeInit();
  2752.     #endif
  2753. #endif
  2754.  
  2755. #if defined _inc_y_hooks || defined _INC_y_hooks
  2756.     hook OnGameModeExit()
  2757. #else
  2758.     public OnGameModeExit()
  2759. #endif
  2760. {
  2761.     new ac_a = 1;
  2762.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  2763.         && defined ac_OnGameModeExit
  2764.         ac_a = ac_OnGameModeExit();
  2765.     #endif
  2766.     print(" ");
  2767.     print("--------------------------------------");
  2768.     print(STATS_STRING_1);
  2769.     print(STATS_STRING_2);
  2770.     printf(STATS_STRING_3, ac_sInfo[0]);
  2771.     printf(STATS_STRING_4, ac_sInfo[1]);
  2772.     printf(STATS_STRING_5, ac_sInfo[2]);
  2773.     printf(STATS_STRING_6, ac_sInfo[3]);
  2774.     printf(STATS_STRING_7, ac_sInfo[4]);
  2775.     printf(STATS_STRING_8, ac_sInfo[5]);
  2776.     print("--------------------------------------\n");
  2777.     return ac_a;
  2778. }
  2779.  
  2780. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  2781.     #if defined _ALS_OnGameModeExit
  2782.         #undef OnGameModeExit
  2783.     #else
  2784.         #define _ALS_OnGameModeExit
  2785.     #endif
  2786.     #define OnGameModeExit ac_OnGameModeExit
  2787.     #if defined ac_OnGameModeExit
  2788.         forward ac_OnGameModeExit();
  2789.     #endif
  2790. #endif
  2791.  
  2792. #if defined _inc_y_hooks || defined _INC_y_hooks
  2793.     hook OnPlayerConnect(playerid)
  2794. #else
  2795.     public OnPlayerConnect(playerid)
  2796. #endif
  2797. {
  2798.     GetPlayerIp(playerid, ACInfo[playerid][acIp], 16);
  2799.     if(IsPlayerNPC(playerid))
  2800.     {
  2801.         if(ac_ACAllow[36] && strcmp(ACInfo[playerid][acIp], "127.0.0.1")) ac_KickWithCode(playerid, "", 0, 36);
  2802.         ACInfo[playerid][acTimerID] = 0;
  2803.     }
  2804.     else
  2805.     {
  2806.         if(ac_ACAllow[48] && ACInfo[playerid][acOnline]) ac_KickWithCode(playerid, "", 0, 48, 1);
  2807.         if(ac_ACAllow[41])
  2808.         {
  2809.             static ac_ver[9];
  2810.             GetPlayerVersion(playerid, ac_ver, sizeof ac_ver);
  2811.             if(!strcmp(ac_ver, "unknown", true))
  2812.             {
  2813.                 #if defined DEBUG
  2814.                     printf(DEBUG_CODE_2, playerid, ac_ver);
  2815.                 #endif
  2816.                 ac_KickWithCode(playerid, "", 0, 41);
  2817.             }
  2818.         }
  2819.         new ac_i = AC_MAX_CONNECTS_FROM_IP;
  2820.         if(ac_ACAllow[40])
  2821.         {
  2822.             #if defined foreach
  2823.                 foreach(new ac_f : Player)
  2824.                 {
  2825.                     if(ac_f != playerid && !IsPlayerNPC(ac_f) && !strcmp(ACInfo[playerid][acIp], ACInfo[ac_f][acIp], false))
  2826.             #else
  2827.                 for(new ac_f = GetPlayerPoolSize(); ac_f >= 0; --ac_f)
  2828.                 {
  2829.                     if(ac_f != playerid && IsPlayerConnected(ac_f) && !IsPlayerNPC(ac_f) &&
  2830.                     !strcmp(ACInfo[playerid][acIp], ACInfo[ac_f][acIp], false))
  2831.             #endif
  2832.                 {
  2833.                     ac_i--;
  2834.                     if(ac_i < 1)
  2835.                     {
  2836.                         #if defined DEBUG
  2837.                             printf(DEBUG_CODE_3, playerid, AC_MAX_CONNECTS_FROM_IP);
  2838.                         #endif
  2839.                         #undef AC_MAX_CONNECTS_FROM_IP
  2840.                         ac_KickWithCode(playerid, "", 0, 40);
  2841.                         break;
  2842.                     }
  2843.                 }
  2844.             }
  2845.         }
  2846.         ACInfo[playerid][acSpec] =
  2847.         ACInfo[playerid][acDeathRes] = false;
  2848.         ACInfo[playerid][acDead] = true;
  2849.         ACInfo[playerid][acIntEnterExits] = ac_IntEnterExits;
  2850.         ACInfo[playerid][acStuntBonus] = ac_StuntBonus;
  2851.         ACInfo[playerid][acCheatCount][0] =
  2852.         ACInfo[playerid][acLastWeapon] =
  2853.         ACInfo[playerid][acSpawnRes] =
  2854.         ACInfo[playerid][acLogged] =
  2855.         ACInfo[playerid][acKicked] =
  2856.         ACInfo[playerid][acMoney] =
  2857.         ACInfo[playerid][acInt] = 0;
  2858.         ACInfo[playerid][acSet][12] =
  2859.         ACInfo[playerid][acSet][10] =
  2860.         ACInfo[playerid][acSet][0] =
  2861.         ACInfo[playerid][acNextDialog] =
  2862.         ACInfo[playerid][acDialog] = -1;
  2863.         ACInfo[playerid][acAnim] = -2;
  2864.         for(ac_i = 12; ac_i >= 0; --ac_i)
  2865.         {
  2866.             ACInfo[playerid][acSetWeapon][ac_i] = -1;
  2867.             ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  2868.         }
  2869.         for(ac_i = 27; ac_i >= 0; --ac_i) ACInfo[playerid][acFloodCount][ac_i] = 0;
  2870.         ACInfo[playerid][acDropJpX] = ACInfo[playerid][acDropJpY] = ACInfo[playerid][acDropJpZ] = 20000.0;
  2871.         memcpy(ACInfo[playerid][acACAllow], ac_ACAllow, 0, sizeof(ac_ACAllow) * 4, sizeof ac_ACAllow);
  2872.         #if defined SetPlayerTimerEx_
  2873.             ACInfo[playerid][acTimerID] = SetPlayerTimerEx_(playerid, "ac_Timer", 0, 1000, 1, "i", playerid);
  2874.         #else
  2875.             ACInfo[playerid][acTimerID] = SetTimerEx("ac_Timer", 1000, false, "i", playerid);
  2876.         #endif
  2877.     }
  2878.     ACInfo[playerid][acOnline] = true;
  2879.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  2880.         && defined ac_OnPlayerConnect
  2881.         return ac_OnPlayerConnect(playerid);
  2882.     #else
  2883.         return 1;
  2884.     #endif
  2885. }
  2886.  
  2887. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  2888.     #if defined _ALS_OnPlayerConnect
  2889.         #undef OnPlayerConnect
  2890.     #else
  2891.         #define _ALS_OnPlayerConnect
  2892.     #endif
  2893.     #define OnPlayerConnect ac_OnPlayerConnect
  2894.     #if defined ac_OnPlayerConnect
  2895.         forward ac_OnPlayerConnect(playerid);
  2896.     #endif
  2897. #endif
  2898.  
  2899. #if defined _inc_y_hooks || defined _INC_y_hooks
  2900.     hook OnPlayerDisconnect(playerid, reason)
  2901. #else
  2902.     public OnPlayerDisconnect(playerid, reason)
  2903. #endif
  2904. {
  2905.     ACInfo[playerid][acOnline] = false;
  2906.     if(!IsPlayerNPC(playerid))
  2907.     {
  2908.         #if defined KillPlayerTimer
  2909.             KillPlayerTimer(ACInfo[playerid][acTimerID]);
  2910.         #else
  2911.             KillTimer(ACInfo[playerid][acTimerID]);
  2912.         #endif
  2913.         if(ACInfo[playerid][acACAllow][37]) BlockIpAddress(ACInfo[playerid][acIp],
  2914.         (AC_MIN_TIME_RECONNECT * 1000) - (reason > 0 ? 0 : GetConsoleVarAsInt("playertimeout")));
  2915.         #undef AC_MIN_TIME_RECONNECT
  2916.     }
  2917.     #if defined KillPlayerTimer
  2918.         KillPlayerTimer(ACInfo[playerid][acKickTimerID]);
  2919.     #else
  2920.         KillTimer(ACInfo[playerid][acKickTimerID]);
  2921.     #endif
  2922.     new ac_veh = ACInfo[playerid][acLastVeh];
  2923.     if(ac_veh > 0 && ACVehInfo[ac_veh][acDriver] == playerid)
  2924.     {
  2925.         ACVehInfo[ac_veh][acDriver] = INVALID_PLAYER_ID;
  2926.         if(ACInfo[playerid][acKicked] == 2)
  2927.         {
  2928.             LinkVehicleToInterior(ac_veh, ACVehInfo[ac_veh][acInt]);
  2929.             SetVehicleZAngle(ac_veh, ACVehInfo[ac_veh][acZAngle]);
  2930.             SetVehicleHealth(ac_veh, ACVehInfo[ac_veh][acHealth]);
  2931.             ChangeVehiclePaintjob(ac_veh, ACVehInfo[ac_veh][acPaintJob]);
  2932.         }
  2933.     }
  2934.     if((ac_veh = ACInfo[playerid][acVeh]) > 0 && ACVehInfo[ac_veh][acDriver] == playerid)
  2935.     {
  2936.         ACVehInfo[ac_veh][acDriver] = INVALID_PLAYER_ID;
  2937.         if(ACInfo[playerid][acKicked] == 2)
  2938.         {
  2939.             LinkVehicleToInterior(ac_veh, ACVehInfo[ac_veh][acInt]);
  2940.             SetVehicleZAngle(ac_veh, ACVehInfo[ac_veh][acZAngle]);
  2941.             SetVehiclePos(ac_veh, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  2942.             SetVehicleHealth(ac_veh, ACVehInfo[ac_veh][acHealth]);
  2943.             ChangeVehiclePaintjob(ac_veh, ACVehInfo[ac_veh][acPaintJob]);
  2944.         }
  2945.     }
  2946.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  2947.         && defined ac_OnPlayerDisconnect
  2948.         return ac_OnPlayerDisconnect(playerid, reason);
  2949.     #else
  2950.         return 1;
  2951.     #endif
  2952. }
  2953.  
  2954. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  2955.     #if defined _ALS_OnPlayerDisconnect
  2956.         #undef OnPlayerDisconnect
  2957.     #else
  2958.         #define _ALS_OnPlayerDisconnect
  2959.     #endif
  2960.     #define OnPlayerDisconnect ac_OnPlayerDisconnect
  2961.     #if defined ac_OnPlayerDisconnect
  2962.         forward ac_OnPlayerDisconnect(playerid, reason);
  2963.     #endif
  2964. #endif
  2965.  
  2966. #if defined _inc_y_hooks || defined _INC_y_hooks
  2967.     hook OnPlayerSpawn(playerid)
  2968. #else
  2969.     public OnPlayerSpawn(playerid)
  2970. #endif
  2971. {
  2972.     if(ACInfo[playerid][acKicked]) return 0;
  2973.     if(!IsPlayerNPC(playerid))
  2974.     {
  2975.         new ac_i, ac_gtc = GetTickCount();
  2976.         if(ACInfo[playerid][acSpec] && ACInfo[playerid][acSet][7] < 2)
  2977.         {
  2978.             ACInfo[playerid][acSet][3] =
  2979.             ACInfo[playerid][acSet][4] =
  2980.             ACInfo[playerid][acSet][5] =
  2981.             ACInfo[playerid][acSet][8] =
  2982.             ACInfo[playerid][acSet][9] = -1;
  2983.             ACInfo[playerid][acSpec] = false;
  2984.         }
  2985.         else
  2986.         {
  2987.             if(ACInfo[playerid][acACAllow][27] &&
  2988.             (ACInfo[playerid][acSpawnRes] < 1 || ac_gtc < ACInfo[playerid][acSpawnTime] + 1000))
  2989.             {
  2990.                 #if defined DEBUG
  2991.                     printf("[Nex-AC debug] Spawn res: %d, Respawn time: %d",
  2992.                     ACInfo[playerid][acSpawnRes], ac_gtc - ACInfo[playerid][acSpawnTime]);
  2993.                 #endif
  2994.                 ac_KickWithCode(playerid, "", 0, 27);
  2995.                 #if defined OnCheatDetected
  2996.                     ACInfo[playerid][acSpawnRes] = 1;
  2997.                 #endif
  2998.             }
  2999.             ACInfo[playerid][acSpawnRes]--;
  3000.             if(!(1 <= ACInfo[playerid][acSet][7] <= 2))
  3001.             {
  3002.                 for(ac_i = 11; ac_i >= 0; --ac_i) ACInfo[playerid][acSet][ac_i] = -1;
  3003.                 SetPlayerHealth(playerid, 100.0);
  3004.                 SetPlayerArmour(playerid, 0.0);
  3005.                 SetPlayerInterior(playerid, 0);
  3006.                 ACInfo[playerid][acHealth] = 100;
  3007.                 ACInfo[playerid][acArmour] =
  3008.                 ACInfo[playerid][acInt] = 0;
  3009.             }
  3010.         }
  3011.         if(!(1 <= ACInfo[playerid][acSet][7] <= 2))
  3012.         {
  3013.             for(ac_i = 12; ac_i >= 0; --ac_i)
  3014.             {
  3015.                 ACInfo[playerid][acSetWeapon][ac_i] = -1;
  3016.                 ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  3017.             }
  3018.             ACInfo[playerid][acNextSpecAct] = -1;
  3019.             ACInfo[playerid][acTpToZ] = false;
  3020.             ACInfo[playerid][acUnFrozen] = true;
  3021.         }
  3022.         for(ac_i = 12; ac_i >= 0; --ac_i) ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acAmmo][ac_i] = 0;
  3023.         ACInfo[playerid][acParachute] =
  3024.         ACInfo[playerid][acModShop] =
  3025.         ACInfo[playerid][acDead] = false;
  3026.         ACInfo[playerid][acLastPickup] =
  3027.         ACInfo[playerid][acSet][7] =
  3028.         ACInfo[playerid][acSeat] = -1;
  3029.         ACInfo[playerid][acCheatCount][14] =
  3030.         ACInfo[playerid][acCheatCount][9] =
  3031.         ACInfo[playerid][acLastSpecAct] =
  3032.         ACInfo[playerid][acLastShot] =
  3033.         ACInfo[playerid][acLastVeh] =
  3034.         ACInfo[playerid][acSpecAct] =
  3035.         ACInfo[playerid][acDmgRes] =
  3036.         ACInfo[playerid][acSpeed] =
  3037.         ACInfo[playerid][acVeh] = 0;
  3038.         ACInfo[playerid][acLogged] = 2;
  3039.         ACInfo[playerid][acSpawnTime] = ac_gtc + 150;
  3040.         if(ACInfo[playerid][acSpawnWeapon1] != -1)
  3041.         {
  3042.             ac_i = ac_wSlot[ACInfo[playerid][acSpawnWeapon1]];
  3043.             ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acSpawnWeapon1];
  3044.             ACInfo[playerid][acAmmo][ac_i] = ACInfo[playerid][acSpawnAmmo1];
  3045.         }
  3046.         if(ACInfo[playerid][acSpawnWeapon2] != -1)
  3047.         {
  3048.             ac_i = ac_wSlot[ACInfo[playerid][acSpawnWeapon2]];
  3049.             ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acSpawnWeapon2];
  3050.             ACInfo[playerid][acAmmo][ac_i] = ACInfo[playerid][acSpawnAmmo2];
  3051.         }
  3052.         if(ACInfo[playerid][acSpawnWeapon3] != -1)
  3053.         {
  3054.             ac_i = ac_wSlot[ACInfo[playerid][acSpawnWeapon3]];
  3055.             ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acSpawnWeapon3];
  3056.             ACInfo[playerid][acAmmo][ac_i] = ACInfo[playerid][acSpawnAmmo3];
  3057.         }
  3058.     }
  3059.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3060.         && defined ac_OnPlayerSpawn
  3061.         return ac_OnPlayerSpawn(playerid);
  3062.     #else
  3063.         return 1;
  3064.     #endif
  3065. }
  3066.  
  3067. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3068.     #if defined _ALS_OnPlayerSpawn
  3069.         #undef OnPlayerSpawn
  3070.     #else
  3071.         #define _ALS_OnPlayerSpawn
  3072.     #endif
  3073.     #define OnPlayerSpawn ac_OnPlayerSpawn
  3074.     #if defined ac_OnPlayerSpawn
  3075.         forward ac_OnPlayerSpawn(playerid);
  3076.     #endif
  3077. #endif
  3078.  
  3079. #if defined _inc_y_hooks || defined _INC_y_hooks
  3080.     hook OnPlayerDeath(playerid, killerid, reason)
  3081. #else
  3082.     public OnPlayerDeath(playerid, killerid, reason)
  3083. #endif
  3084. {
  3085.     if(ACInfo[playerid][acKicked]) return 0;
  3086.     if(ACInfo[playerid][acACAllow][28] &&
  3087.     (ACInfo[playerid][acDead] || !ACInfo[playerid][acDeathRes] &&
  3088.     reason != 255 && (reason != WEAPON_COLLISION || killerid != INVALID_PLAYER_ID)))
  3089.     {
  3090.         #if defined DEBUG
  3091.             printf("[Nex-AC debug] Is dead: %d, Death res: %d, killerid: %d, reason: %d",
  3092.             ACInfo[playerid][acDead], ACInfo[playerid][acDeathRes], killerid, reason);
  3093.         #endif
  3094.         ac_KickWithCode(playerid, "", 0, 28);
  3095.     }
  3096.     ACInfo[playerid][acDead] = true;
  3097.     ACInfo[playerid][acSpawnRes] = 1;
  3098.     ACInfo[playerid][acDeathRes] = false;
  3099.     ACInfo[playerid][acSpawnTime] = GetTickCount();
  3100.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3101.         && defined ac_OnPlayerDeath
  3102.         return ac_OnPlayerDeath(playerid, killerid, reason);
  3103.     #else
  3104.         return 1;
  3105.     #endif
  3106. }
  3107.  
  3108. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3109.     #if defined _ALS_OnPlayerDeath
  3110.         #undef OnPlayerDeath
  3111.     #else
  3112.         #define _ALS_OnPlayerDeath
  3113.     #endif
  3114.     #define OnPlayerDeath ac_OnPlayerDeath
  3115.     #if defined ac_OnPlayerDeath
  3116.         forward ac_OnPlayerDeath(playerid, killerid, reason);
  3117.     #endif
  3118. #endif
  3119.  
  3120. #if defined _inc_y_hooks || defined _INC_y_hooks
  3121.     hook OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
  3122. #else
  3123.     public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
  3124. #endif
  3125. {
  3126.     if(ACInfo[playerid][acKicked]) return 1;
  3127.     ACInfo[playerid][acDeathRes] = true;
  3128.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3129.         && defined ac_OnPlayerTakeDamage
  3130.         return ac_OnPlayerTakeDamage(playerid, issuerid, amount, weaponid, bodypart);
  3131.     #else
  3132.         return 0;
  3133.     #endif
  3134. }
  3135.  
  3136. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3137.     #if defined _ALS_OnPlayerTakeDamage
  3138.         #undef OnPlayerTakeDamage
  3139.     #else
  3140.         #define _ALS_OnPlayerTakeDamage
  3141.     #endif
  3142.     #define OnPlayerTakeDamage ac_OnPlayerTakeDamage
  3143.     #if defined ac_OnPlayerTakeDamage
  3144.         forward ac_OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart);
  3145.     #endif
  3146. #endif
  3147.  
  3148. #if defined _inc_y_hooks || defined _INC_y_hooks
  3149.     hook OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
  3150. #else
  3151.     public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
  3152. #endif
  3153. {
  3154.     if(ACInfo[playerid][acKicked]) return 1;
  3155.     if(ACInfo[playerid][acACAllow][47] && !(3 <= bodypart <= 9))
  3156.     {
  3157.         #if defined DEBUG
  3158.             printf("[Nex-AC debug] Damagedid: %d, amount: %f, weaponid: %d, bodypart: %d", damagedid, amount, weaponid, bodypart);
  3159.         #endif
  3160.         ac_KickWithCode(playerid, "", 0, 47, 3);
  3161.         return 1;
  3162.     }
  3163.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3164.         && defined ac_OnPlayerGiveDamage
  3165.         return ac_OnPlayerGiveDamage(playerid, damagedid, amount, weaponid, bodypart);
  3166.     #else
  3167.         return 0;
  3168.     #endif
  3169. }
  3170.  
  3171. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3172.     #if defined _ALS_OnPlayerGiveDamage
  3173.         #undef OnPlayerGiveDamage
  3174.     #else
  3175.         #define _ALS_OnPlayerGiveDamage
  3176.     #endif
  3177.     #define OnPlayerGiveDamage ac_OnPlayerGiveDamage
  3178.     #if defined ac_OnPlayerGiveDamage
  3179.         forward ac_OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart);
  3180.     #endif
  3181. #endif
  3182.  
  3183. #endif
  3184.  
  3185. #if defined FILTERSCRIPT
  3186.  
  3187. #if defined _inc_y_hooks || defined _INC_y_hooks
  3188.     hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  3189. #else
  3190.     public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  3191. #endif
  3192. {
  3193.     if(dialogid != AntiCheatGetDialog(playerid))
  3194.     {
  3195.         new ac_nd = fs_AntiCheatGetNextDialog(playerid);
  3196.         if(dialogid == ac_nd) fs_AntiCheatSetDialog(playerid, ac_nd);
  3197.     }
  3198.     fs_AntiCheatSetNextDialog(playerid, -1);
  3199.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3200.         && defined ac_fs_OnDialogResponse
  3201.         return ac_fs_OnDialogResponse(playerid, dialogid, response, listitem, inputtext);
  3202.     #else
  3203.         return 0;
  3204.     #endif
  3205. }
  3206.  
  3207. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3208.     #if defined _ALS_OnDialogResponse
  3209.         #undef OnDialogResponse
  3210.     #else
  3211.         #define _ALS_OnDialogResponse
  3212.     #endif
  3213.     #define OnDialogResponse ac_fs_OnDialogResponse
  3214.     #if defined ac_fs_OnDialogResponse
  3215.         forward ac_fs_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
  3216.     #endif
  3217. #endif
  3218.  
  3219. #else
  3220.  
  3221. #if defined _inc_y_hooks || defined _INC_y_hooks
  3222.     hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  3223. #else
  3224.     public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  3225. #endif
  3226. {
  3227.     if(ACInfo[playerid][acKicked]) return 1;
  3228.     new ac_i = GetTickCount();
  3229.     if(ACInfo[playerid][acACAllow][49])
  3230.     {
  3231.         if(ac_i < ACInfo[playerid][acCall][0] + ac_Mtfc[0][0]) ac_FloodDetect(playerid, 0);
  3232.         else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  3233.         else ACInfo[playerid][acFloodCount][0] = ACInfo[playerid][acFloodCount][27] = 0;
  3234.     }
  3235.     if(ACInfo[playerid][acACAllow][39] && (dialogid != ACInfo[playerid][acDialog] || listitem < -1))
  3236.     {
  3237.         #if defined DEBUG
  3238.             printf("[Nex-AC debug] AC dialog: %d, dialogid: %d, listitem: %d", ACInfo[playerid][acDialog], dialogid, listitem);
  3239.         #endif
  3240.         #if defined OnCheatDetected
  3241.             ac_KickWithCode(playerid, "", 0, 39);
  3242.         #else
  3243.             ac_KickWithCode(playerid, "", 0, 39);
  3244.             return 1;
  3245.         #endif
  3246.     }
  3247.     ACInfo[playerid][acDialog] = -1;
  3248.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][0] = ac_i;
  3249.     if(ACInfo[playerid][acACAllow][45])
  3250.     {
  3251.         for(ac_i = strlen(inputtext) - 1; ac_i >= 0; --ac_i)
  3252.         {
  3253.             if(inputtext[ac_i] == '%') strdel(inputtext, ac_i, ac_i + 1);
  3254.         }
  3255.     }
  3256.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3257.         && defined ac_OnDialogResponse
  3258.         return ac_OnDialogResponse(playerid, dialogid, response, listitem, inputtext);
  3259.     #else
  3260.         return 0;
  3261.     #endif
  3262. }
  3263.  
  3264. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3265.     #if defined _ALS_OnDialogResponse
  3266.         #undef OnDialogResponse
  3267.     #else
  3268.         #define _ALS_OnDialogResponse
  3269.     #endif
  3270.     #define OnDialogResponse ac_OnDialogResponse
  3271.     #if defined ac_OnDialogResponse
  3272.         forward ac_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
  3273.     #endif
  3274. #endif
  3275.  
  3276. #if defined _inc_y_hooks || defined _INC_y_hooks
  3277.     hook OnEnterExitModShop(playerid, enterexit, interiorid)
  3278. #else
  3279.     public OnEnterExitModShop(playerid, enterexit, interiorid)
  3280. #endif
  3281. {
  3282.     if(ACInfo[playerid][acKicked]) return 0;
  3283.     #if !AC_USE_TUNING_GARAGES && !defined OnCheatDetected
  3284.         if(ACInfo[playerid][acACAllow][23]) return ac_KickWithCode(playerid, "", 0, 23, 1);
  3285.         #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3286.             && defined ac_OnEnterExitModShop
  3287.             return ac_OnEnterExitModShop(playerid, enterexit, interiorid);
  3288.         #else
  3289.             return 1;
  3290.         #endif
  3291.     #else
  3292.         #if !AC_USE_TUNING_GARAGES
  3293.             if(ACInfo[playerid][acACAllow][23]) ac_KickWithCode(playerid, "", 0, 23, 1);
  3294.         #endif
  3295.         new ac_gtc = GetTickCount();
  3296.         if(ACInfo[playerid][acACAllow][49])
  3297.         {
  3298.             if(ac_gtc < ACInfo[playerid][acCall][1] + ac_Mtfc[1][0]) ac_FloodDetect(playerid, 1);
  3299.             else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  3300.             else ACInfo[playerid][acFloodCount][1] = ACInfo[playerid][acFloodCount][27] = 0;
  3301.         }
  3302.         ACInfo[playerid][acModShop] = !!enterexit;
  3303.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][1] = ac_gtc;
  3304.         ACInfo[playerid][acGtc][11] = ac_gtc + 2650;
  3305.         #if defined foreach
  3306.             foreach(new ac_i : Player)
  3307.             {
  3308.                 if(ACInfo[ac_i][acVeh] == ACInfo[playerid][acVeh]) ACInfo[ac_i][acInt] = interiorid;
  3309.             }
  3310.         #else
  3311.             for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  3312.             {
  3313.                 if(IsPlayerInVehicle(ac_i, ACInfo[playerid][acVeh])) ACInfo[ac_i][acInt] = interiorid;
  3314.             }
  3315.         #endif
  3316.         #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3317.             && defined ac_OnEnterExitModShop
  3318.             return ac_OnEnterExitModShop(playerid, enterexit, interiorid);
  3319.         #else
  3320.             return 1;
  3321.         #endif
  3322.     #endif
  3323. }
  3324.  
  3325. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3326.     #if defined _ALS_OnEnterExitModShop
  3327.         #undef OnEnterExitModShop
  3328.     #else
  3329.         #define _ALS_OnEnterExitModShop
  3330.     #endif
  3331.     #define OnEnterExitModShop ac_OnEnterExitModShop
  3332.     #if defined ac_OnEnterExitModShop
  3333.         forward ac_OnEnterExitModShop(playerid, enterexit, interiorid);
  3334.     #endif
  3335. #endif
  3336.  
  3337. #if defined _inc_y_hooks || defined _INC_y_hooks
  3338.     hook OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  3339. #else
  3340.     public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  3341. #endif
  3342. {
  3343.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked]) return 0;
  3344.     new ac_vehid = GetPlayerVehicleID(playerid);
  3345.     if(newinteriorid != ACInfo[playerid][acSet][0])
  3346.     {
  3347.         if(ACInfo[playerid][acSet][0] == -1)
  3348.         {
  3349.             if(ac_vehid > 0)
  3350.             {
  3351.                 if(ACInfo[playerid][acACAllow][3] && newinteriorid != ACInfo[playerid][acInt])
  3352.                 {
  3353.                     #if defined DEBUG
  3354.                         printf("[Nex-AC debug] AC interior: %d, acInt (last): %d, newinteriorid: %d, oldinteriorid: %d, vehicleid: %d",
  3355.                         ACInfo[playerid][acSet][0], ACInfo[playerid][acInt], newinteriorid, oldinteriorid, ac_vehid);
  3356.                     #endif
  3357.                     ac_KickWithCode(playerid, "", 0, 3, 1);
  3358.                 }
  3359.             }
  3360.             else if(ACInfo[playerid][acIntEnterExits])
  3361.             {
  3362.                 GetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  3363.                 ACInfo[playerid][acGtc][11] = GetTickCount() + 2650;
  3364.             }
  3365.             else if(ACInfo[playerid][acACAllow][2] && newinteriorid != ACInfo[playerid][acInt])
  3366.             {
  3367.                 #if defined DEBUG
  3368.                     printf("[Nex-AC debug] AC interior: %d, acInt (last): %d, newinteriorid: %d, oldinteriorid: %d",
  3369.                     ACInfo[playerid][acSet][0], ACInfo[playerid][acInt], newinteriorid, oldinteriorid);
  3370.                 #endif
  3371.                 ac_KickWithCode(playerid, "", 0, 2, 1);
  3372.             }
  3373.         }
  3374.     }
  3375.     else ACInfo[playerid][acSet][0] = -1;
  3376.     ACInfo[playerid][acInt] = newinteriorid;
  3377.     if(!ACInfo[playerid][acKicked] && ac_vehid > 0) ACVehInfo[ac_vehid][acInt] = newinteriorid;
  3378.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3379.         && defined ac_OnPlayerInteriorChange
  3380.         return ac_OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
  3381.     #else
  3382.         return 1;
  3383.     #endif
  3384. }
  3385.  
  3386. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3387.     #if defined _ALS_OnPlayerInteriorChange
  3388.         #undef OnPlayerInteriorChange
  3389.     #else
  3390.         #define _ALS_OnPlayerInteriorChange
  3391.     #endif
  3392.     #define OnPlayerInteriorChange ac_OnPlayerInteriorChange
  3393.     #if defined ac_OnPlayerInteriorChange
  3394.         forward ac_OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
  3395.     #endif
  3396. #endif
  3397.  
  3398. #if defined _inc_y_hooks || defined _INC_y_hooks
  3399.     hook OnRconLoginAttempt(ip[], password[], success)
  3400. #else
  3401.     public OnRconLoginAttempt(ip[], password[], success)
  3402. #endif
  3403. {
  3404.     if(ac_ACAllow[42])
  3405.     {
  3406.         static ac_ipTables[MAX_PLAYERS][2], ac_ip_index;
  3407.         new ac_i, ac_current_ip = ac_IpToInt(ip);
  3408.         for(; ac_i < ac_ip_index && ac_i < sizeof ac_ipTables; ++ac_i)
  3409.         {
  3410.             if(ac_ipTables[ac_i][0] == ac_current_ip)
  3411.             {
  3412.                 if(success) ac_ipTables[ac_i][1] = 0;
  3413.                 else if(++ac_ipTables[ac_i][1] > AC_MAX_RCON_LOGIN_ATTEMPT)
  3414.                 {
  3415.                     #if defined DEBUG
  3416.                         printf(DEBUG_CODE_4, ip, password);
  3417.                     #endif
  3418.                     ac_ipTables[ac_i][1] = 0;
  3419.                     ac_KickWithCode(INVALID_PLAYER_ID, ip, 1, 42, 1);
  3420.                 }
  3421.                 ac_i = -1;
  3422.                 break;
  3423.             }
  3424.         }
  3425.         if(ac_i != -1 && !success)
  3426.         {
  3427.             ac_ipTables[ac_ip_index][0] = ac_current_ip;
  3428.             if(++ac_ipTables[ac_ip_index][1] > AC_MAX_RCON_LOGIN_ATTEMPT)
  3429.             {
  3430.                 #undef AC_MAX_RCON_LOGIN_ATTEMPT
  3431.                 #if defined DEBUG
  3432.                     printf(DEBUG_CODE_4, ip, password, ac_ipTables[ac_ip_index][1]);
  3433.                 #endif
  3434.                 ac_ipTables[ac_ip_index][1] = 0;
  3435.                 ac_KickWithCode(INVALID_PLAYER_ID, ip, 1, 42, 2);
  3436.             }
  3437.             if(++ac_ip_index >= sizeof ac_ipTables) ac_ip_index = 0;
  3438.             ac_ipTables[ac_ip_index][1] = 0;
  3439.         }
  3440.     }
  3441.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3442.         && defined ac_OnRconLoginAttempt
  3443.         return ac_OnRconLoginAttempt(ip, password, success);
  3444.     #else
  3445.         return 1;
  3446.     #endif
  3447. }
  3448.  
  3449. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3450.     #if defined _ALS_OnRconLoginAttempt
  3451.         #undef OnRconLoginAttempt
  3452.     #else
  3453.         #define _ALS_OnRconLoginAttempt
  3454.     #endif
  3455.     #define OnRconLoginAttempt ac_OnRconLoginAttempt
  3456.     #if defined ac_OnRconLoginAttempt
  3457.         forward ac_OnRconLoginAttempt(ip[], password[], success);
  3458.     #endif
  3459. #endif
  3460.  
  3461. #if defined _inc_y_hooks || defined _INC_y_hooks
  3462.     hook OnPlayerUpdate(playerid)
  3463. #else
  3464.     public OnPlayerUpdate(playerid)
  3465. #endif
  3466. {
  3467.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked]) return 0;
  3468.     new ac_gtc = GetTickCount(), ac_gpp;
  3469.     if(!IsPlayerNPC(playerid))
  3470.     {
  3471.         new ac_sa = GetPlayerState(playerid);
  3472.         if(ac_sa != PLAYER_STATE_SPECTATING)
  3473.         {
  3474.             ac_gpp = GetPlayerPing(playerid);
  3475.             new ac_w = GetPlayerWeapon(playerid), ac_a = GetPlayerAmmo(playerid), ac_s = ac_wSlot[ac_w];
  3476.             if(ACInfo[playerid][acSet][3] != -1)
  3477.             {
  3478.                 if(ACInfo[playerid][acSet][3] == ac_w)
  3479.                 {
  3480.                     ACInfo[playerid][acSet][3] =
  3481.                     ACInfo[playerid][acSetWeapon][ac_s] = -1;
  3482.                     ACInfo[playerid][acWeapon][ac_s] = ac_w;
  3483.                 }
  3484.                 else if(ACInfo[playerid][acGiveAmmo][ac_wSlot[ACInfo[playerid][acSet][3]]] == 0) ACInfo[playerid][acSet][3] = -1;
  3485.                 else if(ACInfo[playerid][acACAllow][52] && !(PLAYER_STATE_DRIVER <= ac_sa <= PLAYER_STATE_PASSENGER) &&
  3486.                 (ac_wSlot[ACInfo[playerid][acSet][3]] == ac_s || ACInfo[playerid][acSetWeapon][ac_wSlot[ACInfo[playerid][acSet][3]]] == -1) &&
  3487.                 ac_gtc > ACInfo[playerid][acGtc][2] + ac_gpp && ++ACInfo[playerid][acNOPCount][0] > AC_MAX_NOP_WARNINGS)
  3488.                 {
  3489.                     #if defined DEBUG
  3490.                         printf(DEBUG_CODE_5, playerid, "SetPlayerArmedWeapon");
  3491.                         printf("[Nex-AC debug] AC weapon: %d, weaponid: %d", ACInfo[playerid][acSet][3], ac_w);
  3492.                     #endif
  3493.                     #if defined OnCheatDetected
  3494.                         ac_KickWithCode(playerid, "", 0, 52, 1);
  3495.                         ACInfo[playerid][acSetWeapon][ac_s] = ACInfo[playerid][acSet][3] = -1;
  3496.                     #else
  3497.                         return ac_KickWithCode(playerid, "", 0, 52, 1);
  3498.                     #endif
  3499.                 }
  3500.             }
  3501.             if(ACInfo[playerid][acGiveAmmo][ac_s] != -65535)
  3502.             {
  3503.                 if(ACInfo[playerid][acGiveAmmo][ac_s] == ac_a ||
  3504.                 ACInfo[playerid][acGiveAmmo][ac_s] > ac_a && ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_s] + ac_gpp)
  3505.                 {
  3506.                     ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  3507.                     ACInfo[playerid][acAmmo][ac_s] = ac_a;
  3508.                 }
  3509.                 else if(ACInfo[playerid][acACAllow][52] &&
  3510.                 ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_s] + ac_gpp &&
  3511.                 ++ACInfo[playerid][acNOPCount][1] > AC_MAX_NOP_WARNINGS)
  3512.                 {
  3513.                     #if defined DEBUG
  3514.                         printf(DEBUG_CODE_5, playerid, "SetPlayerAmmo");
  3515.                         printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  3516.                         ACInfo[playerid][acGiveAmmo][ac_s], ac_a, ac_w);
  3517.                     #endif
  3518.                     #if defined OnCheatDetected
  3519.                         ac_KickWithCode(playerid, "", 0, 52, 2);
  3520.                         ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  3521.                     #else
  3522.                         return ac_KickWithCode(playerid, "", 0, 52, 2);
  3523.                     #endif
  3524.                 }
  3525.             }
  3526.             #if AC_USE_AMMUNATIONS || AC_USE_TUNING_GARAGES
  3527.                 new ac_money = bad_GetPlayerMoney(playerid);
  3528.             #endif
  3529.             #if AC_USE_AMMUNATIONS
  3530.                 if(ACInfo[playerid][acSet][10] != -1)
  3531.                 {
  3532.                     if(ac_money < ACInfo[playerid][acMoney] &&
  3533.                     ACInfo[playerid][acSet][10] <= ACInfo[playerid][acMoney] - ac_money) ACInfo[playerid][acSet][10] = -1;
  3534.                     else if(ACInfo[playerid][acACAllow][15] && ac_gtc > ACInfo[playerid][acGtc][15] + ac_gpp &&
  3535.                     ++ACInfo[playerid][acCheatCount][10] > AC_MAX_NOP_WARNINGS)
  3536.                     {
  3537.                         #if defined DEBUG
  3538.                             printf("[Nex-AC debug] Money: %d, old money: %d, price: %d",
  3539.                             ac_money, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][10]);
  3540.                         #endif
  3541.                         #if defined OnCheatDetected
  3542.                             ac_KickWithCode(playerid, "", 0, 15, 3);
  3543.                             ACInfo[playerid][acSet][10] = -1;
  3544.                         #else
  3545.                             return ac_KickWithCode(playerid, "", 0, 15, 3);
  3546.                         #endif
  3547.                     }
  3548.                 }
  3549.             #endif
  3550.             new ac_i = GetPlayerInterior(playerid), Float:ac_X, Float:ac_Y, Float:ac_Z, Float:ac_tmp;
  3551.             GetPlayerPos(playerid, ac_X, ac_Y, ac_Z);
  3552.             if(ACInfo[playerid][acLastWeapon] != ac_w)
  3553.             {
  3554.                 if(ACInfo[playerid][acWeapon][ac_s] != ac_w && ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp)
  3555.                 {
  3556.                     #if defined Streamer_GetDistanceToItem\
  3557.                         && defined Streamer_GetIntData
  3558.                     if(ACInfo[playerid][acLastPickup] > MAX_PICKUPS) Streamer_GetDistanceToItem(ac_X, ac_Y, ac_Z, STREAMER_TYPE_PICKUP, ACInfo[playerid][acLastPickup] - MAX_PICKUPS, ac_tmp);
  3559.                     if((ac_w == 40 || ac_w == 46 && ACInfo[playerid][acVeh] > 0 && ACInfo[playerid][acParachute]) ||
  3560.                     0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS && ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
  3561.                     ac_a <= (3 <= ac_s <= 5 ? ACInfo[playerid][acAmmo][ac_s] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) &&
  3562.                     IsPlayerInRangeOfPoint(playerid, 8.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
  3563.                     ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]) ||
  3564.                     ACInfo[playerid][acLastPickup] > MAX_PICKUPS &&
  3565.                     Streamer_GetIntData(STREAMER_TYPE_PICKUP, ACInfo[playerid][acLastPickup] - MAX_PICKUPS, E_STREAMER_EXTRA_ID) == ac_w + 100 &&
  3566.                     ac_a <= (3 <= ac_s <= 5 ? ACInfo[playerid][acAmmo][ac_s] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) && floatcmp(ac_tmp, 8.0) <= 0)
  3567.                     {
  3568.                         ACInfo[playerid][acWeapon][ac_s] = ac_w;
  3569.                         ACInfo[playerid][acAmmo][ac_s] = ac_a;
  3570.                     }
  3571.                     #else
  3572.                     if((ac_w == 40 || ac_w == 46 && ACInfo[playerid][acVeh] > 0 && ACInfo[playerid][acParachute]) ||
  3573.                     0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS && ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
  3574.                     ac_a <= (3 <= ac_s <= 5 ? ACInfo[playerid][acAmmo][ac_s] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) &&
  3575.                     IsPlayerInRangeOfPoint(playerid, 8.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
  3576.                     ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]))
  3577.                     {
  3578.                         ACInfo[playerid][acWeapon][ac_s] = ac_w;
  3579.                         ACInfo[playerid][acAmmo][ac_s] = ac_a;
  3580.                     }
  3581.                     #endif
  3582.                     #if AC_USE_AMMUNATIONS
  3583.                     else if(16 <= ac_w <= 39 && ac_InAmmuNation(playerid, ac_i))
  3584.                     {
  3585.                         ACInfo[playerid][acCheatCount][10] = 0;
  3586.                         if(ACInfo[playerid][acSet][10] != -1) ACInfo[playerid][acSet][10] += ac_AmmuNationInfo[ac_w - 16][0];
  3587.                         else ACInfo[playerid][acSet][10] = ac_AmmuNationInfo[ac_w - 16][0];
  3588.                         if(3 <= ac_s <= 5) ACInfo[playerid][acAmmo][ac_s] += ac_AmmuNationInfo[ac_w - 16][1];
  3589.                         else ACInfo[playerid][acAmmo][ac_s] = ac_AmmuNationInfo[ac_w - 16][1];
  3590.                         ACInfo[playerid][acWeapon][ac_s] = ac_w;
  3591.                         ACInfo[playerid][acGtc][15] = ac_gtc + 1650;
  3592.                     }
  3593.                     #endif
  3594.                     else if(ACInfo[playerid][acACAllow][15] && ACInfo[playerid][acSetWeapon][ac_s] == -1)
  3595.                     {
  3596.                         #if defined DEBUG
  3597.                             printf("[Nex-AC debug] AC weaponid: %d, AC ammo: %d, weaponid: %d, ammo: %d",
  3598.                             ACInfo[playerid][acWeapon][ac_s], ACInfo[playerid][acAmmo][ac_s], ac_w, ac_a);
  3599.                         #endif
  3600.                         #if defined OnCheatDetected
  3601.                             ac_KickWithCode(playerid, "", 0, 15, 1);
  3602.                             ACInfo[playerid][acWeapon][ac_s] = ac_w;
  3603.                             ACInfo[playerid][acAmmo][ac_s] = ac_a;
  3604.                         #else
  3605.                             return ac_KickWithCode(playerid, "", 0, 15, 1);
  3606.                         #endif
  3607.                     }
  3608.                 }
  3609.             }
  3610.             else if(ACInfo[playerid][acAmmo][ac_s] != ac_a)
  3611.             {
  3612.                 switch(ac_w)
  3613.                 {
  3614.                     case 16..18, 35, 36, 39, 43:
  3615.                     {
  3616.                         if(ac_sa != PLAYER_STATE_DRIVER && ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp)
  3617.                         {
  3618.                             if(ACInfo[playerid][acACAllow][16] &&
  3619.                             (ACInfo[playerid][acAmmo][ac_s] == 0 || ac_a > ACInfo[playerid][acAmmo][ac_s] ||
  3620.                             ac_a < 0 < ACInfo[playerid][acAmmo][ac_s]))
  3621.                             {
  3622.                                 #if defined DEBUG
  3623.                                     printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  3624.                                     ACInfo[playerid][acAmmo][ac_s], ac_a, ac_w);
  3625.                                 #endif
  3626.                                 #if defined OnCheatDetected
  3627.                                     ac_KickWithCode(playerid, "", 0, 16, 1);
  3628.                                 #else
  3629.                                     return ac_KickWithCode(playerid, "", 0, 16, 1);
  3630.                                 #endif
  3631.                             }
  3632.                             ACInfo[playerid][acAmmo][ac_s] = ac_a;
  3633.                         }
  3634.                     }
  3635.                 }
  3636.             }
  3637.             GetPlayerHealth(playerid, ac_tmp);
  3638.             new ac_health = floatround(ac_tmp, floatround_tozero);
  3639.             if(ACInfo[playerid][acSet][1] != -1)
  3640.             {
  3641.                 if(ACInfo[playerid][acSet][1] > 255)
  3642.                 {
  3643.                     while(ac_health < ACInfo[playerid][acSet][1]) ac_health += 256;
  3644.                 }
  3645.                 if(ACInfo[playerid][acSet][1] == ac_health || ACInfo[playerid][acDmgRes] ||
  3646.                 ACInfo[playerid][acSet][1] > ac_health && ac_gtc > ACInfo[playerid][acGtc][3] + ac_gpp)
  3647.                 {
  3648.                     ACInfo[playerid][acSet][1] = -1;
  3649.                     ACInfo[playerid][acDmgRes] = 0;
  3650.                 }
  3651.                 else if(ACInfo[playerid][acACAllow][52] && ac_gtc > ACInfo[playerid][acGtc][3] + ac_gpp &&
  3652.                 ++ACInfo[playerid][acNOPCount][3] > AC_MAX_NOP_WARNINGS)
  3653.                 {
  3654.                     #if defined DEBUG
  3655.                         printf(DEBUG_CODE_5, playerid, "SetPlayerHealth");
  3656.                         printf("[Nex-AC debug] AC health: %d, health: %d", ACInfo[playerid][acSet][1], ac_health);
  3657.                     #endif
  3658.                     #if defined OnCheatDetected
  3659.                         ac_KickWithCode(playerid, "", 0, 52, 3);
  3660.                         ACInfo[playerid][acSet][1] = -1;
  3661.                     #else
  3662.                         return ac_KickWithCode(playerid, "", 0, 52, 3);
  3663.                     #endif
  3664.                 }
  3665.             }
  3666.             else if(ACInfo[playerid][acACAllow][12])
  3667.             {
  3668.                 while(ACInfo[playerid][acHealth] > ac_health + 255) ac_health += 256;
  3669.                 if(ac_health > ACInfo[playerid][acHealth])
  3670.                 {
  3671.                     #if AC_USE_RESTAURANTS
  3672.                         if(ac_health > ACInfo[playerid][acHealth] + 70 || !ac_InRestaurant(playerid, ac_i))
  3673.                         {
  3674.                     #endif
  3675.                         #if AC_USE_VENDING_MACHINES
  3676.                             if(ac_health > ACInfo[playerid][acHealth] + 35 || !ac_NearVendingMachine(playerid, ac_i))
  3677.                             {
  3678.                         #endif
  3679.                             #if defined DEBUG
  3680.                                 printf("[Nex-AC debug] AC health: %d, health: %d", ACInfo[playerid][acHealth], ac_health);
  3681.                             #endif
  3682.                             #if defined OnCheatDetected
  3683.                                 ac_KickWithCode(playerid, "", 0, 12);
  3684.                             #else
  3685.                                 return ac_KickWithCode(playerid, "", 0, 12);
  3686.                             #endif
  3687.                         #if AC_USE_VENDING_MACHINES
  3688.                             }
  3689.                         #endif
  3690.                     #if AC_USE_RESTAURANTS
  3691.                         }
  3692.                     #endif
  3693.                 }
  3694.             }
  3695.             GetPlayerArmour(playerid, ac_tmp);
  3696.             new ac_armour = floatround(ac_tmp, floatround_tozero);
  3697.             if(ACInfo[playerid][acSet][2] != -1)
  3698.             {
  3699.                 if(ACInfo[playerid][acSet][2] > 255)
  3700.                 {
  3701.                     while(ac_armour < ACInfo[playerid][acSet][2]) ac_armour += 256;
  3702.                 }
  3703.                 if(ACInfo[playerid][acSet][2] == ac_armour || ACInfo[playerid][acDmgRes] ||
  3704.                 ACInfo[playerid][acSet][2] > ac_armour && ac_gtc > ACInfo[playerid][acGtc][5] + ac_gpp)
  3705.                 {
  3706.                     ACInfo[playerid][acSet][2] = -1;
  3707.                     ACInfo[playerid][acDmgRes] = 0;
  3708.                 }
  3709.                 else if(ACInfo[playerid][acACAllow][52] && ac_gtc > ACInfo[playerid][acGtc][5] + ac_gpp &&
  3710.                 ++ACInfo[playerid][acNOPCount][5] > AC_MAX_NOP_WARNINGS)
  3711.                 {
  3712.                     #if defined DEBUG
  3713.                         printf(DEBUG_CODE_5, playerid, "SetPlayerArmour");
  3714.                         printf("[Nex-AC debug] AC armour: %d, armour: %d", ACInfo[playerid][acSet][2], ac_armour);
  3715.                     #endif
  3716.                     #if defined OnCheatDetected
  3717.                         ac_KickWithCode(playerid, "", 0, 52, 4);
  3718.                         ACInfo[playerid][acSet][2] = -1;
  3719.                     #else
  3720.                         return ac_KickWithCode(playerid, "", 0, 52, 4);
  3721.                     #endif
  3722.                 }
  3723.             }
  3724.             else if(ACInfo[playerid][acACAllow][13])
  3725.             {
  3726.                 while(ACInfo[playerid][acArmour] > ac_armour + 255) ac_armour += 256;
  3727.                 if(ac_armour > ACInfo[playerid][acArmour])
  3728.                 {
  3729.                     #if AC_USE_AMMUNATIONS
  3730.                         if(ac_InAmmuNation(playerid, ac_i))
  3731.                         {
  3732.                             ACInfo[playerid][acCheatCount][10] = 0;
  3733.                             if(ACInfo[playerid][acSet][10] != -1) ACInfo[playerid][acSet][10] += 200;
  3734.                             else ACInfo[playerid][acSet][10] = 200;
  3735.                             ACInfo[playerid][acGtc][15] = ac_gtc + 1650;
  3736.                         }
  3737.                         else
  3738.                         {
  3739.                     #endif
  3740.                         #if defined DEBUG
  3741.                             printf("[Nex-AC debug] AC armour: %d, armour: %d", ACInfo[playerid][acArmour], ac_armour);
  3742.                         #endif
  3743.                         #if defined OnCheatDetected
  3744.                             ac_KickWithCode(playerid, "", 0, 13);
  3745.                         #else
  3746.                             return ac_KickWithCode(playerid, "", 0, 13);
  3747.                         #endif
  3748.                     #if AC_USE_AMMUNATIONS
  3749.                         }
  3750.                     #endif
  3751.                 }
  3752.             }
  3753.             if(ac_health < ACInfo[playerid][acHealth] || ac_armour < ACInfo[playerid][acArmour])
  3754.             {
  3755.                 ACInfo[playerid][acVehDmgRes] = false;
  3756.                 ACInfo[playerid][acCheatCount][9] = ACInfo[playerid][acDmgRes] = 0;
  3757.             }
  3758.             else if(ACInfo[playerid][acACAllow][19] &&
  3759.             ACInfo[playerid][acDmgRes] && ac_gtc > ACInfo[playerid][acGtc][14] + ac_gpp)
  3760.             {
  3761.                 ACInfo[playerid][acDmgRes] = 0;
  3762.                 ACInfo[playerid][acVehDmgRes] = false;
  3763.                 if(++ACInfo[playerid][acCheatCount][9] > AC_MAX_GODMODE_WARNINGS)
  3764.                 {
  3765.                     #undef AC_MAX_GODMODE_WARNINGS
  3766.                     #if defined DEBUG
  3767.                         printf("[Nex-AC debug] AC health: %d, health: %d, AC armour: %d, armour: %d",
  3768.                         ACInfo[playerid][acHealth], ac_health, ACInfo[playerid][acArmour], ac_armour);
  3769.                     #endif
  3770.                     #if defined OnCheatDetected
  3771.                         ac_KickWithCode(playerid, "", 0, 19);
  3772.                         ACInfo[playerid][acCheatCount][9] = 0;
  3773.                     #else
  3774.                         return ac_KickWithCode(playerid, "", 0, 19);
  3775.                     #endif
  3776.                 }
  3777.             }
  3778.             #if AC_USE_TUNING_GARAGES
  3779.             if(ACInfo[playerid][acSet][12] != -1)
  3780.             {
  3781.                 if(ac_money < ACInfo[playerid][acMoney] &&
  3782.                 ACInfo[playerid][acSet][12] <= ACInfo[playerid][acMoney] - ac_money) ACInfo[playerid][acSet][12] = -1;
  3783.                 else if(ACInfo[playerid][acACAllow][23] && ac_gtc > ACInfo[playerid][acGtc][17] + ac_gpp &&
  3784.                 ++ACInfo[playerid][acCheatCount][12] > AC_MAX_NOP_WARNINGS)
  3785.                 {
  3786.                     #if defined DEBUG
  3787.                         printf("[Nex-AC debug] Money: %d, old money: %d, component price: %d",
  3788.                         ac_money, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][12]);
  3789.                     #endif
  3790.                     #if defined OnCheatDetected
  3791.                         ac_KickWithCode(playerid, "", 0, 23, 3);
  3792.                         ACInfo[playerid][acSet][12] = -1;
  3793.                     #else
  3794.                         return ac_KickWithCode(playerid, "", 0, 23, 3);
  3795.                     #endif
  3796.                 }
  3797.             }
  3798.             #endif
  3799.             new ac_vehid = GetPlayerVehicleID(playerid);
  3800.             if(ACInfo[playerid][acACAllow][52])
  3801.             {
  3802.                 if(ACInfo[playerid][acSet][0] != -1 && ac_gtc > ACInfo[playerid][acGtc][0] + ac_gpp)
  3803.                 {
  3804.                     if(ACInfo[playerid][acSet][0] == ac_i) ACInfo[playerid][acSet][0] = -1;
  3805.                     else if(++ACInfo[playerid][acNOPCount][2] > AC_MAX_NOP_WARNINGS)
  3806.                     {
  3807.                         #if defined DEBUG
  3808.                             printf(DEBUG_CODE_5, playerid, "SetPlayerInterior");
  3809.                             printf("[Nex-AC debug] AC interior: %d, interiorid: %d", ACInfo[playerid][acSet][0], ac_i);
  3810.                         #endif
  3811.                         #if defined OnCheatDetected
  3812.                             ac_KickWithCode(playerid, "", 0, 52, 5);
  3813.                             ACInfo[playerid][acSet][0] = -1;
  3814.                         #else
  3815.                             return ac_KickWithCode(playerid, "", 0, 52, 5);
  3816.                         #endif
  3817.                     }
  3818.                 }
  3819.                 if(ACInfo[playerid][acSet][6] != -1 && ac_gtc > ACInfo[playerid][acGtc][12] + ac_gpp &&
  3820.                 ++ACInfo[playerid][acNOPCount][8] > AC_MAX_NOP_WARNINGS)
  3821.                 {
  3822.                     #if defined DEBUG
  3823.                         printf(DEBUG_CODE_5, playerid, "TogglePlayerSpectating");
  3824.                     #endif
  3825.                     #if defined OnCheatDetected
  3826.                         ac_KickWithCode(playerid, "", 0, 52, 6);
  3827.                         ACInfo[playerid][acSet][6] = -1;
  3828.                     #else
  3829.                         return ac_KickWithCode(playerid, "", 0, 52, 6);
  3830.                     #endif
  3831.                 }
  3832.                 if(ACInfo[playerid][acSet][7] != -1 && ac_gtc > ACInfo[playerid][acGtc][13] + ac_gpp &&
  3833.                 ++ACInfo[playerid][acNOPCount][9] > AC_MAX_NOP_WARNINGS)
  3834.                 {
  3835.                     #if defined DEBUG
  3836.                         printf(DEBUG_CODE_5, playerid, "SpawnPlayer");
  3837.                         printf("[Nex-AC debug] acSet[7]: %d", ACInfo[playerid][acSet][7]);
  3838.                     #endif
  3839.                     #if defined OnCheatDetected
  3840.                         ac_KickWithCode(playerid, "", 0, 52, 7);
  3841.                         ACInfo[playerid][acSet][7] = -1;
  3842.                     #else
  3843.                         return ac_KickWithCode(playerid, "", 0, 52, 7);
  3844.                     #endif
  3845.                 }
  3846.                 if(ACInfo[playerid][acSet][11] != -1 && ac_vehid > 0 && ac_gtc > ACInfo[playerid][acGtc][8] + ac_gpp)
  3847.                 {
  3848.                     #if defined DEBUG
  3849.                         printf(DEBUG_CODE_5, playerid, "RemovePlayerFromVehicle");
  3850.                         printf("[Nex-AC debug] Veh model: %d", GetVehicleModel(ac_vehid));
  3851.                     #endif
  3852.                     #if defined OnCheatDetected
  3853.                         ac_KickWithCode(playerid, "", 0, 52, 8);
  3854.                         ACInfo[playerid][acSet][11] = -1;
  3855.                     #else
  3856.                         return ac_KickWithCode(playerid, "", 0, 52, 8);
  3857.                     #endif
  3858.                 }
  3859.             }
  3860.             ac_s = GetPlayerVehicleSeat(playerid);
  3861.             if(ACInfo[playerid][acSet][9] != -1)
  3862.             {
  3863.                 if(ACInfo[playerid][acSet][9] == ac_vehid &&
  3864.                 (ACInfo[playerid][acSet][5] == ac_s || ACInfo[playerid][acSet][5] == -1))
  3865.                 {
  3866.                     if(ACInfo[playerid][acVeh] > 0 &&
  3867.                     ACVehInfo[ACInfo[playerid][acVeh]][acDriver] == playerid) ACVehInfo[ACInfo[playerid][acVeh]][acDriver] = INVALID_PLAYER_ID;
  3868.                     if(ac_s == 0)
  3869.                     {
  3870.                         ACVehInfo[ac_vehid][acDriver] = playerid;
  3871.                         GetVehicleZAngle(ac_vehid, ACVehInfo[ac_vehid][acZAngle]);
  3872.                         ACInfo[playerid][acSetVehHealth] = -1.0;
  3873.                     }
  3874.                     ACInfo[playerid][acCheatCount][11] = 0;
  3875.                     ACInfo[playerid][acVehDmgRes] = false;
  3876.                     ACInfo[playerid][acSet][11] =
  3877.                     ACInfo[playerid][acSet][9] =
  3878.                     ACInfo[playerid][acSet][8] =
  3879.                     ACInfo[playerid][acSet][5] = -1;
  3880.                     ACInfo[playerid][acSeat] = ac_s;
  3881.                 }
  3882.                 else if(!GetVehicleModel(ACInfo[playerid][acSet][9]) ||
  3883.                 !ACVehInfo[ACInfo[playerid][acSet][9]][acSpawned])
  3884.                 {
  3885.                     ACInfo[playerid][acSet][9] =
  3886.                     ACInfo[playerid][acSet][5] = -1;
  3887.                 }
  3888.                 else if(ac_gtc > ACInfo[playerid][acGtc][1] + ac_gpp)
  3889.                 {
  3890.                     if(ACInfo[playerid][acSet][5] == -1) ACInfo[playerid][acSet][9] = -1;
  3891.                     else if(ACInfo[playerid][acACAllow][52] && ++ACInfo[playerid][acNOPCount][7] > AC_MAX_NOP_WARNINGS)
  3892.                     {
  3893.                         #if defined DEBUG
  3894.                             printf(DEBUG_CODE_5, playerid, "PutPlayerInVehicle");
  3895.                             printf("[Nex-AC debug] AC vehicle: %d, vehicleid: %d, AC seat: %d, seatid: %d",
  3896.                             ACInfo[playerid][acSet][9], ac_vehid, ACInfo[playerid][acSet][5], ac_s);
  3897.                         #endif
  3898.                         #if defined OnCheatDetected
  3899.                             ac_KickWithCode(playerid, "", 0, 52, 9);
  3900.                             ACInfo[playerid][acSet][9] = -1;
  3901.                         #else
  3902.                             return ac_KickWithCode(playerid, "", 0, 52, 9);
  3903.                         #endif
  3904.                     }
  3905.                 }
  3906.             }
  3907.             else
  3908.             {
  3909.                 if(ACInfo[playerid][acSet][8] != -1)
  3910.                 {
  3911.                     if(IsPlayerInRangeOfPoint(playerid, 8.0, ACInfo[playerid][acSetPosX],
  3912.                     ACInfo[playerid][acSetPosY], (ACInfo[playerid][acTpToZ] ? ac_Z : ACInfo[playerid][acSetPosZ])))
  3913.                     {
  3914.                         ACInfo[playerid][acSet][8] = -1;
  3915.                         ACInfo[playerid][acGtc][11] = 0;
  3916.                         ACInfo[playerid][acTpToZ] = false;
  3917.                         ACInfo[playerid][acPosX] = ac_X;
  3918.                         ACInfo[playerid][acPosY] = ac_Y;
  3919.                         ACInfo[playerid][acPosZ] = ac_Z;
  3920.                     }
  3921.                     else if(ac_gtc > ACInfo[playerid][acGtc][11] + ac_gpp)
  3922.                     {
  3923.                         if(ACInfo[playerid][acACAllow][52] && ++ACInfo[playerid][acNOPCount][10] > AC_MAX_NOP_WARNINGS)
  3924.                         {
  3925.                             #if defined DEBUG
  3926.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerPos");
  3927.                                 printf("[Nex-AC debug] Distance: %f, acSet[8]: %d", GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acSetPosX],
  3928.                                 ACInfo[playerid][acSetPosY], (ACInfo[playerid][acTpToZ] ? ac_Z : ACInfo[playerid][acSetPosZ])), ACInfo[playerid][acSet][8]);
  3929.                             #endif
  3930.                             #if defined OnCheatDetected
  3931.                                 ac_KickWithCode(playerid, "", 0, 52, 10);
  3932.                                 ACInfo[playerid][acSet][8] = -1;
  3933.                             #else
  3934.                                 return ac_KickWithCode(playerid, "", 0, 52, 10);
  3935.                             #endif
  3936.                         }
  3937.                         ACInfo[playerid][acTpToZ] = false;
  3938.                     }
  3939.                 }
  3940.                 new Float:ac_vX, Float:ac_vY, Float:ac_vZ, ac_specact = GetPlayerSpecialAction(playerid),
  3941.                 Float:ac_dist = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]),
  3942.                 Float:ac_dist_set = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acSetPosX], ACInfo[playerid][acSetPosY], (ACInfo[playerid][acTpToZ] ? ac_Z : ACInfo[playerid][acSetPosZ]));
  3943.                 if(ac_vehid > 0)
  3944.                 {
  3945.                     if(ACInfo[playerid][acVeh] == 0)
  3946.                     {
  3947.                         if(ACInfo[playerid][acACAllow][4] &&
  3948.                         (ACInfo[playerid][acEnterVeh] != ac_vehid || ac_gtc < ACInfo[playerid][acEnterVehTime] + 600))
  3949.                         {
  3950.                             #if defined DEBUG
  3951.                                 printf("[Nex-AC debug] Entered vehicle: %d, vehicleid: %d, Enter time: %d",
  3952.                                 ACInfo[playerid][acEnterVeh], ac_vehid, ac_gtc - ACInfo[playerid][acEnterVehTime]);
  3953.                             #endif
  3954.                             #if defined OnCheatDetected
  3955.                                 ac_KickWithCode(playerid, "", 0, 4, 1);
  3956.                             #else
  3957.                                 return ac_KickWithCode(playerid, "", 0, 4, 1);
  3958.                             #endif
  3959.                         }
  3960.                     }
  3961.                     else if(ACInfo[playerid][acVeh] != ac_vehid)
  3962.                     {
  3963.                         if(ACInfo[playerid][acACAllow][4])
  3964.                         {
  3965.                             #if defined DEBUG
  3966.                                 printf("[Nex-AC debug] AC vehicle: %d, vehicleid: %d", ACInfo[playerid][acVeh], ac_vehid);
  3967.                             #endif
  3968.                             #if defined OnCheatDetected
  3969.                                 ac_KickWithCode(playerid, "", 0, 4, 2);
  3970.                             #else
  3971.                                 return ac_KickWithCode(playerid, "", 0, 4, 2);
  3972.                             #endif
  3973.                         }
  3974.                     }
  3975.                     else if(ACInfo[playerid][acACAllow][50] && ACInfo[playerid][acSeat] != ac_s)
  3976.                     {
  3977.                         #if defined DEBUG
  3978.                             printf("[Nex-AC debug] AC seat: %d, seatid: %d, vehicleid: %d", ACInfo[playerid][acSeat], ac_s, ac_vehid);
  3979.                         #endif
  3980.                         #if defined OnCheatDetected
  3981.                             ac_KickWithCode(playerid, "", 0, 50, 1);
  3982.                         #else
  3983.                             return ac_KickWithCode(playerid, "", 0, 50, 1);
  3984.                         #endif
  3985.                     }
  3986.                     if(ac_sa == PLAYER_STATE_DRIVER)
  3987.                     {
  3988.                         if(ACInfo[playerid][acACAllow][32] &&
  3989.                         ACVehInfo[ac_vehid][acDriver] != INVALID_PLAYER_ID && ACVehInfo[ac_vehid][acDriver] != playerid)
  3990.                         {
  3991.                             #if defined DEBUG
  3992.                                 printf("[Nex-AC debug] AC driver: %d, driver: %d, vehicleid: %d",
  3993.                                 ACVehInfo[ac_vehid][acDriver], playerid, ac_vehid);
  3994.                             #endif
  3995.                             #if defined OnCheatDetected
  3996.                                 ac_KickWithCode(playerid, "", 0, 32);
  3997.                             #else
  3998.                                 return SetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  3999.                             #endif
  4000.                         }
  4001.                         if(ACInfo[playerid][acACAllow][35] && GetPlayerCameraMode(playerid) == 55)
  4002.                         {
  4003.                             #if defined OnCheatDetected
  4004.                                 ac_KickWithCode(playerid, "", 0, 35);
  4005.                             #else
  4006.                                 return ac_KickWithCode(playerid, "", 0, 35);
  4007.                             #endif
  4008.                         }
  4009.                         new Float:ac_vHealth;
  4010.                         GetVehicleHealth(ac_vehid, ac_vHealth);
  4011.                         if(floatcmp(ACInfo[playerid][acSetVehHealth], -1.0) != 0)
  4012.                         {
  4013.                             if(floatcmp(ACInfo[playerid][acSetVehHealth], ac_vHealth) == 0 ||
  4014.                             floatcmp(ACInfo[playerid][acSetVehHealth], ac_vHealth) == 1 &&
  4015.                             ac_gtc > ACInfo[playerid][acGtc][4] + ac_gpp)
  4016.                             {
  4017.                                 ACInfo[playerid][acSetVehHealth] = -1.0;
  4018.                                 ACInfo[playerid][acVehDmgRes] = false;
  4019.                             }
  4020.                             else if(ACInfo[playerid][acACAllow][52] && ac_gtc > ACInfo[playerid][acGtc][4] + ac_gpp &&
  4021.                             ++ACInfo[playerid][acNOPCount][4] > AC_MAX_NOP_WARNINGS)
  4022.                             {
  4023.                                 #if defined DEBUG
  4024.                                     printf(DEBUG_CODE_5, playerid, "SetVehicleHealth");
  4025.                                     printf("[Nex-AC debug] AC veh health: %f, veh health: %f, vehicleid: %d",
  4026.                                     ACInfo[playerid][acSetVehHealth], ac_vHealth, ac_vehid);
  4027.                                 #endif
  4028.                                 #if defined OnCheatDetected
  4029.                                     ac_KickWithCode(playerid, "", 0, 52, 11);
  4030.                                     ACInfo[playerid][acSetVehHealth] = -1.0;
  4031.                                 #else
  4032.                                     return ac_KickWithCode(playerid, "", 0, 52, 11);
  4033.                                 #endif
  4034.                             }
  4035.                         }
  4036.                         else if(ACInfo[playerid][acACAllow][11] &&
  4037.                         floatcmp(ac_vHealth, ACVehInfo[ac_vehid][acHealth]) == 1 &&
  4038.                         !ACInfo[playerid][acModShop] && ac_vHealth)
  4039.                         {
  4040.                             #if AC_USE_PAYNSPRAY
  4041.                                 if(!ac_InPayNSpray(playerid, ac_i))
  4042.                                 {
  4043.                             #endif
  4044.                                 #if defined DEBUG
  4045.                                     printf("[Nex-AC debug] AC veh health: %f, veh health: %f, vehicleid: %d, playerid: %d",
  4046.                                     ACVehInfo[ac_vehid][acHealth], ac_vHealth, ac_vehid, playerid);
  4047.                                 #endif
  4048.                                 #if defined OnCheatDetected
  4049.                                     ac_KickWithCode(playerid, "", 0, 11);
  4050.                                 #endif
  4051.                                 SetVehicleHealth(ac_vehid, ACVehInfo[ac_vehid][acHealth]);
  4052.                             #if AC_USE_PAYNSPRAY
  4053.                                 }
  4054.                             #endif
  4055.                         }
  4056.                         if(ACInfo[playerid][acVehDmgRes])
  4057.                         {
  4058.                             if(floatcmp(ac_vHealth, ACVehInfo[ac_vehid][acHealth]) == -1)
  4059.                             {
  4060.                                 ACInfo[playerid][acVehDmgRes] = false;
  4061.                                 ACInfo[playerid][acCheatCount][11] = ACInfo[playerid][acDmgRes] = 0;
  4062.                             }
  4063.                             else if(ACInfo[playerid][acACAllow][20] && ac_gtc > ACInfo[playerid][acGtc][16] + ac_gpp)
  4064.                             {
  4065.                                 ACInfo[playerid][acDmgRes] = 0;
  4066.                                 ACInfo[playerid][acVehDmgRes] = false;
  4067.                                 if(++ACInfo[playerid][acCheatCount][11] > AC_MAX_GODMODE_VEH_WARNINGS)
  4068.                                 {
  4069.                                     #undef AC_MAX_GODMODE_VEH_WARNINGS
  4070.                                     #if defined DEBUG
  4071.                                         printf("[Nex-AC debug] AC veh health: %f, veh health: %f, vehicleid: %d",
  4072.                                         ACVehInfo[ac_vehid][acHealth], ac_vHealth, ac_vehid);
  4073.                                     #endif
  4074.                                     #if defined OnCheatDetected
  4075.                                         ac_KickWithCode(playerid, "", 0, 20);
  4076.                                         ACInfo[playerid][acCheatCount][11] = 0;
  4077.                                     #else
  4078.                                         return ac_KickWithCode(playerid, "", 0, 20);
  4079.                                     #endif
  4080.                                 }
  4081.                             }
  4082.                         }
  4083.                         GetVehicleVelocity(ac_vehid, ac_vX, ac_vY, ac_vZ);
  4084.                         new Float:ac_zAngle, ac_vsp = ac_GetSpeed3D(ac_vX, ac_vY, ac_vZ);
  4085.                         GetVehicleZAngle(ac_vehid, ac_zAngle);
  4086.                         ac_zAngle = ac_AbsoluteAngle(ac_zAngle);
  4087.                         #undef ac_AbsoluteAngle
  4088.                         if(floatcmp(ac_dist, 0.8) == 1 &&
  4089.                         (ACInfo[playerid][acSet][8] == -1 || floatcmp(ac_dist_set, 0.8) == 1) &&
  4090.                         ac_gtc > ACInfo[playerid][acGtc][11] + ac_gpp)
  4091.                         {
  4092.                             if(floatcmp(ac_dist, 25.0) == 1 &&
  4093.                             floatcmp(ac_dist, floatadd(ACVehInfo[ac_vehid][acPosDiff], floatmul(floatdiv(ac_dist, 2.6), 1.8))) == 1 &&
  4094.                             (ACInfo[playerid][acSet][8] == -1 || floatcmp(ac_dist_set, 25.0) == 1 &&
  4095.                             floatcmp(ac_dist_set, floatadd(ACVehInfo[ac_vehid][acPosDiff], floatmul(floatdiv(ac_dist_set, 2.6), 1.8))) == 1))
  4096.                             {
  4097.                                 if(ACInfo[playerid][acACAllow][3] && floatcmp(ACInfo[playerid][acPosZ], -95.0) == 1)
  4098.                                 {
  4099.                                     #if defined DEBUG
  4100.                                         printf("[Nex-AC debug] Distance: %f, distance set: %f, old pos diff: %f, speed: %d, vehicleid: %d",
  4101.                                         ac_dist, ac_dist_set, ACVehInfo[ac_vehid][acPosDiff], ac_vsp, ac_vehid);
  4102.                                     #endif
  4103.                                     #if defined OnCheatDetected
  4104.                                         ac_KickWithCode(playerid, "", 0, 3, 2);
  4105.                                     #else
  4106.                                         return ac_KickWithCode(playerid, "", 0, 3, 2);
  4107.                                     #endif
  4108.                                 }
  4109.                             }
  4110.                             else if(ACInfo[playerid][acACAllow][1] && ac_vsp < 16 &&
  4111.                             ++ACInfo[playerid][acCheatCount][2] > AC_MAX_AIR_VEH_WARNINGS)
  4112.                             {
  4113.                                 #undef AC_MAX_AIR_VEH_WARNINGS
  4114.                                 #if defined DEBUG
  4115.                                     printf("[Nex-AC debug] Speed: %d, distance: %f, distance set: %f, vehicleid: %d",
  4116.                                     ac_vsp, ac_dist, ac_dist_set, ac_vehid);
  4117.                                 #endif
  4118.                                 #if defined OnCheatDetected
  4119.                                     ac_KickWithCode(playerid, "", 0, 1);
  4120.                                     ACInfo[playerid][acCheatCount][2] = 0;
  4121.                                 #else
  4122.                                     return ac_KickWithCode(playerid, "", 0, 1);
  4123.                                 #endif
  4124.                             }
  4125.                         }
  4126.                         if(ac_gtc > ACInfo[playerid][acGtc][9] + ac_gpp)
  4127.                         {
  4128.                             ac_i = GetVehicleModel(ac_vehid) - 400;
  4129.                             new ac_spDiff = ac_vsp - ac_GetSpeed3D(ACVehInfo[ac_vehid][acVelX], ACVehInfo[ac_vehid][acVelY], ACVehInfo[ac_vehid][acVelZ]);
  4130.                             if(ACInfo[playerid][acACAllow][10])
  4131.                             {
  4132.                                 if(ac_spDiff > 270)
  4133.                                 {
  4134.                                     #if defined DEBUG
  4135.                                         printf("[Nex-AC debug] Speed: %d, old speed: %d, veh model: %d",
  4136.                                         ac_vsp, ac_vsp - ac_spDiff, ac_i + 400);
  4137.                                     #endif
  4138.                                     #if defined OnCheatDetected
  4139.                                         ac_KickWithCode(playerid, "", 0, 10, 3);
  4140.                                     #else
  4141.                                         return ac_KickWithCode(playerid, "", 0, 10, 3);
  4142.                                     #endif
  4143.                                 }
  4144.                                 else if(ac_spDiff >= 20 &&
  4145.                                 ACVehInfo[ac_vehid][acSpeedDiff] <= ac_spDiff && floatcmp(ACVehInfo[ac_vehid][acHealth], ac_vHealth) == 0 &&
  4146.                                 !((ac_i == 32 || ac_i == 49 || 137 <= ac_i <= 138) && ac_spDiff < 65 ||
  4147.                                 (ac_i == 81 || 109 <= ac_i <= 110) && floatcmp(floatabs(ac_vX), 0.3) <= 0 && floatcmp(floatabs(ac_vY), 0.3) <= 0 && floatcmp(floatabs(ac_vZ), 0.3) <= 0 ||
  4148.                                 !(ac_i == 49 || ac_i == 81 || 109 <= ac_i <= 110 || 137 <= ac_i <= 138) && floatcmp(ACVehInfo[ac_vehid][acHealth], 250.0) == -1))
  4149.                                 {
  4150.                                     ACInfo[playerid][acCheatCount][16] += 3;
  4151.                                     if(ACInfo[playerid][acCheatCount][16] > AC_MAX_SPEEDHACK_WARNINGS * 3)
  4152.                                     {
  4153.                                         #undef AC_MAX_SPEEDHACK_WARNINGS
  4154.                                         #if defined DEBUG
  4155.                                             printf("[Nex-AC debug] Speed: %d, old speed: %d, veh model: %d",
  4156.                                             ac_vsp, ac_vsp - ac_spDiff, ac_i + 400);
  4157.                                         #endif
  4158.                                         #if defined OnCheatDetected
  4159.                                             ac_KickWithCode(playerid, "", 0, 10, 1);
  4160.                                         #else
  4161.                                             return ac_KickWithCode(playerid, "", 0, 10, 1);
  4162.                                         #endif
  4163.                                     }
  4164.                                 }
  4165.                             }
  4166.                             if(ACInfo[playerid][acACAllow][25] &&
  4167.                             ac_vsp > 15 && ac_abs(ac_spDiff) < 25 &&
  4168.                             floatround(floatabs(floatsub(ac_zAngle, ACVehInfo[ac_vehid][acZAngle]))) == 180 &&
  4169.                             (floatcmp(ac_vX, 0.0) == -1) != (floatcmp(ACVehInfo[ac_vehid][acVelX], 0.0) == -1) &&
  4170.                             (floatcmp(ac_vY, 0.0) == -1) != (floatcmp(ACVehInfo[ac_vehid][acVelY], 0.0) == -1) &&
  4171.                             (floatcmp(ac_vZ, 0.0) == -1) != (floatcmp(ACVehInfo[ac_vehid][acVelZ], 0.0) == -1))
  4172.                             {
  4173.                                 #if defined DEBUG
  4174.                                     printf("[Nex-AC debug] Speed: %d, speed diff: %d, z angle: %f, old z angle: %f, vehicleid: %d",
  4175.                                     ac_vsp, ac_spDiff, ac_zAngle, ACVehInfo[ac_vehid][acZAngle], ac_vehid);
  4176.                                 #endif
  4177.                                 #if defined OnCheatDetected
  4178.                                     ac_KickWithCode(playerid, "", 0, 25);
  4179.                                 #else
  4180.                                     return ac_KickWithCode(playerid, "", 0, 25);
  4181.                                 #endif
  4182.                             }
  4183.                             if(17 <= ac_i <= 193 && 1 <= ac_vType[ac_i] <= 2)
  4184.                             {
  4185.                                 if(ACInfo[playerid][acACAllow][10] && (ac_vsp = ac_GetSpeed2D(ac_vX, ac_vY)) > 270)
  4186.                                 {
  4187.                                     #if defined DEBUG
  4188.                                         printf("[Nex-AC debug] Speed (x, y): %d, veh model: %d", ac_vsp, ac_i + 400);
  4189.                                     #endif
  4190.                                     #if defined OnCheatDetected
  4191.                                         ac_KickWithCode(playerid, "", 0, 10, 2);
  4192.                                     #else
  4193.                                         return ac_KickWithCode(playerid, "", 0, 10, 2);
  4194.                                     #endif
  4195.                                 }
  4196.                             }
  4197.                             else if(ACInfo[playerid][acACAllow][8])
  4198.                             {
  4199.                                 new Float:ac_zDiff = floatsub(ac_Z, ACInfo[playerid][acPosZ]);
  4200.                                 if(floatcmp(ac_vZ, 0.1) >= 0 && floatcmp(ac_vZ, ACVehInfo[ac_vehid][acVelZ]) == 1 &&
  4201.                                 floatcmp(floatabs(floatsub(ACInfo[playerid][acPosX], ac_X)), floatdiv(ac_zDiff, 2.0)) == -1 &&
  4202.                                 floatcmp(floatabs(floatsub(ACInfo[playerid][acPosY], ac_Y)), floatdiv(ac_zDiff, 2.0)) == -1)
  4203.                                 {
  4204.                                     if(++ACInfo[playerid][acCheatCount][3] > (81 <= ac_i <= 110 &&
  4205.                                     ac_vType[ac_i] == 4 ? AC_MAX_FLYHACK_B_WARNINGS : AC_MAX_FLYHACK_VEH_WARNINGS))
  4206.                                     {
  4207.                                         #undef AC_MAX_FLYHACK_B_WARNINGS
  4208.                                         #if defined DEBUG
  4209.                                             printf("[Nex-AC debug] Vel z: %f, old vel z: %f, pos diff x, y, z: %f, %f, %f, vehicleid: %d",
  4210.                                             ac_vZ, ACVehInfo[ac_vehid][acVelZ], floatsub(ACInfo[playerid][acPosX], ac_X), floatsub(ACInfo[playerid][acPosY], ac_Y), ac_zDiff, ac_vehid);
  4211.                                         #endif
  4212.                                         #if defined OnCheatDetected
  4213.                                             ac_KickWithCode(playerid, "", 0, 8, 1);
  4214.                                             ACInfo[playerid][acCheatCount][3] = 0;
  4215.                                         #else
  4216.                                             return ac_KickWithCode(playerid, "", 0, 8, 1);
  4217.                                         #endif
  4218.                                     }
  4219.                                 }
  4220.                                 else ACInfo[playerid][acCheatCount][3] = 0;
  4221.                             }
  4222.                             ACVehInfo[ac_vehid][acSpeedDiff] = ac_spDiff;
  4223.                         }
  4224.                         ACVehInfo[ac_vehid][acVelX] = ac_vX;
  4225.                         ACVehInfo[ac_vehid][acVelY] = ac_vY;
  4226.                         ACVehInfo[ac_vehid][acVelZ] = ac_vZ;
  4227.                         ACVehInfo[ac_vehid][acPosDiff] = ac_dist;
  4228.                         ACVehInfo[ac_vehid][acHealth] = ac_vHealth;
  4229.                         ACVehInfo[ac_vehid][acZAngle] = ac_zAngle;
  4230.                     }
  4231.                     ACInfo[playerid][acSeat] = ac_s;
  4232.                 }
  4233.                 else
  4234.                 {
  4235.                     GetPlayerVelocity(playerid, ac_vX, ac_vY, ac_vZ);
  4236.                     ac_s = ac_GetSpeed3D(ac_vX, ac_vY, ac_vZ);
  4237.                     if(ACInfo[playerid][acAnim] != (ac_sa = GetPlayerAnimationIndex(playerid)))
  4238.                     {
  4239.                         switch(ac_sa)
  4240.                         {
  4241.                             case -1:
  4242.                             {
  4243.                                 if(ACInfo[playerid][acACAllow][24])
  4244.                                 {
  4245.                                     #if defined OnCheatDetected
  4246.                                         ac_KickWithCode(playerid, "", 0, 24);
  4247.                                     #else
  4248.                                         return ac_KickWithCode(playerid, "", 0, 24);
  4249.                                     #endif
  4250.                                 }
  4251.                             }
  4252.                             case 157, 159, 161, 1058:
  4253.                             {
  4254.                                 if(ACInfo[playerid][acACAllow][7])
  4255.                                 {
  4256.                                     #if defined DEBUG
  4257.                                         printf("[Nex-AC debug] Anim: %d, old anim: %d, old vehicleid: %d",
  4258.                                         ac_sa, ACInfo[playerid][acAnim], ACInfo[playerid][acVeh]);
  4259.                                     #endif
  4260.                                     #if defined OnCheatDetected
  4261.                                         ac_KickWithCode(playerid, "", 0, 7, 2);
  4262.                                     #else
  4263.                                         return ac_KickWithCode(playerid, "", 0, 7, 2);
  4264.                                     #endif
  4265.                                 }
  4266.                             }
  4267.                             case 1231:
  4268.                             {
  4269.                                 if(ACInfo[playerid][acACAllow][30])
  4270.                                 {
  4271.                                     ac_i = GetPlayerSkin(playerid);
  4272.                                     if(!ac_PedAnims && (1 <= ac_i <= 73 || 75 <= ac_i <= 311) && ac_w != 46)
  4273.                                     {
  4274.                                         #if defined DEBUG
  4275.                                             printf("[Nex-AC debug] Skin: %d, old anim: %d, weaponid: %d",
  4276.                                             ac_i, ACInfo[playerid][acAnim], ac_w);
  4277.                                         #endif
  4278.                                         #if defined OnCheatDetected
  4279.                                             ac_KickWithCode(playerid, "", 0, 30);
  4280.                                         #else
  4281.                                             return ac_KickWithCode(playerid, "", 0, 30);
  4282.                                         #endif
  4283.                                     }
  4284.                                 }
  4285.                             }
  4286.                         }
  4287.                     }
  4288.                     else if(ACInfo[playerid][acACAllow][7])
  4289.                     {
  4290.                         if(1538 <= ac_sa <= 1544 && ac_s > 36 && ACInfo[playerid][acSpeed] < ac_s)
  4291.                         {
  4292.                             if(++ACInfo[playerid][acCheatCount][15] > AC_MAX_FLYHACK_WARNINGS)
  4293.                             {
  4294.                                 #if defined DEBUG
  4295.                                     printf("[Nex-AC debug] Speed: %d, old speed: %d, anim: %d",
  4296.                                     ac_s, ACInfo[playerid][acSpeed], ac_sa);
  4297.                                 #endif
  4298.                                 #if defined OnCheatDetected
  4299.                                     ac_KickWithCode(playerid, "", 0, 7, 3);
  4300.                                     ACInfo[playerid][acCheatCount][15] = 0;
  4301.                                 #else
  4302.                                     return ac_KickWithCode(playerid, "", 0, 7, 3);
  4303.                                 #endif
  4304.                             }
  4305.                         }
  4306.                         else if(ac_w != 46 && 958 <= ac_sa <= 979 &&
  4307.                         !(SPECIAL_ACTION_DRINK_BEER <= ac_specact <= SPECIAL_ACTION_DRINK_SPRUNK))
  4308.                         {
  4309.                             if(++ACInfo[playerid][acCheatCount][15] > AC_MAX_FLYHACK_WARNINGS)
  4310.                             {
  4311.                                 #undef AC_MAX_FLYHACK_WARNINGS
  4312.                                 #if defined DEBUG
  4313.                                     printf("[Nex-AC debug] Anim: %d, old anim: %d, weaponid: %d, spec act: %d",
  4314.                                     ac_sa, ACInfo[playerid][acAnim], ac_w, ac_specact);
  4315.                                 #endif
  4316.                                 #if defined OnCheatDetected
  4317.                                     ac_KickWithCode(playerid, "", 0, 7, 1);
  4318.                                     ACInfo[playerid][acCheatCount][15] = 0;
  4319.                                 #else
  4320.                                     return ac_KickWithCode(playerid, "", 0, 7, 1);
  4321.                                 #endif
  4322.                             }
  4323.                         }
  4324.                         else ACInfo[playerid][acCheatCount][15] = 0;
  4325.                     }
  4326.                     if(ACInfo[playerid][acSet][4] != -1)
  4327.                     {
  4328.                         if(ac_specact == ACInfo[playerid][acSet][4]) ACInfo[playerid][acSet][4] = -1;
  4329.                         else if(ACInfo[playerid][acACAllow][52] && ac_gtc > ACInfo[playerid][acGtc][6] + ac_gpp &&
  4330.                         ++ACInfo[playerid][acNOPCount][6] > AC_MAX_NOP_WARNINGS)
  4331.                         {
  4332.                             #if defined DEBUG
  4333.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerSpecialAction");
  4334.                                 printf("[Nex-AC debug] AC spec act: %d, spec act: %d", ACInfo[playerid][acSet][4], ac_specact);
  4335.                             #endif
  4336.                             #if defined OnCheatDetected
  4337.                                 ac_KickWithCode(playerid, "", 0, 52, 12);
  4338.                                 ACInfo[playerid][acSet][4] = -1;
  4339.                             #else
  4340.                                 return ac_KickWithCode(playerid, "", 0, 52, 12);
  4341.                             #endif
  4342.                         }
  4343.                     }
  4344.                     else if(ac_specact != ACInfo[playerid][acSpecAct])
  4345.                     {
  4346.                         if(ac_specact == ACInfo[playerid][acNextSpecAct]) ACInfo[playerid][acNextSpecAct] = -1;
  4347.                         else if(ACInfo[playerid][acACAllow][18])
  4348.                         {
  4349.                             switch(ac_specact)
  4350.                             {
  4351.                                 case SPECIAL_ACTION_NONE:
  4352.                                 {
  4353.                                     switch(ACInfo[playerid][acSpecAct])
  4354.                                     {
  4355.                                         case SPECIAL_ACTION_USECELLPHONE, SPECIAL_ACTION_CUFFED, SPECIAL_ACTION_CARRY:
  4356.                                         {
  4357.                                             #if defined OnCheatDetected
  4358.                                                 ac_KickWithCode(playerid, "", 0, 18, 1);
  4359.                                             #else
  4360.                                                 return ac_KickWithCode(playerid, "", 0, 18, 1);
  4361.                                             #endif
  4362.                                         }
  4363.                                     }
  4364.                                 }
  4365.                                 case SPECIAL_ACTION_DUCK:
  4366.                                 {
  4367.                                     if(ACInfo[playerid][acSpecAct] > SPECIAL_ACTION_NONE &&
  4368.                                     !(SPECIAL_ACTION_DRINK_BEER <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_CUFFED))
  4369.                                     {
  4370.                                         #if defined OnCheatDetected
  4371.                                             ac_KickWithCode(playerid, "", 0, 18, 2);
  4372.                                         #else
  4373.                                             return ac_KickWithCode(playerid, "", 0, 18, 2);
  4374.                                         #endif
  4375.                                     }
  4376.                                 }
  4377.                                 case SPECIAL_ACTION_USEJETPACK:
  4378.                                 {
  4379.                                     if(!IsPlayerInRangeOfPoint(playerid, 8.0, ACInfo[playerid][acDropJpX],
  4380.                                     ACInfo[playerid][acDropJpY], ACInfo[playerid][acDropJpZ]))
  4381.                                     {
  4382.                                         #if defined DEBUG
  4383.                                             printf("[Nex-AC debug] AC spec act: %d, spec act: %d, distance: %f",
  4384.                                             ACInfo[playerid][acSpecAct], ac_specact, GetPlayerDistanceFromPoint(playerid,
  4385.                                             ACInfo[playerid][acDropJpX], ACInfo[playerid][acDropJpY], ACInfo[playerid][acDropJpZ]));
  4386.                                         #endif
  4387.                                         #if defined OnCheatDetected
  4388.                                             ac_KickWithCode(playerid, "", 0, 18, 3);
  4389.                                         #else
  4390.                                             return ac_KickWithCode(playerid, "", 0, 18, 3);
  4391.                                         #endif
  4392.                                     }
  4393.                                     ACInfo[playerid][acDropJpX] = ACInfo[playerid][acDropJpY] =
  4394.                                     ACInfo[playerid][acDropJpZ] = 20000.0;
  4395.                                 }
  4396.                                 case SPECIAL_ACTION_ENTER_VEHICLE:
  4397.                                 {
  4398.                                     switch(ACInfo[playerid][acSpecAct])
  4399.                                     {
  4400.                                         case SPECIAL_ACTION_DANCE1, SPECIAL_ACTION_DANCE2, SPECIAL_ACTION_DANCE3, SPECIAL_ACTION_DANCE4, SPECIAL_ACTION_USECELLPHONE, 68:
  4401.                                         {
  4402.                                             #if defined OnCheatDetected
  4403.                                                 ac_KickWithCode(playerid, "", 0, 18, 4);
  4404.                                             #else
  4405.                                                 return ac_KickWithCode(playerid, "", 0, 18, 4);
  4406.                                             #endif
  4407.                                         }
  4408.                                     }
  4409.                                 }
  4410.                                 default:
  4411.                                 {
  4412.                                     if(!((SPECIAL_ACTION_DRINK_BEER <= ac_specact <= SPECIAL_ACTION_CUFFED &&
  4413.                                     ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_DUCK ||
  4414.                                     ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_ENTER_VEHICLE) &&
  4415.                                     ac_specact == ACInfo[playerid][acLastSpecAct]) &&
  4416.                                     (ACInfo[playerid][acVeh] == 0 || ac_specact != SPECIAL_ACTION_EXIT_VEHICLE &&
  4417.                                     ac_specact != SPECIAL_ACTION_USECELLPHONE))
  4418.                                     {
  4419.                                         #if defined DEBUG
  4420.                                             printf("[Nex-AC debug] AC spec act: %d, spec act: %d, Last spec act: %d, old vehicleid: %d",
  4421.                                             ACInfo[playerid][acSpecAct], ac_specact, ACInfo[playerid][acLastSpecAct], ACInfo[playerid][acVeh]);
  4422.                                         #endif
  4423.                                         #if defined OnCheatDetected
  4424.                                             ac_KickWithCode(playerid, "", 0, 18, 5);
  4425.                                         #else
  4426.                                             return ac_KickWithCode(playerid, "", 0, 18, 5);
  4427.                                         #endif
  4428.                                     }
  4429.                                 }
  4430.                             }
  4431.                         }
  4432.                         ACInfo[playerid][acLastSpecAct] = ACInfo[playerid][acSpecAct];
  4433.                     }
  4434.                     if(GetPlayerSurfingVehicleID(playerid) == INVALID_VEHICLE_ID &&
  4435.                     GetPlayerSurfingObjectID(playerid) == INVALID_OBJECT_ID)
  4436.                     {
  4437.                         if(floatcmp(ac_dist, 0.7) == 1 &&
  4438.                         (ACInfo[playerid][acSet][8] == -1 || floatcmp(ac_dist_set, 0.7) == 1) &&
  4439.                         ac_gtc > ACInfo[playerid][acGtc][11] + ac_gpp)
  4440.                         {
  4441.                             if(floatcmp(ac_dist, 30.0) == 1 &&
  4442.                             (ACInfo[playerid][acSet][8] == -1 || floatcmp(ac_dist_set, 30.0) == 1))
  4443.                             {
  4444.                                 if(ACInfo[playerid][acACAllow][2] &&
  4445.                                 !ACInfo[playerid][acIntEnterExits] && floatcmp(ACInfo[playerid][acPosZ], -95.0) == 1)
  4446.                                 {
  4447.                                     #if defined DEBUG
  4448.                                         printf("[Nex-AC debug] Distance: %f, distance set: %f, speed: %d, pos x, y, z: %f, %f, %f",
  4449.                                         ac_dist, ac_dist_set, ac_s, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  4450.                                     #endif
  4451.                                     #if defined OnCheatDetected
  4452.                                         ac_KickWithCode(playerid, "", 0, 2, 2);
  4453.                                     #else
  4454.                                         return ac_KickWithCode(playerid, "", 0, 2, 2);
  4455.                                     #endif
  4456.                                 }
  4457.                             }
  4458.                             else if(floatcmp(ac_s, floatmul(ac_dist, (floatcmp(ac_dist, 1.0) == -1 ? 20.0 : 5.0))) <= 0 &&
  4459.                             (ACInfo[playerid][acSet][8] == -1 || floatcmp(ac_s, floatmul(ac_dist_set, (floatcmp(ac_dist_set, 1.0) == -1 ? 20.0 : 5.0))) <= 0))
  4460.                             {
  4461.                                 if(ac_s < 3 && floatcmp(ac_dist, 8.0) == 1 &&
  4462.                                 (ACInfo[playerid][acSet][8] == -1 || floatcmp(ac_dist_set, 8.0) == 1))
  4463.                                 {
  4464.                                     if(ACInfo[playerid][acACAllow][2])
  4465.                                     {
  4466.                                         #if defined DEBUG
  4467.                                             printf("[Nex-AC debug] Speed: %d, distance: %f, distance set: %f",
  4468.                                             ac_s, ac_dist, ac_dist_set);
  4469.                                         #endif
  4470.                                         #if defined OnCheatDetected
  4471.                                             ac_KickWithCode(playerid, "", 0, 2, 3);
  4472.                                         #else
  4473.                                             return ac_KickWithCode(playerid, "", 0, 2, 3);
  4474.                                         #endif
  4475.                                     }
  4476.                                 }
  4477.                                 else if(ACInfo[playerid][acACAllow][0] && ac_s &&
  4478.                                 ++ACInfo[playerid][acCheatCount][1] > AC_MAX_AIR_WARNINGS)
  4479.                                 {
  4480.                                     #undef AC_MAX_AIR_WARNINGS
  4481.                                     #if defined DEBUG
  4482.                                         printf("[Nex-AC debug] Speed: %d, distance: %f, distance set: %f", ac_s, ac_dist, ac_dist_set);
  4483.                                     #endif
  4484.                                     #if defined OnCheatDetected
  4485.                                         ac_KickWithCode(playerid, "", 0, 0);
  4486.                                         ACInfo[playerid][acCheatCount][1] = 0;
  4487.                                     #else
  4488.                                         return ac_KickWithCode(playerid, "", 0, 0);
  4489.                                     #endif
  4490.                                 }
  4491.                             }
  4492.                         }
  4493.                         if(ac_gtc > ACInfo[playerid][acGtc][10] + ac_gpp)
  4494.                         {
  4495.                             if(ACInfo[playerid][acACAllow][9] && ac_s > 257 && ACInfo[playerid][acSpeed] < ac_s)
  4496.                             {
  4497.                                 #if defined DEBUG
  4498.                                     printf("[Nex-AC debug] Speed: %d, old speed: %d", ac_s, ACInfo[playerid][acSpeed]);
  4499.                                 #endif
  4500.                                 #if defined OnCheatDetected
  4501.                                     ac_KickWithCode(playerid, "", 0, 9);
  4502.                                 #else
  4503.                                     return ac_KickWithCode(playerid, "", 0, 9);
  4504.                                 #endif
  4505.                             }
  4506.                             ACInfo[playerid][acSpeed] = ac_s;
  4507.                         }
  4508.                     }
  4509.                     else ACInfo[playerid][acSpeed] = ac_s;
  4510.                     ACInfo[playerid][acAnim] = ac_sa;
  4511.                 }
  4512.                 ACInfo[playerid][acSpecAct] = ac_specact;
  4513.                 ACInfo[playerid][acHealth] = ac_health;
  4514.                 ACInfo[playerid][acArmour] = ac_armour;
  4515.             }
  4516.             ACInfo[playerid][acVeh] = ac_vehid;
  4517.             if(ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp) ACInfo[playerid][acLastWeapon] = ac_w;
  4518.             ACInfo[playerid][acPosX] = ac_X;
  4519.             ACInfo[playerid][acPosY] = ac_Y;
  4520.             ACInfo[playerid][acPosZ] = ac_Z;
  4521.         }
  4522.     }
  4523.     ac_gpp = 1;
  4524.     ACInfo[playerid][acUpdateTime] = ac_gtc;
  4525.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  4526.         && defined ac_OnPlayerUpdate
  4527.         ac_gpp = ac_OnPlayerUpdate(playerid);
  4528.     #endif
  4529.     if(ACInfo[playerid][acACAllow][33] && ac_gpp) return ACInfo[playerid][acUnFrozen];
  4530.     return ac_gpp;
  4531. }
  4532.  
  4533. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  4534.     #if defined _ALS_OnPlayerUpdate
  4535.         #undef OnPlayerUpdate
  4536.     #else
  4537.         #define _ALS_OnPlayerUpdate
  4538.     #endif
  4539.     #define OnPlayerUpdate ac_OnPlayerUpdate
  4540.     #if defined ac_OnPlayerUpdate
  4541.         forward ac_OnPlayerUpdate(playerid);
  4542.     #endif
  4543. #endif
  4544.  
  4545. #if defined _inc_y_hooks || defined _INC_y_hooks
  4546.     hook OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  4547. #else
  4548.     public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  4549. #endif
  4550. {
  4551.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked]) return 0;
  4552.     if(!IsPlayerNPC(playerid))
  4553.     {
  4554.         if((newkeys & KEY_SECONDARY_ATTACK) && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_USEJETPACK &&
  4555.         GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_USEJETPACK)
  4556.         {
  4557.             ACInfo[playerid][acDropJpX] = ACInfo[playerid][acPosX];
  4558.             ACInfo[playerid][acDropJpY] = ACInfo[playerid][acPosY];
  4559.             ACInfo[playerid][acDropJpZ] = ACInfo[playerid][acPosZ];
  4560.         }
  4561.         if((newkeys & KEY_CROUCH) && 24 <= GetPlayerWeapon(playerid) <= 25) ACInfo[playerid][acCheatCount][14] = 0;
  4562.     }
  4563.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  4564.         && defined ac_OnPlayerKeyStateChange
  4565.         return ac_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
  4566.     #else
  4567.         return 1;
  4568.     #endif
  4569. }
  4570.  
  4571. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  4572.     #if defined _ALS_OnPlayerKeyStateChange
  4573.         #undef OnPlayerKeyStateChange
  4574.     #else
  4575.         #define _ALS_OnPlayerKeyStateChange
  4576.     #endif
  4577.     #define OnPlayerKeyStateChange ac_OnPlayerKeyStateChange
  4578.     #if defined ac_OnPlayerKeyStateChange
  4579.         forward ac_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
  4580.     #endif
  4581. #endif
  4582.  
  4583. #if defined _inc_y_hooks || defined _INC_y_hooks
  4584.     hook OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  4585. #else
  4586.     public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  4587. #endif
  4588. {
  4589.     if(ACInfo[playerid][acKicked]) return 1;
  4590.     new ac_gtc = GetTickCount();
  4591.     if(ACInfo[playerid][acACAllow][49])
  4592.     {
  4593.         if(ac_gtc < ACInfo[playerid][acCall][2] + ac_Mtfc[2][0])
  4594.         {
  4595.             ac_FloodDetect(playerid, 2);
  4596.             return 1;
  4597.         }
  4598.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  4599.         else ACInfo[playerid][acFloodCount][2] = ACInfo[playerid][acFloodCount][27] = 0;
  4600.     }
  4601.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][2] = ac_gtc;
  4602.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  4603.         && defined ac_OnPlayerClickMap
  4604.         return ac_OnPlayerClickMap(playerid, fX, fY, fZ);
  4605.     #else
  4606.         return 0;
  4607.     #endif
  4608. }
  4609.  
  4610. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  4611.     #if defined _ALS_OnPlayerClickMap
  4612.         #undef OnPlayerClickMap
  4613.     #else
  4614.         #define _ALS_OnPlayerClickMap
  4615.     #endif
  4616.     #define OnPlayerClickMap ac_OnPlayerClickMap
  4617.     #if defined ac_OnPlayerClickMap
  4618.         forward ac_OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ);
  4619.     #endif
  4620. #endif
  4621.  
  4622. #if defined _inc_y_hooks || defined _INC_y_hooks
  4623.     hook OnPlayerClickPlayer(playerid, clickedplayerid, source)
  4624. #else
  4625.     public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  4626. #endif
  4627. {
  4628.     if(ACInfo[playerid][acKicked]) return 1;
  4629.     new ac_gtc = GetTickCount();
  4630.     if(ACInfo[playerid][acACAllow][49])
  4631.     {
  4632.         if(ac_gtc < ACInfo[playerid][acCall][3] + ac_Mtfc[3][0])
  4633.         {
  4634.             ac_FloodDetect(playerid, 3);
  4635.             return 1;
  4636.         }
  4637.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  4638.         else ACInfo[playerid][acFloodCount][3] = ACInfo[playerid][acFloodCount][27] = 0;
  4639.     }
  4640.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][3] = ac_gtc;
  4641.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  4642.         && defined ac_OnPlayerClickPlayer
  4643.         return ac_OnPlayerClickPlayer(playerid, clickedplayerid, source);
  4644.     #else
  4645.         return 0;
  4646.     #endif
  4647. }
  4648.  
  4649. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  4650.     #if defined _ALS_OnPlayerClickPlayer
  4651.         #undef OnPlayerClickPlayer
  4652.     #else
  4653.         #define _ALS_OnPlayerClickPlayer
  4654.     #endif
  4655.     #define OnPlayerClickPlayer ac_OnPlayerClickPlayer
  4656.     #if defined ac_OnPlayerClickPlayer
  4657.         forward ac_OnPlayerClickPlayer(playerid, clickedplayerid, source);
  4658.     #endif
  4659. #endif
  4660.  
  4661. #if defined _inc_y_hooks || defined _INC_y_hooks
  4662.     hook OnPlayerClickTextDraw(playerid, Text:clickedid)
  4663. #else
  4664.     public OnPlayerClickTextDraw(playerid, Text:clickedid)
  4665. #endif
  4666. {
  4667.     if(ACInfo[playerid][acKicked]) return 1;
  4668.     new ac_gtc = GetTickCount();
  4669.     if(ACInfo[playerid][acACAllow][49])
  4670.     {
  4671.         if(ac_gtc < ACInfo[playerid][acCall][4] + ac_Mtfc[4][0])
  4672.         {
  4673.             ac_FloodDetect(playerid, 4);
  4674.             return 1;
  4675.         }
  4676.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  4677.         else ACInfo[playerid][acFloodCount][4] = ACInfo[playerid][acFloodCount][27] = 0;
  4678.     }
  4679.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][4] = ac_gtc;
  4680.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  4681.         && defined ac_OnPlayerClickTextDraw
  4682.         return ac_OnPlayerClickTextDraw(playerid, clickedid);
  4683.     #else
  4684.         return 0;
  4685.     #endif
  4686. }
  4687.  
  4688. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  4689.     #if defined _ALS_OnPlayerClickTextDraw
  4690.         #undef OnPlayerClickTextDraw
  4691.     #else
  4692.         #define _ALS_OnPlayerClickTextDraw
  4693.     #endif
  4694.     #define OnPlayerClickTextDraw ac_OnPlayerClickTextDraw
  4695.     #if defined ac_OnPlayerClickTextDraw
  4696.         forward ac_OnPlayerClickTextDraw(playerid, Text:clickedid);
  4697.     #endif
  4698. #endif
  4699.  
  4700. #if defined _inc_y_hooks || defined _INC_y_hooks
  4701.     hook OnPlayerCommandText(playerid, cmdtext[])
  4702. #else
  4703.     public OnPlayerCommandText(playerid, cmdtext[])
  4704. #endif
  4705. {
  4706.     if(ACInfo[playerid][acKicked]) return 1;
  4707.     if(!IsPlayerNPC(playerid))
  4708.     {
  4709.         new ac_gtc = GetTickCount();
  4710.         if(ACInfo[playerid][acACAllow][49])
  4711.         {
  4712.             if(ac_gtc < ACInfo[playerid][acCall][5] + ac_Mtfc[5][0])
  4713.             {
  4714.                 ac_FloodDetect(playerid, 5);
  4715.                 return 1;
  4716.             }
  4717.             if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  4718.             else ACInfo[playerid][acFloodCount][5] = ACInfo[playerid][acFloodCount][27] = 0;
  4719.         }
  4720.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][5] = ac_gtc;
  4721.     }
  4722.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  4723.         && defined ac_OnPlayerCommandText
  4724.         return ac_OnPlayerCommandText(playerid, cmdtext);
  4725.     #else
  4726.         return 0;
  4727.     #endif
  4728. }
  4729.  
  4730. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  4731.     #if defined _ALS_OnPlayerCommandText
  4732.         #undef OnPlayerCommandText
  4733.     #else
  4734.         #define _ALS_OnPlayerCommandText
  4735.     #endif
  4736.     #define OnPlayerCommandText ac_OnPlayerCommandText
  4737.     #if defined ac_OnPlayerCommandText
  4738.         forward ac_OnPlayerCommandText(playerid, cmdtext[]);
  4739.     #endif
  4740. #endif
  4741.  
  4742. #if defined _inc_y_hooks || defined _INC_y_hooks
  4743.     hook OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  4744. #else
  4745.     public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  4746. #endif
  4747. {
  4748.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked]) return 0;
  4749.     new ac_gtc = GetTickCount();
  4750.     if(ACInfo[playerid][acACAllow][49])
  4751.     {
  4752.         if(ac_gtc < ACInfo[playerid][acCall][6] + ac_Mtfc[6][0]) ac_FloodDetect(playerid, 6);
  4753.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  4754.         else ACInfo[playerid][acFloodCount][6] = ACInfo[playerid][acFloodCount][27] = 0;
  4755.     }
  4756.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][6] = ac_gtc;
  4757.     new ac_model = GetVehicleModel(vehicleid) - 400;
  4758.     if(ACInfo[playerid][acACAllow][44] && ac_model < 0) return ac_KickWithCode(playerid, "", 0, 44, 1);
  4759.     if(ACInfo[playerid][acEnterVeh] != vehicleid)
  4760.     {
  4761.         new ac_tmpPrm1, ac_tmpPrm2;
  4762.         GetVehicleParamsEx(vehicleid, ac_tmpPrm2, ac_tmpPrm2, ac_tmpPrm2, ac_tmpPrm1, ac_tmpPrm2, ac_tmpPrm2, ac_tmpPrm2);
  4763.         if(ispassenger || ac_tmpPrm1 != VEHICLE_PARAMS_ON)
  4764.         {
  4765.             ACInfo[playerid][acEnterVeh] = vehicleid;
  4766.             if(ac_model == 170 || 30 <= ac_model <= 195 && ac_vType[ac_model] == 3) ACInfo[playerid][acEnterVehTime] = 0;
  4767.             else ACInfo[playerid][acEnterVehTime] = ac_gtc;
  4768.         }
  4769.     }
  4770.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  4771.         && defined ac_OnPlayerEnterVehicle
  4772.         return ac_OnPlayerEnterVehicle(playerid, vehicleid, ispassenger);
  4773.     #else
  4774.         return 1;
  4775.     #endif
  4776. }
  4777.  
  4778. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  4779.     #if defined _ALS_OnPlayerEnterVehicle
  4780.         #undef OnPlayerEnterVehicle
  4781.     #else
  4782.         #define _ALS_OnPlayerEnterVehicle
  4783.     #endif
  4784.     #define OnPlayerEnterVehicle ac_OnPlayerEnterVehicle
  4785.     #if defined ac_OnPlayerEnterVehicle
  4786.         forward ac_OnPlayerEnterVehicle(playerid, vehicleid, ispassenger);
  4787.     #endif
  4788. #endif
  4789.  
  4790. #if defined _inc_y_hooks || defined _INC_y_hooks
  4791.     hook OnPlayerExitVehicle(playerid, vehicleid)
  4792. #else
  4793.     public OnPlayerExitVehicle(playerid, vehicleid)
  4794. #endif
  4795. {
  4796.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked]) return 0;
  4797.     new ac_i = GetTickCount();
  4798.     if(ACInfo[playerid][acACAllow][49])
  4799.     {
  4800.         if(ac_i < ACInfo[playerid][acCall][7] + ac_Mtfc[7][0]) ac_FloodDetect(playerid, 7);
  4801.         if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  4802.         else ACInfo[playerid][acFloodCount][7] = ACInfo[playerid][acFloodCount][27] = 0;
  4803.     }
  4804.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][7] = ac_i;
  4805.     ac_i = GetVehicleModel(ACInfo[playerid][acVeh]) - 400;
  4806.     if(17 <= ac_i <= 193 && 1 <= ac_vType[ac_i] <= 2) ACInfo[playerid][acParachute] = true;
  4807.     else ACInfo[playerid][acParachute] = false;
  4808.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  4809.         && defined ac_OnPlayerExitVehicle
  4810.         return ac_OnPlayerExitVehicle(playerid, vehicleid);
  4811.     #else
  4812.         return 1;
  4813.     #endif
  4814. }
  4815.  
  4816. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  4817.     #if defined _ALS_OnPlayerExitVehicle
  4818.         #undef OnPlayerExitVehicle
  4819.     #else
  4820.         #define _ALS_OnPlayerExitVehicle
  4821.     #endif
  4822.     #define OnPlayerExitVehicle ac_OnPlayerExitVehicle
  4823.     #if defined ac_OnPlayerExitVehicle
  4824.         forward ac_OnPlayerExitVehicle(playerid, vehicleid);
  4825.     #endif
  4826. #endif
  4827.  
  4828. #if defined OnPlayerPickUpDynamicPickup\
  4829.     && defined Streamer_GetDistanceToItem\
  4830.     && defined Streamer_GetIntData
  4831.     #if defined _inc_y_hooks || defined _INC_y_hooks
  4832.         #if defined STREAMER_ENABLE_TAGS
  4833.             hook OnPlayerPickUpDynPickup(playerid, STREAMER_TAG_PICKUP pickupid)
  4834.         #else
  4835.             hook OnPlayerPickUpDynPickup(playerid, pickupid)
  4836.         #endif
  4837.     #else
  4838.         #if defined STREAMER_ENABLE_TAGS
  4839.             public OnPlayerPickUpDynamicPickup(playerid, STREAMER_TAG_PICKUP pickupid)
  4840.         #else
  4841.             public OnPlayerPickUpDynamicPickup(playerid, pickupid)
  4842.         #endif
  4843.     #endif
  4844.     {
  4845.         if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked]) return 0;
  4846.         new ac_i = GetTickCount();
  4847.         if(ACInfo[playerid][acACAllow][49])
  4848.         {
  4849.             if(ac_i < ACInfo[playerid][acCall][8] + ac_Mtfc[8][0]) ac_FloodDetect(playerid, 8);
  4850.             else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  4851.             else ACInfo[playerid][acFloodCount][8] = ACInfo[playerid][acFloodCount][27] = 0;
  4852.         }
  4853.         if(ACInfo[playerid][acACAllow][6])
  4854.         {
  4855.             new Float:ac_X, Float:ac_Y, Float:ac_Z, Float:ac_tmp, Float:ac_tmp2;
  4856.             GetPlayerPos(playerid, ac_X, ac_Y, ac_Z);
  4857.             Streamer_GetDistanceToItem(ac_X, ac_Y, ac_Z, STREAMER_TYPE_PICKUP, pickupid, ac_tmp);
  4858.             Streamer_GetDistanceToItem(ACInfo[playerid][acSetPosX], ACInfo[playerid][acSetPosY], (ACInfo[playerid][acTpToZ] ? ac_Z : ACInfo[playerid][acSetPosZ]), STREAMER_TYPE_PICKUP, pickupid, ac_tmp2);
  4859.             if(floatcmp(ac_tmp, 8.0) == 1 && (ACInfo[playerid][acSet][8] == -1 || floatcmp(ac_tmp2, 8.0) == 1))
  4860.             {
  4861.                 #if defined DEBUG
  4862.                     printf("[Nex-AC debug] Pickupid: %d, distance: %f, distance 2: %f, acSet[8]: %d",
  4863.                     _:pickupid, ac_tmp, ac_tmp2, ACInfo[playerid][acSet][8]);
  4864.                 #endif
  4865.                 #if defined OnCheatDetected
  4866.                     ac_KickWithCode(playerid, "", 0, 6, 2);
  4867.                 #else
  4868.                     return ac_KickWithCode(playerid, "", 0, 6, 2);
  4869.                 #endif
  4870.             }
  4871.         }
  4872.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][8] = ac_i;
  4873.         switch((ac_i = Streamer_GetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID)))
  4874.         {
  4875.             case 2: ACInfo[playerid][acSpecAct] = SPECIAL_ACTION_USEJETPACK;
  4876.             case 3: ACInfo[playerid][acHealth] = 100;
  4877.             case 4: ACInfo[playerid][acArmour] = 100;
  4878.             default:
  4879.             {
  4880.                 if(ac_i > 100)
  4881.                 {
  4882.                     ac_i -= 100;
  4883.                     new ac_s = ac_wSlot[ac_i];
  4884.                     if(ACInfo[playerid][acWeapon][ac_s] == ac_i ||
  4885.                     3 <= ac_s <= 5 && ACInfo[playerid][acWeapon][ac_s] > 0) ACInfo[playerid][acAmmo][ac_s] += ac_pAmmo[ac_i];
  4886.                 }
  4887.             }
  4888.         }
  4889.         ACInfo[playerid][acLastPickup] = _:pickupid + MAX_PICKUPS;
  4890.         #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  4891.             && defined ac_OnPlayerPickUpDynamicPickup
  4892.             return ac_OnPlayerPickUpDynamicPickup(playerid, pickupid);
  4893.         #else
  4894.             return 1;
  4895.         #endif
  4896.     }
  4897.  
  4898.     #if !defined _inc_y_hooks && !defined _INC_y_hooks
  4899.         #if defined _ALS_OnPlayerPickUpDynamicPicku\
  4900.             || defined _ALS_OnPlayerPickUpDynPickup\
  4901.             || defined _ALS_OnPlayerPickUpDynamicPick || defined _ALS_OnPlayerPickUpDynamicPUp
  4902.             #undef OnPlayerPickUpDynamicPickup
  4903.         #else
  4904.             #define _ALS_OnPlayerPickUpDynPickup
  4905.         #endif
  4906.         #define OnPlayerPickUpDynamicPickup ac_OnPlayerPickUpDynamicPickup
  4907.         #if defined ac_OnPlayerPickUpDynamicPickup
  4908.             #if defined STREAMER_ENABLE_TAGS
  4909.                 forward ac_OnPlayerPickUpDynamicPickup(playerid, STREAMER_TAG_PICKUP pickupid);
  4910.             #else
  4911.                 forward ac_OnPlayerPickUpDynamicPickup(playerid, pickupid);
  4912.             #endif
  4913.         #endif
  4914.     #endif
  4915. #endif
  4916.  
  4917. #if defined _inc_y_hooks || defined _INC_y_hooks
  4918.     hook OnPlayerPickUpPickup(playerid, pickupid)
  4919. #else
  4920.     public OnPlayerPickUpPickup(playerid, pickupid)
  4921. #endif
  4922. {
  4923.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] || !(0 <= pickupid < MAX_PICKUPS)) return 0;
  4924.     #if defined Streamer_GetItemStreamerID\
  4925.         && defined IsValidDynamicPickup
  4926.         #if defined STREAMER_ENABLE_TAGS
  4927.             new STREAMER_TAG_PICKUP streamerid = STREAMER_TAG_PICKUP Streamer_GetItemStreamerID(playerid, STREAMER_TYPE_PICKUP, pickupid);
  4928.         #else
  4929.             new streamerid = Streamer_GetItemStreamerID(playerid, STREAMER_TYPE_PICKUP, pickupid);
  4930.         #endif
  4931.         if(!IsValidDynamicPickup(streamerid))
  4932.         {
  4933.     #endif
  4934.         new ac_i = GetTickCount();
  4935.         if(ACInfo[playerid][acACAllow][49])
  4936.         {
  4937.             if(ac_i < ACInfo[playerid][acCall][8] + ac_Mtfc[8][0]) ac_FloodDetect(playerid, 8);
  4938.             else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  4939.             else ACInfo[playerid][acFloodCount][8] = ACInfo[playerid][acFloodCount][27] = 0;
  4940.         }
  4941.         if(ACInfo[playerid][acACAllow][6] &&
  4942.         !IsPlayerInRangeOfPoint(playerid, 8.0, ACPickInfo[pickupid][acPosX], ACPickInfo[pickupid][acPosY], ACPickInfo[pickupid][acPosZ]) &&
  4943.         (ACInfo[playerid][acSet][8] == -1 || floatcmp(VectorSize(floatsub(ACInfo[playerid][acSetPosX], ACPickInfo[pickupid][acPosX]), floatsub(ACInfo[playerid][acSetPosY], ACPickInfo[pickupid][acPosY]), floatsub((ACInfo[playerid][acTpToZ] ? ACPickInfo[pickupid][acPosZ] : ACInfo[playerid][acSetPosZ]), ACPickInfo[pickupid][acPosZ])), 8.0) == 1))
  4944.         {
  4945.             #if defined DEBUG
  4946.                 printf("[Nex-AC debug] Pickupid: %d, distance: %f",
  4947.                 pickupid, GetPlayerDistanceFromPoint(playerid, ACPickInfo[pickupid][acPosX],
  4948.                 ACPickInfo[pickupid][acPosY], ACPickInfo[pickupid][acPosZ]));
  4949.             #endif
  4950.             #if defined OnCheatDetected
  4951.                 ac_KickWithCode(playerid, "", 0, 6, 1);
  4952.             #else
  4953.                 return ac_KickWithCode(playerid, "", 0, 6, 1);
  4954.             #endif
  4955.         }
  4956.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][8] = ac_i;
  4957.         switch(ACPickInfo[pickupid][acType])
  4958.         {
  4959.             case 1:
  4960.             {
  4961.                 ac_i = ACPickInfo[pickupid][acWeapon];
  4962.                 new ac_s = ac_wSlot[ac_i];
  4963.                 if(ACInfo[playerid][acWeapon][ac_s] == ac_i ||
  4964.                 3 <= ac_s <= 5 && ACInfo[playerid][acWeapon][ac_s] > 0) ACInfo[playerid][acAmmo][ac_s] += ac_pAmmo[ac_i];
  4965.             }
  4966.             case 2: ACInfo[playerid][acSpecAct] = SPECIAL_ACTION_USEJETPACK;
  4967.             case 3: ACInfo[playerid][acHealth] = 100;
  4968.             case 4: ACInfo[playerid][acArmour] = 100;
  4969.         }
  4970.         ACInfo[playerid][acLastPickup] = pickupid;
  4971.     #if defined Streamer_GetItemStreamerID\
  4972.         && defined IsValidDynamicPickup
  4973.         }
  4974.     #endif
  4975.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  4976.         && defined ac_OnPlayerPickUpPickup
  4977.         #if defined Streamer_GetItemStreamerID\
  4978.             && defined IsValidDynamicPickup
  4979.             if(IsValidDynamicPickup(streamerid) ||
  4980.             !ACPickInfo[pickupid][acIsStatic]) return ac_OnPlayerPickUpPickup(playerid, pickupid);
  4981.         #else
  4982.             if(!ACPickInfo[pickupid][acIsStatic]) return ac_OnPlayerPickUpPickup(playerid, pickupid);
  4983.         #endif
  4984.         return 1;
  4985.     #else
  4986.         return 1;
  4987.     #endif
  4988. }
  4989.  
  4990. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  4991.     #if defined _ALS_OnPlayerPickUpPickup
  4992.         #undef OnPlayerPickUpPickup
  4993.     #else
  4994.         #define _ALS_OnPlayerPickUpPickup
  4995.     #endif
  4996.     #define OnPlayerPickUpPickup ac_OnPlayerPickUpPickup
  4997.     #if defined ac_OnPlayerPickUpPickup
  4998.         forward ac_OnPlayerPickUpPickup(playerid, pickupid);
  4999.     #endif
  5000. #endif
  5001.  
  5002. #if defined _inc_y_hooks || defined _INC_y_hooks
  5003.     hook OnPlayerRequestClass(playerid, classid)
  5004. #else
  5005.     public OnPlayerRequestClass(playerid, classid)
  5006. #endif
  5007. {
  5008.     if(ACInfo[playerid][acKicked]) return 0;
  5009.     if(!IsPlayerNPC(playerid))
  5010.     {
  5011.         new ac_gtc = GetTickCount();
  5012.         if(ACInfo[playerid][acACAllow][49])
  5013.         {
  5014.             if(ac_gtc < ACInfo[playerid][acCall][9] + ac_Mtfc[9][0]) return ac_FloodDetect(playerid, 9);
  5015.             if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5016.             else ACInfo[playerid][acFloodCount][9] = ACInfo[playerid][acFloodCount][27] = 0;
  5017.         }
  5018.         ACInfo[playerid][acLogged] = 1;
  5019.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][9] = ac_gtc;
  5020.         ACInfo[playerid][acSpawnWeapon1] = ac_Class[classid][0][0];
  5021.         ACInfo[playerid][acSpawnAmmo1] = ac_Class[classid][0][1];
  5022.         ACInfo[playerid][acSpawnWeapon2] = ac_Class[classid][1][0];
  5023.         ACInfo[playerid][acSpawnAmmo2] = ac_Class[classid][1][1];
  5024.         ACInfo[playerid][acSpawnWeapon3] = ac_Class[classid][2][0];
  5025.         ACInfo[playerid][acSpawnAmmo3] = ac_Class[classid][2][1];
  5026.     }
  5027.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5028.         && defined ac_OnPlayerRequestClass
  5029.         return ac_OnPlayerRequestClass(playerid, classid);
  5030.     #else
  5031.         return 1;
  5032.     #endif
  5033. }
  5034.  
  5035. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5036.     #if defined _ALS_OnPlayerRequestClass
  5037.         #undef OnPlayerRequestClass
  5038.     #else
  5039.         #define _ALS_OnPlayerRequestClass
  5040.     #endif
  5041.     #define OnPlayerRequestClass ac_OnPlayerRequestClass
  5042.     #if defined ac_OnPlayerRequestClass
  5043.         forward ac_OnPlayerRequestClass(playerid, classid);
  5044.     #endif
  5045. #endif
  5046.  
  5047. #if defined _inc_y_hooks || defined _INC_y_hooks
  5048.     hook OnPlayerSelectedMenuRow(playerid, row)
  5049. #else
  5050.     public OnPlayerSelectedMenuRow(playerid, row)
  5051. #endif
  5052. {
  5053.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked]) return 0;
  5054.     new ac_gtc = GetTickCount();
  5055.     if(ACInfo[playerid][acACAllow][49])
  5056.     {
  5057.         if(ac_gtc < ACInfo[playerid][acCall][10] + ac_Mtfc[10][0]) ac_FloodDetect(playerid, 10);
  5058.         else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5059.         else ACInfo[playerid][acFloodCount][10] = ACInfo[playerid][acFloodCount][27] = 0;
  5060.     }
  5061.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][10] = ac_gtc;
  5062.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5063.         && defined ac_OnPlayerSelectedMenuRow
  5064.         return ac_OnPlayerSelectedMenuRow(playerid, row);
  5065.     #else
  5066.         return 1;
  5067.     #endif
  5068. }
  5069.  
  5070. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5071.     #if defined _ALS_OnPlayerSelectedMenuRow
  5072.         #undef OnPlayerSelectedMenuRow
  5073.     #else
  5074.         #define _ALS_OnPlayerSelectedMenuRow
  5075.     #endif
  5076.     #define OnPlayerSelectedMenuRow ac_OnPlayerSelectedMenuRow
  5077.     #if defined ac_OnPlayerSelectedMenuRow
  5078.         forward ac_OnPlayerSelectedMenuRow(playerid, row);
  5079.     #endif
  5080. #endif
  5081.  
  5082. #if defined _inc_y_hooks || defined _INC_y_hooks
  5083.     hook OnPlayerStateChange(playerid, newstate, oldstate)
  5084. #else
  5085.     public OnPlayerStateChange(playerid, newstate, oldstate)
  5086. #endif
  5087. {
  5088.     if(ACInfo[playerid][acKicked]) return 0;
  5089.     if(!IsPlayerNPC(playerid))
  5090.     {
  5091.         new ac_i = GetTickCount();
  5092.         if(ACInfo[playerid][acACAllow][49])
  5093.         {
  5094.             if(ac_i < ACInfo[playerid][acCall][11] + ac_Mtfc[11][0])
  5095.             {
  5096.                 if(newstate != PLAYER_STATE_ONFOOT || oldstate != PLAYER_STATE_SPAWNED)
  5097.                 {
  5098.                     new ac_model;
  5099.                     if(oldstate == PLAYER_STATE_DRIVER) ac_model = GetVehicleModel(ACInfo[playerid][acVeh]) - 400;
  5100.                     else if(newstate == PLAYER_STATE_DRIVER) ac_model = GetVehicleModel(GetPlayerVehicleID(playerid)) - 400;
  5101.                     if(!(30 <= ac_model <= 195 && ac_vType[ac_model] == 3)) ac_FloodDetect(playerid, 11);
  5102.                 }
  5103.             }
  5104.             else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5105.             else ACInfo[playerid][acFloodCount][11] = ACInfo[playerid][acFloodCount][27] = 0;
  5106.         }
  5107.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][11] = ac_i;
  5108.         switch(oldstate)
  5109.         {
  5110.             case PLAYER_STATE_NONE:
  5111.             {
  5112.                 if(ACInfo[playerid][acACAllow][48] &&
  5113.                 !(PLAYER_STATE_SPAWNED <= newstate <= PLAYER_STATE_SPECTATING) && !ACInfo[playerid][acLogged])
  5114.                 {
  5115.                     #if defined DEBUG
  5116.                         printf("[Nex-AC debug] Newstate: %d", newstate);
  5117.                     #endif
  5118.                     ac_KickWithCode(playerid, "", 0, 48, 2);
  5119.                 }
  5120.             }
  5121.             case PLAYER_STATE_DRIVER:
  5122.             {
  5123.                 new ac_t;
  5124.                 if(ACVehInfo[ACInfo[playerid][acVeh]][acDriver] == playerid) ACVehInfo[ACInfo[playerid][acVeh]][acDriver] = INVALID_PLAYER_ID;
  5125.                 GetPlayerWeaponData(playerid, 4, ac_t, ac_t);
  5126.                 if(ac_t < ACInfo[playerid][acAmmo][4] &&
  5127.                 !(ac_t < 0 <= ACInfo[playerid][acAmmo][4])) ACInfo[playerid][acAmmo][4] = ac_t;
  5128.                 ac_t = GetVehicleModel(ACInfo[playerid][acVeh]) - 400;
  5129.                 if(1 <= ACInfo[playerid][acHealth] < 5 && 48 <= ac_t <= 186 && 4 <= ac_vType[ac_t] <= 5) ACInfo[playerid][acHealth] = 5;
  5130.                 new Float:ac_vX, Float:ac_vY, Float:ac_vZ = ACInfo[playerid][acPosZ];
  5131.                 if(ACInfo[playerid][acACAllow][2] && newstate == PLAYER_STATE_ONFOOT &&
  5132.                 ACInfo[playerid][acSet][8] == -1 && floatcmp(ACInfo[playerid][acPosZ], -95.0) == 1)
  5133.                 {
  5134.                     if(17 <= ac_t <= 193 && 1 <= ac_vType[ac_t] <= 2) GetPlayerPos(playerid, ac_vX, ac_vY, ac_vZ);
  5135.                     if(floatcmp((ac_vX = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ac_vZ)), 30.0) == 1)
  5136.                     {
  5137.                         #if defined DEBUG
  5138.                             printf("[Nex-AC debug] Distance: %f", ac_vX);
  5139.                         #endif
  5140.                         ac_KickWithCode(playerid, "", 0, 2, 4);
  5141.                     }
  5142.                 }
  5143.                 GetPlayerVelocity(playerid, ac_vX, ac_vY, ac_vZ);
  5144.                 ACInfo[playerid][acSpeed] = ac_GetSpeed3D(ac_vX, ac_vY, ac_vZ);
  5145.                 ACInfo[playerid][acGtc][10] = ac_i + 300;
  5146.             }
  5147.             case PLAYER_STATE_PASSENGER:
  5148.             {
  5149.                 new Float:ac_vX, Float:ac_vY, Float:ac_vZ;
  5150.                 if(ACInfo[playerid][acACAllow][2] && newstate == PLAYER_STATE_ONFOOT && ACInfo[playerid][acSet][8] == -1)
  5151.                 {
  5152.                     new ac_driver = ACVehInfo[ACInfo[playerid][acVeh]][acDriver];
  5153.                     if(ac_driver == INVALID_PLAYER_ID || ac_i < ACInfo[ac_driver][acUpdateTime] + 2000)
  5154.                     {
  5155.                         new ac_model = GetVehicleModel(ACInfo[playerid][acVeh]);
  5156.                         ac_vX = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  5157.                         if(!(ac_model == 449 || 537 <= ac_model <= 538 || 569 <= ac_model <= 570) && floatcmp(ac_vX, 30.0) == 1)
  5158.                         {
  5159.                             #if defined DEBUG
  5160.                                 if(ac_driver == INVALID_PLAYER_ID) printf("[Nex-AC debug] Veh model: %d, distance: %f", ac_model, ac_vX);
  5161.                                 else printf("[Nex-AC debug] Veh model: %d, driver AFK time: %d, distance: %f", ac_model, ac_i - ACInfo[ac_driver][acUpdateTime], ac_vX);
  5162.                             #endif
  5163.                             ac_KickWithCode(playerid, "", 0, 2, 5);
  5164.                         }
  5165.                     }
  5166.                 }
  5167.                 GetPlayerVelocity(playerid, ac_vX, ac_vY, ac_vZ);
  5168.                 ACInfo[playerid][acSpeed] = ac_GetSpeed3D(ac_vX, ac_vY, ac_vZ);
  5169.                 ACInfo[playerid][acGtc][10] = ac_i + 300;
  5170.             }
  5171.         }
  5172.         switch(newstate)
  5173.         {
  5174.             case PLAYER_STATE_ONFOOT:
  5175.             {
  5176.                 ACInfo[playerid][acSet][11] = -1;
  5177.                 ACInfo[playerid][acEnterVeh] = 0;
  5178.                 GetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  5179.             }
  5180.             case PLAYER_STATE_DRIVER:
  5181.             {
  5182.                 ACInfo[playerid][acSet][11] = -1;
  5183.                 ac_i = GetPlayerVehicleID(playerid);
  5184.                 if(ACInfo[playerid][acACAllow][44])
  5185.                 {
  5186.                     new ac_seatid = GetPlayerVehicleSeat(playerid);
  5187.                     if(ac_seatid != 128)
  5188.                     {
  5189.                         new ac_model = GetVehicleModel(ac_i) - 400;
  5190.                         if(ac_seatid || ac_model < 0 || ac_MaxPassengers[ac_model >>> 3] >>> ((ac_model & 7) << 2) & 0xF == 15 &&
  5191.                         ACInfo[playerid][acSet][9] == -1)
  5192.                         {
  5193.                             #if defined DEBUG
  5194.                                 printf("[Nex-AC debug] Veh model: %d, seatid: %d", ac_model + 400, ac_seatid);
  5195.                             #endif
  5196.                             ac_KickWithCode(playerid, "", 0, 44, 2);
  5197.                         }
  5198.                     }
  5199.                 }
  5200.                 if(ACInfo[playerid][acSet][9] == -1)
  5201.                 {
  5202.                     ACVehInfo[ac_i][acDriver] = playerid;
  5203.                     if(ACInfo[playerid][acACAllow][4])
  5204.                     {
  5205.                         ac_i = GetVehicleModel(ac_i);
  5206.                         new Float:ac_dist = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  5207.                         if(floatcmp(ac_dist, 25.0) == 1 || ac_i != 577 && ac_i != 592 && floatcmp(ac_dist, 15.0) == 1)
  5208.                         {
  5209.                             #if defined DEBUG
  5210.                                 printf("[Nex-AC debug] Veh model: %d, distance: %f", ac_i, ac_dist);
  5211.                             #endif
  5212.                             ac_KickWithCode(playerid, "", 0, 4, 3);
  5213.                         }
  5214.                     }
  5215.                     GetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  5216.                     ACInfo[playerid][acCheatCount][11] = 0;
  5217.                     ACInfo[playerid][acVehDmgRes] = false;
  5218.                     ACInfo[playerid][acSetVehHealth] = -1.0;
  5219.                 }
  5220.             }
  5221.             case PLAYER_STATE_PASSENGER:
  5222.             {
  5223.                 ACInfo[playerid][acSet][11] = -1;
  5224.                 ACInfo[playerid][acCheatCount][4] = 0;
  5225.                 new ac_seatid, ac_model = GetVehicleModel(GetPlayerVehicleID(playerid)) - 400;
  5226.                 if(ACInfo[playerid][acACAllow][44] && (ac_seatid = GetPlayerVehicleSeat(playerid)) != 128)
  5227.                 {
  5228.                     if(ac_model < 0)
  5229.                     {
  5230.                         #if defined DEBUG
  5231.                             printf("[Nex-AC debug] Veh model: %d, seatid: %d", ac_model + 400, ac_seatid);
  5232.                         #endif
  5233.                         ac_KickWithCode(playerid, "", 0, 44, 3);
  5234.                     }
  5235.                     else
  5236.                     {
  5237.                         new ac_maxseats = (ac_MaxPassengers[ac_model >>> 3] >>> ((ac_model & 7) << 2)) & 0xF;
  5238.                         if(ac_seatid < 1 || (ac_maxseats == 15 || ac_seatid > ac_maxseats) && ACInfo[playerid][acSet][9] == -1)
  5239.                         {
  5240.                             #if defined DEBUG
  5241.                                 printf("[Nex-AC debug] Veh model: %d, max seats: %d, seatid: %d", ac_model + 400, ac_maxseats, ac_seatid);
  5242.                             #endif
  5243.                             ac_KickWithCode(playerid, "", 0, 44, 4);
  5244.                         }
  5245.                     }
  5246.                 }
  5247.                 if(ACInfo[playerid][acACAllow][4] && ACInfo[playerid][acSet][9] == -1 &&
  5248.                 !(ac_model == 49 || 137 <= ac_model <= 138 || 169 <= ac_model <= 170))
  5249.                 {
  5250.                     new Float:ac_dist = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  5251.                     if(floatcmp(ac_dist, 80.0) == 1 || ac_i >= ACInfo[playerid][acUpdateTime] + 1500 && floatcmp(ac_dist, 15.0) == 1)
  5252.                     {
  5253.                         #if defined DEBUG
  5254.                             printf("[Nex-AC debug] Veh model: %d, AFK time: %d, distance: %f", ac_model + 400, ac_i - ACInfo[playerid][acUpdateTime], ac_dist);
  5255.                         #endif
  5256.                         ac_KickWithCode(playerid, "", 0, 4, 4);
  5257.                     }
  5258.                 }
  5259.             }
  5260.             case PLAYER_STATE_SPAWNED: GetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  5261.             case PLAYER_STATE_SPECTATING:
  5262.             {
  5263.                 if(ACInfo[playerid][acACAllow][21] && !ACInfo[playerid][acSpec] &&
  5264.                 ACInfo[playerid][acSet][6] == -1) ac_KickWithCode(playerid, "", 0, 21);
  5265.                 ACInfo[playerid][acHealth] = 100;
  5266.                 ACInfo[playerid][acSet][6] = -1;
  5267.                 ACInfo[playerid][acSpec] = true;
  5268.             }
  5269.         }
  5270.     }
  5271.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5272.         && defined ac_OnPlayerStateChange
  5273.         return ac_OnPlayerStateChange(playerid, newstate, oldstate);
  5274.     #else
  5275.         return 1;
  5276.     #endif
  5277. }
  5278.  
  5279. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5280.     #if defined _ALS_OnPlayerStateChange
  5281.         #undef OnPlayerStateChange
  5282.     #else
  5283.         #define _ALS_OnPlayerStateChange
  5284.     #endif
  5285.     #define OnPlayerStateChange ac_OnPlayerStateChange
  5286.     #if defined ac_OnPlayerStateChange
  5287.         forward ac_OnPlayerStateChange(playerid, newstate, oldstate);
  5288.     #endif
  5289. #endif
  5290.  
  5291. #if defined _inc_y_hooks || defined _INC_y_hooks
  5292.     hook OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  5293. #else
  5294.     public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  5295. #endif
  5296. {
  5297.     if(ACInfo[playerid][acKicked]) return 0;
  5298.     if(ACInfo[playerid][acACAllow][22] && !ac_LagCompMode) return ac_KickWithCode(playerid, "", 0, 22);
  5299.     if(ACInfo[playerid][acACAllow][47] &&
  5300.     (!(BULLET_HIT_TYPE_NONE <= hittype <= BULLET_HIT_TYPE_PLAYER_OBJECT) ||
  5301.     hittype == BULLET_HIT_TYPE_PLAYER && !(0 <= hitid < MAX_PLAYERS) ||
  5302.     hittype == BULLET_HIT_TYPE_VEHICLE && !(1 <= hitid < MAX_VEHICLES) ||
  5303.     hittype == BULLET_HIT_TYPE_OBJECT && !(1 <= hitid < MAX_OBJECTS) ||
  5304.     hittype == BULLET_HIT_TYPE_PLAYER_OBJECT && !(1 <= hitid < MAX_OBJECTS) ||
  5305.     weaponid != 38 && !(22 <= weaponid <= 34)))
  5306.     {
  5307.         #if defined DEBUG
  5308.             printf("[Nex-AC debug] Hittype: %d, hitid: %d, weaponid: %d", hittype, hitid, weaponid);
  5309.         #endif
  5310.         return ac_KickWithCode(playerid, "", 0, 47, 1);
  5311.     }
  5312.     new Float:ac_oX, Float:ac_oY, Float:ac_oZ, Float:ac_X, Float:ac_Y, Float:ac_Z;
  5313.     GetPlayerLastShotVectors(playerid, ac_oX, ac_oY, ac_oZ, ac_X, ac_Y, ac_Z);
  5314.     if(ACInfo[playerid][acACAllow][34])
  5315.     {
  5316.         if(!IsPlayerInRangeOfPoint(playerid, 8.0, ac_oX, ac_oY, ac_oZ))
  5317.         {
  5318.             if(++ACInfo[playerid][acCheatCount][5] > AC_MAX_AFK_GHOST_WARNINGS)
  5319.             {
  5320.                 #undef AC_MAX_AFK_GHOST_WARNINGS
  5321.                 #if defined DEBUG
  5322.                     printf("[Nex-AC debug] Distance: %f", GetPlayerDistanceFromPoint(playerid, ac_oX, ac_oY, ac_oZ));
  5323.                 #endif
  5324.                 #if defined OnCheatDetected
  5325.                     ac_KickWithCode(playerid, "", 0, 34);
  5326.                     ACInfo[playerid][acCheatCount][5] = 0;
  5327.                 #else
  5328.                     return ac_KickWithCode(playerid, "", 0, 34);
  5329.                 #endif
  5330.             }
  5331.         }
  5332.         else ACInfo[playerid][acCheatCount][5] = 0;
  5333.     }
  5334.     new ac_gtc = GetTickCount(), ac_gpp = GetPlayerPing(playerid);
  5335.     if(ACInfo[playerid][acACAllow][29])
  5336.     {
  5337.         if(hittype > BULLET_HIT_TYPE_NONE && !fX && !fY && !fZ)
  5338.         {
  5339.             if(++ACInfo[playerid][acCheatCount][13] > AC_MAX_SILENT_AIM_WARNINGS)
  5340.             {
  5341.                 #undef AC_MAX_SILENT_AIM_WARNINGS
  5342.                 #if defined DEBUG
  5343.                     printf("[Nex-AC debug] Hittype: %d, weaponid: %d", hittype, weaponid);
  5344.                 #endif
  5345.                 #if defined OnCheatDetected
  5346.                     ac_KickWithCode(playerid, "", 0, 29, 1);
  5347.                     ACInfo[playerid][acCheatCount][13] = 0;
  5348.                 #else
  5349.                     return ac_KickWithCode(playerid, "", 0, 29, 1);
  5350.                 #endif
  5351.             }
  5352.         }
  5353.         else
  5354.         {
  5355.             ACInfo[playerid][acCheatCount][13] = 0;
  5356.             if(hittype == BULLET_HIT_TYPE_PLAYER && hitid != INVALID_PLAYER_ID &&
  5357.             !ACInfo[hitid][acDead] && ac_gtc > ACInfo[hitid][acSpawnTime] + ac_gpp &&
  5358.             ac_gtc < ACInfo[hitid][acUpdateTime] + 1500 && !IsPlayerInAnyVehicle(hitid) &&
  5359.             GetPlayerSurfingVehicleID(hitid) == INVALID_VEHICLE_ID && GetPlayerSurfingObjectID(hitid) == INVALID_OBJECT_ID)
  5360.             {
  5361.                 if(!IsPlayerInRangeOfPoint(hitid, 8.0, ac_X, ac_Y, ac_Z))
  5362.                 {
  5363.                     if(++ACInfo[playerid][acCheatCount][6] > AC_MAX_PRO_AIM_WARNINGS)
  5364.                     {
  5365.                         #undef AC_MAX_PRO_AIM_WARNINGS
  5366.                         #if defined DEBUG
  5367.                             printf("[Nex-AC debug] Distance: %f", GetPlayerDistanceFromPoint(hitid, ac_X, ac_Y, ac_Z));
  5368.                         #endif
  5369.                         #if defined OnCheatDetected
  5370.                             ac_KickWithCode(playerid, "", 0, 29, 2);
  5371.                             ACInfo[playerid][acCheatCount][6] = 0;
  5372.                         #else
  5373.                             return ac_KickWithCode(playerid, "", 0, 29, 2);
  5374.                         #endif
  5375.                     }
  5376.                 }
  5377.                 else ACInfo[playerid][acCheatCount][6] = 0;
  5378.             }
  5379.         }
  5380.     }
  5381.     new ac_i, ac_t, bool:ac_ur, bool:ac_ur2;
  5382.     switch(hittype)
  5383.     {
  5384.         case BULLET_HIT_TYPE_PLAYER:
  5385.         {
  5386.             if(hitid != INVALID_PLAYER_ID && ACInfo[hitid][acACAllow][19] &&
  5387.             ACInfo[hitid][acUnFrozen] && !ACInfo[hitid][acDead] && ac_gtc > ACInfo[hitid][acSpawnTime] + ac_gpp &&
  5388.             IsPlayerInRangeOfPoint(hitid, ac_wRange[weaponid - 22], ac_oX, ac_oY, ac_oZ) &&
  5389.             !(SPECIAL_ACTION_ENTER_VEHICLE <= GetPlayerSpecialAction(hitid) <= SPECIAL_ACTION_EXIT_VEHICLE))
  5390.             {
  5391.                 ac_t = GetPlayerTeam(playerid);
  5392.                 if(ac_t == 0 || ac_t == NO_TEAM || ac_t != GetPlayerTeam(hitid))
  5393.                 {
  5394.                     ac_i = GetPlayerInterior(hitid);
  5395.                     #if AC_USE_RESTAURANTS
  5396.                         if(!ac_InRestaurant(hitid, ac_i))
  5397.                         {
  5398.                     #endif
  5399.                         #if AC_USE_AMMUNATIONS
  5400.                             if(!ac_InAmmuNation(hitid, ac_i))
  5401.                             {
  5402.                         #endif
  5403.                             #if AC_USE_CASINOS
  5404.                                 if(!ac_InCasino(hitid, ac_i))
  5405.                                 {
  5406.                             #endif
  5407.                                 ac_ur = true;
  5408.                             #if AC_USE_CASINOS
  5409.                                 }
  5410.                             #endif
  5411.                         #if AC_USE_AMMUNATIONS
  5412.                             }
  5413.                         #endif
  5414.                     #if AC_USE_RESTAURANTS
  5415.                         }
  5416.                     #endif
  5417.                 }
  5418.             }
  5419.         }
  5420.         case BULLET_HIT_TYPE_VEHICLE:
  5421.         {
  5422.             if(hitid != INVALID_VEHICLE_ID)
  5423.             {
  5424.                 ac_i = ACVehInfo[hitid][acDriver];
  5425.                 if(ac_i != INVALID_PLAYER_ID && ACInfo[ac_i][acACAllow][20] &&
  5426.                 ACInfo[ac_i][acUnFrozen] && ac_gtc > ACInfo[ac_i][acSpawnTime] + ac_gpp &&
  5427.                 floatcmp(ACVehInfo[hitid][acHealth], 250.0) >= 0)
  5428.                 {
  5429.                     ac_t = GetPlayerTeam(playerid);
  5430.                     if(!ac_VehFriendlyFire || ac_t == 0 || ac_t == NO_TEAM || ac_t != GetPlayerTeam(ac_i))
  5431.                     {
  5432.                         ac_t = GetVehicleModel(hitid);
  5433.                         new Float:ac_wX, Float:ac_wY, Float:ac_wZ;
  5434.                         GetVehicleModelInfo(ac_t, VEHICLE_MODEL_INFO_WHEELSFRONT, ac_X, ac_Y, ac_Z);
  5435.                         GetVehicleModelInfo(ac_t, VEHICLE_MODEL_INFO_WHEELSREAR, ac_oX, ac_oY, ac_oZ);
  5436.                         GetVehicleModelInfo(ac_t, VEHICLE_MODEL_INFO_WHEELSMID, ac_wX, ac_wY, ac_wZ);
  5437.                         if(floatcmp(VectorSize(floatsub(ac_X, fX), floatsub(ac_Y, fY), floatsub(ac_Z, fZ)), 1.2) == 1 &&
  5438.                         floatcmp(VectorSize(floatsub(-ac_X, fX), floatsub(ac_Y, fY), floatsub(ac_Z, fZ)), 1.2) == 1 &&
  5439.                         floatcmp(VectorSize(floatsub(ac_oX, fX), floatsub(ac_oY, fY), floatsub(ac_oZ, fZ)), 1.2) == 1 &&
  5440.                         floatcmp(VectorSize(floatsub(-ac_oX, fX), floatsub(ac_oY, fY), floatsub(ac_oZ, fZ)), 1.2) == 1 &&
  5441.                         (!ac_wX && !ac_wY && !ac_wZ || floatcmp(VectorSize(floatsub(ac_wX, fX), floatsub(ac_wY, fY), floatsub(ac_wZ, fZ)), 1.2) == 1 &&
  5442.                         floatcmp(VectorSize(floatsub(-ac_wX, fX), floatsub(ac_wY, fY), floatsub(ac_wZ, fZ)), 1.2) == 1)) ac_ur2 = true;
  5443.                     }
  5444.                 }
  5445.             }
  5446.         }
  5447.     }
  5448.     if((ac_t = GetPlayerState(playerid)) != PLAYER_STATE_DRIVER)
  5449.     {
  5450.         new ac_s = GetPlayerWeapon(playerid);
  5451.         if(ACInfo[playerid][acACAllow][47] && ac_t != PLAYER_STATE_PASSENGER && ac_s != weaponid)
  5452.         {
  5453.             #if defined DEBUG
  5454.                 printf("[Nex-AC debug] Armed weapon: %d, weaponid: %d, state: %d", ac_s, weaponid, ac_t);
  5455.             #endif
  5456.             return ac_KickWithCode(playerid, "", 0, 47, 2);
  5457.         }
  5458.         ac_s = ac_wSlot[weaponid];
  5459.         if(ACInfo[playerid][acACAllow][26])
  5460.         {
  5461.             ac_i = ac_gtc - ACInfo[playerid][acShotTime];
  5462.             if(ACInfo[playerid][acLastShot] == weaponid)
  5463.             {
  5464.                 if(weaponid != 38 && ac_t != PLAYER_STATE_PASSENGER)
  5465.                 {
  5466.                     if(ac_gtc < ACInfo[playerid][acReloadTime] + 500)
  5467.                     {
  5468.                         #if defined DEBUG
  5469.                             printf("[Nex-AC debug] Weaponid: %d, Reload time: %d, state: %d",
  5470.                             weaponid, ac_gtc - ACInfo[playerid][acReloadTime], ac_t);
  5471.                         #endif
  5472.                         #if defined OnCheatDetected
  5473.                             ac_KickWithCode(playerid, "", 0, 26, 4);
  5474.                             ACInfo[playerid][acReloadTime] = 0;
  5475.                         #else
  5476.                             return ac_KickWithCode(playerid, "", 0, 26, 4);
  5477.                         #endif
  5478.                     }
  5479.                     else if(ac_i < 30 || ac_i < 50 && weaponid != 32 &&
  5480.                     !(28 <= weaponid <= 29) || ac_i <= 385 && 33 <= weaponid <= 34)
  5481.                     {
  5482.                         if(++ACInfo[playerid][acCheatCount][8] > AC_MAX_RAPID_FIRE_WARNINGS)
  5483.                         {
  5484.                             #if defined DEBUG
  5485.                                 printf("[Nex-AC debug] Fire rate: %d, weaponid: %d", ac_i, weaponid);
  5486.                             #endif
  5487.                             #if defined OnCheatDetected
  5488.                                 ac_KickWithCode(playerid, "", 0, 26, 1);
  5489.                                 ACInfo[playerid][acCheatCount][8] = 0;
  5490.                             #else
  5491.                                 return ac_KickWithCode(playerid, "", 0, 26, 1);
  5492.                             #endif
  5493.                         }
  5494.                     }
  5495.                     else ACInfo[playerid][acCheatCount][8] = 0;
  5496.                     if((weaponid == 24 && ac_i < 600 || weaponid == 25 && ac_i < 800) &&
  5497.                     ++ACInfo[playerid][acCheatCount][14] > AC_MAX_RAPID_FIRE_WARNINGS)
  5498.                     {
  5499.                         #undef AC_MAX_RAPID_FIRE_WARNINGS
  5500.                         #if defined DEBUG
  5501.                             printf("[Nex-AC debug] Fire rate: %d, weaponid: %d", ac_i, weaponid);
  5502.                         #endif
  5503.                         #if defined OnCheatDetected
  5504.                             ac_KickWithCode(playerid, "", 0, 26, 2);
  5505.                             ACInfo[playerid][acCheatCount][14] = 0;
  5506.                         #else
  5507.                             return ac_KickWithCode(playerid, "", 0, 26, 2);
  5508.                         #endif
  5509.                     }
  5510.                 }
  5511.             }
  5512.             else if(ac_i < 30)
  5513.             {
  5514.                 #if defined DEBUG
  5515.                     printf("[Nex-AC debug] Fire rate: %d, weaponid: %d, last weapon: %d",
  5516.                     ac_i, weaponid, ACInfo[playerid][acLastShot]);
  5517.                 #endif
  5518.                 #if defined OnCheatDetected
  5519.                     ac_KickWithCode(playerid, "", 0, 26, 3);
  5520.                 #else
  5521.                     return ac_KickWithCode(playerid, "", 0, 26, 3);
  5522.                 #endif
  5523.             }
  5524.             if(GetPlayerWeaponState(playerid) == WEAPONSTATE_LAST_BULLET) ACInfo[playerid][acReloadTime] = ac_gtc;
  5525.         }
  5526.         if(ACInfo[playerid][acACAllow][17] && ac_t != PLAYER_STATE_PASSENGER && ACInfo[playerid][acGiveAmmo][ac_s] == -65535)
  5527.         {
  5528.             ac_t = GetPlayerAmmo(playerid);
  5529.             if(ACInfo[playerid][acAmmo][ac_s] == 0)
  5530.             {
  5531.                 if(ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp)
  5532.                 {
  5533.                     #if defined DEBUG
  5534.                         printf("[Nex-AC debug] Weaponid: %d, AC ammo: %d, ammo: %d",
  5535.                         weaponid, ACInfo[playerid][acAmmo][ac_s], ac_t);
  5536.                     #endif
  5537.                     #if defined OnCheatDetected
  5538.                         ac_KickWithCode(playerid, "", 0, 17, 1);
  5539.                         ACInfo[playerid][acAmmo][ac_s] = ac_t;
  5540.                     #else
  5541.                         return ac_KickWithCode(playerid, "", 0, 17, 1);
  5542.                     #endif
  5543.                 }
  5544.             }
  5545.             if((ac_i = ac_abs(ACInfo[playerid][acAmmo][ac_s] - ac_t)))
  5546.             {
  5547.                 switch(weaponid)
  5548.                 {
  5549.                     case 23, 24, 25, 27:
  5550.                     {
  5551.                         if(ac_i > 2)
  5552.                         {
  5553.                             #if defined DEBUG
  5554.                                 printf("[Nex-AC debug] Weaponid: %d, AC ammo: %d, ammo: %d",
  5555.                                 weaponid, ACInfo[playerid][acAmmo][ac_s], ac_t);
  5556.                             #endif
  5557.                             #if defined OnCheatDetected
  5558.                                 ac_KickWithCode(playerid, "", 0, 17, 2);
  5559.                                 ACInfo[playerid][acCheatCount][7] = 0;
  5560.                                 ACInfo[playerid][acAmmo][ac_s] = ac_t;
  5561.                             #else
  5562.                                 return ac_KickWithCode(playerid, "", 0, 17, 2);
  5563.                             #endif
  5564.                         }
  5565.                     }
  5566.                     case 38:
  5567.                     {
  5568.                         if(ACInfo[playerid][acAmmo][ac_s] < ac_t && ++ACInfo[playerid][acCheatCount][7] > 8)
  5569.                         {
  5570.                             #if defined DEBUG
  5571.                                 printf("[Nex-AC debug] Weaponid: %d, AC ammo: %d, ammo: %d, acCheatCount[7]: %d",
  5572.                                 weaponid, ACInfo[playerid][acAmmo][ac_s], ac_t, ACInfo[playerid][acCheatCount][7]);
  5573.                             #endif
  5574.                             #if defined OnCheatDetected
  5575.                                 ac_KickWithCode(playerid, "", 0, 17, 3);
  5576.                                 ACInfo[playerid][acCheatCount][7] = 0;
  5577.                                 ACInfo[playerid][acAmmo][ac_s] = ac_t;
  5578.                             #else
  5579.                                 return ac_KickWithCode(playerid, "", 0, 17, 3);
  5580.                             #endif
  5581.                         }
  5582.                     }
  5583.                     default:
  5584.                     {
  5585.                         if(ac_i > 3 && ACInfo[playerid][acAmmo][ac_s] < ac_t)
  5586.                         {
  5587.                             #if defined DEBUG
  5588.                                 printf("[Nex-AC debug] Weaponid: %d, AC ammo: %d, ammo: %d",
  5589.                                 weaponid, ACInfo[playerid][acAmmo][ac_s], ac_t);
  5590.                             #endif
  5591.                             #if defined OnCheatDetected
  5592.                                 ac_KickWithCode(playerid, "", 0, 17, 4);
  5593.                                 ACInfo[playerid][acCheatCount][7] = 0;
  5594.                                 ACInfo[playerid][acAmmo][ac_s] = ac_t;
  5595.                             #else
  5596.                                 return ac_KickWithCode(playerid, "", 0, 17, 4);
  5597.                             #endif
  5598.                         }
  5599.                     }
  5600.                 }
  5601.             }
  5602.             else ACInfo[playerid][acCheatCount][7] = 0;
  5603.         }
  5604.         if(ACInfo[playerid][acAmmo][ac_s] != 0)
  5605.         {
  5606.             ACInfo[playerid][acAmmo][ac_s]--;
  5607.             if(ACInfo[playerid][acAmmo][ac_s] == 0 &&
  5608.             ACInfo[playerid][acSet][3] == weaponid) ACInfo[playerid][acSet][3] = ACInfo[playerid][acSetWeapon][ac_s] = -1;
  5609.         }
  5610.         if(ACInfo[playerid][acAmmo][ac_s] < -32768) ACInfo[playerid][acAmmo][ac_s] += 65536;
  5611.     }
  5612.     ACInfo[playerid][acLastShot] = weaponid;
  5613.     ACInfo[playerid][acShotTime] = ac_gtc;
  5614.     ac_i = 1;
  5615.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5616.         && defined ac_OnPlayerWeaponShot
  5617.         ac_i = ac_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, fX, fY, fZ);
  5618.     #endif
  5619.     if(ac_i)
  5620.     {
  5621.         if(ac_ur)
  5622.         {
  5623.             if(ACInfo[hitid][acArmour] > 0) ACInfo[hitid][acDmgRes] = 2;
  5624.             else ACInfo[hitid][acDmgRes] = 1;
  5625.             ACInfo[hitid][acGtc][14] = ac_gtc + 150;
  5626.         }
  5627.         if(ac_ur2)
  5628.         {
  5629.             ACInfo[ACVehInfo[hitid][acDriver]][acVehDmgRes] = true;
  5630.             ACInfo[ACVehInfo[hitid][acDriver]][acGtc][16] = ac_gtc + 150;
  5631.         }
  5632.     }
  5633.     return ac_i;
  5634. }
  5635.  
  5636. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5637.     #if defined _ALS_OnPlayerWeaponShot
  5638.         #undef OnPlayerWeaponShot
  5639.     #else
  5640.         #define _ALS_OnPlayerWeaponShot
  5641.     #endif
  5642.     #define OnPlayerWeaponShot ac_OnPlayerWeaponShot
  5643.     #if defined ac_OnPlayerWeaponShot
  5644.         forward ac_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);
  5645.     #endif
  5646. #endif
  5647.  
  5648. #if defined _inc_y_hooks || defined _INC_y_hooks
  5649.     hook OnVehicleMod(playerid, vehicleid, componentid)
  5650. #else
  5651.     public OnVehicleMod(playerid, vehicleid, componentid)
  5652. #endif
  5653. {
  5654.     if(ACInfo[playerid][acKicked]) return 0;
  5655.     new ac_i = GetTickCount();
  5656.     if(ACInfo[playerid][acACAllow][49])
  5657.     {
  5658.         if(ac_i < ACInfo[playerid][acCall][12] + ac_Mtfc[12][0]) return ac_FloodDetect(playerid, 12);
  5659.         if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5660.         else ACInfo[playerid][acFloodCount][12] = ACInfo[playerid][acFloodCount][27] = 0;
  5661.     }
  5662.     if(ACInfo[playerid][acACAllow][23] && !ACInfo[playerid][acModShop])
  5663.     {
  5664.         #if defined OnCheatDetected
  5665.             ac_KickWithCode(playerid, "", 0, 23, 2);
  5666.         #else
  5667.             return ac_KickWithCode(playerid, "", 0, 23, 2);
  5668.         #endif
  5669.     }
  5670.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][12] = ac_i;
  5671.     ACInfo[playerid][acGtc][17] = ac_i + 1650;
  5672.     if(ACInfo[playerid][acACAllow][43] && !ac_IsCompatible((ac_i = GetVehicleModel(vehicleid)), componentid))
  5673.     {
  5674.         #if defined DEBUG
  5675.             printf("[Nex-AC debug] Veh model: %d, componentid: %d", ac_i, componentid);
  5676.         #endif
  5677.         return ac_KickWithCode(playerid, "", 0, 43, 1);
  5678.     }
  5679.     #if AC_USE_TUNING_GARAGES
  5680.         ac_i = componentid - 1000;
  5681.         if(ACInfo[playerid][acSet][12] != -1) ACInfo[playerid][acSet][12] += ac_cPrice[ac_i];
  5682.         else ACInfo[playerid][acSet][12] = ac_cPrice[ac_i];
  5683.         ACInfo[playerid][acCheatCount][12] = 0;
  5684.     #endif
  5685.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5686.         && defined ac_OnVehicleMod
  5687.         return ac_OnVehicleMod(playerid, vehicleid, componentid);
  5688.     #else
  5689.         return 1;
  5690.     #endif
  5691. }
  5692.  
  5693. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5694.     #if defined _ALS_OnVehicleMod
  5695.         #undef OnVehicleMod
  5696.     #else
  5697.         #define _ALS_OnVehicleMod
  5698.     #endif
  5699.     #define OnVehicleMod ac_OnVehicleMod
  5700.     #if defined ac_OnVehicleMod
  5701.         forward ac_OnVehicleMod(playerid, vehicleid, componentid);
  5702.     #endif
  5703. #endif
  5704.  
  5705. #if defined _inc_y_hooks || defined _INC_y_hooks
  5706.     hook OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  5707. #else
  5708.     public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  5709. #endif
  5710. {
  5711.     if(ACInfo[playerid][acKicked]) return 0;
  5712.     new ac_gtc = GetTickCount();
  5713.     if(ACInfo[playerid][acACAllow][49])
  5714.     {
  5715.         if(ac_gtc < ACInfo[playerid][acCall][13] + ac_Mtfc[13][0]) ac_FloodDetect(playerid, 13);
  5716.         else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5717.         else ACInfo[playerid][acFloodCount][13] = ACInfo[playerid][acFloodCount][27] = 0;
  5718.     }
  5719.     if(ACInfo[playerid][acACAllow][43] && !(0 <= paintjobid <= 2) && paintjobid != 255)
  5720.     {
  5721.         #if defined DEBUG
  5722.             printf("[Nex-AC debug] Veh model: %d, paintjobid: %d", GetVehicleModel(vehicleid), paintjobid);
  5723.         #endif
  5724.         ac_KickWithCode(playerid, "", 0, 43, 2);
  5725.     }
  5726.     else if(ACInfo[playerid][acACAllow][23] && !ACInfo[playerid][acModShop]) ac_KickWithCode(playerid, "", 0, 23, 4);
  5727.     else if(paintjobid == 255) ACVehInfo[vehicleid][acPaintJob] = 3;
  5728.     else ACVehInfo[vehicleid][acPaintJob] = paintjobid;
  5729.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][13] = ac_gtc;
  5730.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5731.         && defined ac_OnVehiclePaintjob
  5732.         return ac_OnVehiclePaintjob(playerid, vehicleid, paintjobid);
  5733.     #else
  5734.         return 1;
  5735.     #endif
  5736. }
  5737.  
  5738. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5739.     #if defined _ALS_OnVehiclePaintjob
  5740.         #undef OnVehiclePaintjob
  5741.     #else
  5742.         #define _ALS_OnVehiclePaintjob
  5743.     #endif
  5744.     #define OnVehiclePaintjob ac_OnVehiclePaintjob
  5745.     #if defined ac_OnVehiclePaintjob
  5746.         forward ac_OnVehiclePaintjob(playerid, vehicleid, paintjobid);
  5747.     #endif
  5748. #endif
  5749.  
  5750. #if defined _inc_y_hooks || defined _INC_y_hooks
  5751.     hook OnVehicleRespray(playerid, vehicleid, color1, color2)
  5752. #else
  5753.     public OnVehicleRespray(playerid, vehicleid, color1, color2)
  5754. #endif
  5755. {
  5756.     if(ACInfo[playerid][acKicked]) return 0;
  5757.     new ac_gtc = GetTickCount();
  5758.     if(ACInfo[playerid][acACAllow][49])
  5759.     {
  5760.         if(ac_gtc < ACInfo[playerid][acCall][14] + ac_Mtfc[14][0]) return ac_FloodDetect(playerid, 14);
  5761.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5762.         else ACInfo[playerid][acFloodCount][14] = ACInfo[playerid][acFloodCount][27] = 0;
  5763.     }
  5764.     #if !AC_USE_TUNING_GARAGES && !AC_USE_PAYNSPRAY
  5765.         if(ACInfo[playerid][acACAllow][23])
  5766.         {
  5767.             #if defined DEBUG
  5768.                 printf("[Nex-AC debug] Veh model: %d, color1: %d, color2: %d", GetVehicleModel(vehicleid), color1, color2);
  5769.             #endif
  5770.             #if defined OnCheatDetected
  5771.                 ac_KickWithCode(playerid, "", 0, 23, 5);
  5772.             #else
  5773.                 return ac_KickWithCode(playerid, "", 0, 23, 5);
  5774.             #endif
  5775.         }
  5776.     #endif
  5777.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][14] = ac_gtc;
  5778.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5779.         && defined ac_OnVehicleRespray
  5780.         return ac_OnVehicleRespray(playerid, vehicleid, color1, color2);
  5781.     #else
  5782.         return 1;
  5783.     #endif
  5784. }
  5785.  
  5786. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5787.     #if defined _ALS_OnVehicleRespray
  5788.         #undef OnVehicleRespray
  5789.     #else
  5790.         #define _ALS_OnVehicleRespray
  5791.     #endif
  5792.     #define OnVehicleRespray ac_OnVehicleRespray
  5793.     #if defined ac_OnVehicleRespray
  5794.         forward ac_OnVehicleRespray(playerid, vehicleid, color1, color2);
  5795.     #endif
  5796. #endif
  5797.  
  5798. #if defined _inc_y_hooks || defined _INC_y_hooks
  5799.     hook OnVehicleSpawn(vehicleid)
  5800. #else
  5801.     public OnVehicleSpawn(vehicleid)
  5802. #endif
  5803. {
  5804.     ACVehInfo[vehicleid][acPaintJob] = 3;
  5805.     ACVehInfo[vehicleid][acSpawned] = true;
  5806.     ACVehInfo[vehicleid][acHealth] = 1000.0;
  5807.     ACVehInfo[vehicleid][acSpeedDiff] = 0;
  5808.     ACVehInfo[vehicleid][acPosDiff] =
  5809.     ACVehInfo[vehicleid][acVelX] =
  5810.     ACVehInfo[vehicleid][acVelY] =
  5811.     ACVehInfo[vehicleid][acVelZ] = 0.0;
  5812.     ACVehInfo[vehicleid][acDriver] = INVALID_PLAYER_ID;
  5813.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5814.         && defined ac_OnVehicleSpawn
  5815.         return ac_OnVehicleSpawn(vehicleid);
  5816.     #else
  5817.         return 1;
  5818.     #endif
  5819. }
  5820.  
  5821. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5822.     #if defined _ALS_OnVehicleSpawn
  5823.         #undef OnVehicleSpawn
  5824.     #else
  5825.         #define _ALS_OnVehicleSpawn
  5826.     #endif
  5827.     #define OnVehicleSpawn ac_OnVehicleSpawn
  5828.     #if defined ac_OnVehicleSpawn
  5829.         forward ac_OnVehicleSpawn(vehicleid);
  5830.     #endif
  5831. #endif
  5832.  
  5833. #if defined _inc_y_hooks || defined _INC_y_hooks
  5834.     hook OnVehicleDeath(vehicleid, killerid)
  5835. #else
  5836.     public OnVehicleDeath(vehicleid, killerid)
  5837. #endif
  5838. {
  5839.     if(killerid != INVALID_PLAYER_ID && !IsPlayerNPC(killerid))
  5840.     {
  5841.         new ac_gtc = GetTickCount();
  5842.         if(ACInfo[killerid][acACAllow][49])
  5843.         {
  5844.             if(ac_gtc < ACInfo[killerid][acCall][15] + ac_Mtfc[15][0]) ac_FloodDetect(killerid, 15);
  5845.             else if(ac_gtc < ACInfo[killerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(killerid, 27);
  5846.             else ACInfo[killerid][acFloodCount][15] = ACInfo[killerid][acFloodCount][27] = 0;
  5847.         }
  5848.         ACInfo[killerid][acCall][27] = ACInfo[killerid][acCall][15] = ac_gtc;
  5849.     }
  5850.     new Float:ac_vHealth;
  5851.     GetVehicleHealth(vehicleid, ac_vHealth);
  5852.     if(floatcmp(ac_vHealth, 250.0) == -1) ACVehInfo[vehicleid][acSpawned] = false;
  5853.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5854.         && defined ac_OnVehicleDeath
  5855.         return ac_OnVehicleDeath(vehicleid, killerid);
  5856.     #else
  5857.         return 1;
  5858.     #endif
  5859. }
  5860.  
  5861. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5862.     #if defined _ALS_OnVehicleDeath
  5863.         #undef OnVehicleDeath
  5864.     #else
  5865.         #define _ALS_OnVehicleDeath
  5866.     #endif
  5867.     #define OnVehicleDeath ac_OnVehicleDeath
  5868.     #if defined ac_OnVehicleDeath
  5869.         forward ac_OnVehicleDeath(vehicleid, killerid);
  5870.     #endif
  5871. #endif
  5872.  
  5873. #if defined _inc_y_hooks || defined _INC_y_hooks
  5874.     hook OnPlayerText(playerid, text[])
  5875. #else
  5876.     public OnPlayerText(playerid, text[])
  5877. #endif
  5878. {
  5879.     if(ACInfo[playerid][acKicked]) return 0;
  5880.     if(!IsPlayerNPC(playerid))
  5881.     {
  5882.         new ac_gtc = GetTickCount();
  5883.         if(ACInfo[playerid][acACAllow][49])
  5884.         {
  5885.             if(ac_gtc < ACInfo[playerid][acCall][16] + ac_Mtfc[16][0]) return ac_FloodDetect(playerid, 16);
  5886.             if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5887.             else ACInfo[playerid][acFloodCount][16] = ACInfo[playerid][acFloodCount][27] = 0;
  5888.         }
  5889.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][16] = ac_gtc;
  5890.     }
  5891.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5892.         && defined ac_OnPlayerText
  5893.         return ac_OnPlayerText(playerid, text);
  5894.     #else
  5895.         return 1;
  5896.     #endif
  5897. }
  5898.  
  5899. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5900.     #if defined _ALS_OnPlayerText
  5901.         #undef OnPlayerText
  5902.     #else
  5903.         #define _ALS_OnPlayerText
  5904.     #endif
  5905.     #define OnPlayerText ac_OnPlayerText
  5906.     #if defined ac_OnPlayerText
  5907.         forward ac_OnPlayerText(playerid, text[]);
  5908.     #endif
  5909. #endif
  5910.  
  5911. #if defined _inc_y_hooks || defined _INC_y_hooks
  5912.     hook OnPlayerEnterCheckpoint(playerid)
  5913. #else
  5914.     public OnPlayerEnterCheckpoint(playerid)
  5915. #endif
  5916. {
  5917.     if(ACInfo[playerid][acKicked]) return 0;
  5918.     if(!IsPlayerNPC(playerid))
  5919.     {
  5920.         new ac_gtc = GetTickCount();
  5921.         if(ACInfo[playerid][acACAllow][49])
  5922.         {
  5923.             if(ac_gtc < ACInfo[playerid][acCall][17] + ac_Mtfc[17][0]) ac_FloodDetect(playerid, 17);
  5924.             else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5925.             else ACInfo[playerid][acFloodCount][17] = ACInfo[playerid][acFloodCount][27] = 0;
  5926.         }
  5927.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][17] = ac_gtc;
  5928.     }
  5929.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5930.         && defined ac_OnPlayerEnterCheckpoint
  5931.         return ac_OnPlayerEnterCheckpoint(playerid);
  5932.     #else
  5933.         return 1;
  5934.     #endif
  5935. }
  5936.  
  5937. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5938.     #if defined _ALS_OnPlayerEnterCheckpoint
  5939.         #undef OnPlayerEnterCheckpoint
  5940.     #else
  5941.         #define _ALS_OnPlayerEnterCheckpoint
  5942.     #endif
  5943.     #define OnPlayerEnterCheckpoint ac_OnPlayerEnterCheckpoint
  5944.     #if defined ac_OnPlayerEnterCheckpoint
  5945.         forward ac_OnPlayerEnterCheckpoint(playerid);
  5946.     #endif
  5947. #endif
  5948.  
  5949. #if defined _inc_y_hooks || defined _INC_y_hooks
  5950.     hook OnPlayerLeaveCheckpoint(playerid)
  5951. #else
  5952.     public OnPlayerLeaveCheckpoint(playerid)
  5953. #endif
  5954. {
  5955.     if(ACInfo[playerid][acKicked]) return 0;
  5956.     if(!IsPlayerNPC(playerid))
  5957.     {
  5958.         new ac_gtc = GetTickCount();
  5959.         if(ACInfo[playerid][acACAllow][49])
  5960.         {
  5961.             if(ac_gtc < ACInfo[playerid][acCall][18] + ac_Mtfc[18][0]) ac_FloodDetect(playerid, 18);
  5962.             else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5963.             else ACInfo[playerid][acFloodCount][18] = ACInfo[playerid][acFloodCount][27] = 0;
  5964.         }
  5965.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][18] = ac_gtc;
  5966.     }
  5967.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5968.         && defined ac_OnPlayerLeaveCheckpoint
  5969.         return ac_OnPlayerLeaveCheckpoint(playerid);
  5970.     #else
  5971.         return 1;
  5972.     #endif
  5973. }
  5974.  
  5975. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5976.     #if defined _ALS_OnPlayerLeaveCheckpoint
  5977.         #undef OnPlayerLeaveCheckpoint
  5978.     #else
  5979.         #define _ALS_OnPlayerLeaveCheckpoint
  5980.     #endif
  5981.     #define OnPlayerLeaveCheckpoint ac_OnPlayerLeaveCheckpoint
  5982.     #if defined ac_OnPlayerLeaveCheckpoint
  5983.         forward ac_OnPlayerLeaveCheckpoint(playerid);
  5984.     #endif
  5985. #endif
  5986.  
  5987. #if defined _inc_y_hooks || defined _INC_y_hooks
  5988.     hook OnPlayerRequestSpawn(playerid)
  5989. #else
  5990.     public OnPlayerRequestSpawn(playerid)
  5991. #endif
  5992. {
  5993.     if(ACInfo[playerid][acKicked]) return 0;
  5994.     new ac_i;
  5995.     if(!IsPlayerNPC(playerid))
  5996.     {
  5997.         ac_i = GetTickCount();
  5998.         if(ACInfo[playerid][acACAllow][49])
  5999.         {
  6000.             if(ac_i < ACInfo[playerid][acCall][19] + ac_Mtfc[19][0]) return ac_FloodDetect(playerid, 19);
  6001.             if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6002.             else ACInfo[playerid][acFloodCount][19] = ACInfo[playerid][acFloodCount][27] = 0;
  6003.         }
  6004.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][19] = ac_i;
  6005.     }
  6006.     ac_i = 1;
  6007.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6008.         && defined ac_OnPlayerRequestSpawn
  6009.         ac_i = ac_OnPlayerRequestSpawn(playerid);
  6010.     #endif
  6011.     if(ac_i && ACInfo[playerid][acLogged] != 2)
  6012.     {
  6013.         ACInfo[playerid][acSet][7] = 3;
  6014.         ACInfo[playerid][acSpawnTime] =
  6015.         ACInfo[playerid][acNOPCount][9] = 0;
  6016.         ACInfo[playerid][acSpawnRes] = 1;
  6017.     }
  6018.     return ac_i;
  6019. }
  6020.  
  6021. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6022.     #if defined _ALS_OnPlayerRequestSpawn
  6023.         #undef OnPlayerRequestSpawn
  6024.     #else
  6025.         #define _ALS_OnPlayerRequestSpawn
  6026.     #endif
  6027.     #define OnPlayerRequestSpawn ac_OnPlayerRequestSpawn
  6028.     #if defined ac_OnPlayerRequestSpawn
  6029.         forward ac_OnPlayerRequestSpawn(playerid);
  6030.     #endif
  6031. #endif
  6032.  
  6033. #if defined _inc_y_hooks || defined _INC_y_hooks
  6034.     hook OnPlayerExitedMenu(playerid)
  6035. #else
  6036.     public OnPlayerExitedMenu(playerid)
  6037. #endif
  6038. {
  6039.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked]) return 0;
  6040.     new ac_gtc = GetTickCount();
  6041.     if(ACInfo[playerid][acACAllow][49])
  6042.     {
  6043.         if(ac_gtc < ACInfo[playerid][acCall][20] + ac_Mtfc[20][0]) ac_FloodDetect(playerid, 20);
  6044.         else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6045.         else ACInfo[playerid][acFloodCount][20] = ACInfo[playerid][acFloodCount][27] = 0;
  6046.     }
  6047.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][20] = ac_gtc;
  6048.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6049.         && defined ac_OnPlayerExitedMenu
  6050.         return ac_OnPlayerExitedMenu(playerid);
  6051.     #else
  6052.         return 1;
  6053.     #endif
  6054. }
  6055.  
  6056. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6057.     #if defined _ALS_OnPlayerExitedMenu
  6058.         #undef OnPlayerExitedMenu
  6059.     #else
  6060.         #define _ALS_OnPlayerExitedMenu
  6061.     #endif
  6062.     #define OnPlayerExitedMenu ac_OnPlayerExitedMenu
  6063.     #if defined ac_OnPlayerExitedMenu
  6064.         forward ac_OnPlayerExitedMenu(playerid);
  6065.     #endif
  6066. #endif
  6067.  
  6068. #if defined _inc_y_hooks || defined _INC_y_hooks
  6069.     hook OnPlayerEnterRaceCP(playerid)
  6070. #else
  6071.     public OnPlayerEnterRaceCheckpoint(playerid)
  6072. #endif
  6073. {
  6074.     if(ACInfo[playerid][acKicked]) return 0;
  6075.     if(!IsPlayerNPC(playerid))
  6076.     {
  6077.         new ac_gtc = GetTickCount();
  6078.         if(ACInfo[playerid][acACAllow][49])
  6079.         {
  6080.             if(ac_gtc < ACInfo[playerid][acCall][21] + ac_Mtfc[21][0]) ac_FloodDetect(playerid, 21);
  6081.             else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6082.             else ACInfo[playerid][acFloodCount][21] = ACInfo[playerid][acFloodCount][27] = 0;
  6083.         }
  6084.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][21] = ac_gtc;
  6085.     }
  6086.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6087.         && defined ac_OnPlayerEnterRaceCheckpoint
  6088.         return ac_OnPlayerEnterRaceCheckpoint(playerid);
  6089.     #else
  6090.         return 1;
  6091.     #endif
  6092. }
  6093.  
  6094. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6095.     #if defined _ALS_OnPlayerEnterRaceCheckpoin\
  6096.         || defined _ALS_OnPlayerEnterRaceCP
  6097.         #undef OnPlayerEnterRaceCheckpoint
  6098.     #else
  6099.         #define _ALS_OnPlayerEnterRaceCP
  6100.     #endif
  6101.     #define OnPlayerEnterRaceCheckpoint ac_OnPlayerEnterRaceCheckpoint
  6102.     #if defined ac_OnPlayerEnterRaceCheckpoint
  6103.         forward ac_OnPlayerEnterRaceCheckpoint(playerid);
  6104.     #endif
  6105. #endif
  6106.  
  6107. #if defined _inc_y_hooks || defined _INC_y_hooks
  6108.     hook OnPlayerLeaveRaceCP(playerid)
  6109. #else
  6110.     public OnPlayerLeaveRaceCheckpoint(playerid)
  6111. #endif
  6112. {
  6113.     if(ACInfo[playerid][acKicked]) return 0;
  6114.     if(!IsPlayerNPC(playerid))
  6115.     {
  6116.         new ac_gtc = GetTickCount();
  6117.         if(ACInfo[playerid][acACAllow][49])
  6118.         {
  6119.             if(ac_gtc < ACInfo[playerid][acCall][22] + ac_Mtfc[22][0]) ac_FloodDetect(playerid, 22);
  6120.             else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6121.             else ACInfo[playerid][acFloodCount][22] = ACInfo[playerid][acFloodCount][27] = 0;
  6122.         }
  6123.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][22] = ac_gtc;
  6124.     }
  6125.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6126.         && defined ac_OnPlayerLeaveRaceCheckpoint
  6127.         return ac_OnPlayerLeaveRaceCheckpoint(playerid);
  6128.     #else
  6129.         return 1;
  6130.     #endif
  6131. }
  6132.  
  6133. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6134.     #if defined _ALS_OnPlayerLeaveRaceCheckpoin\
  6135.         || defined _ALS_OnPlayerLeaveRaceCP
  6136.         #undef OnPlayerLeaveRaceCheckpoint
  6137.     #else
  6138.         #define _ALS_OnPlayerLeaveRaceCP
  6139.     #endif
  6140.     #define OnPlayerLeaveRaceCheckpoint ac_OnPlayerLeaveRaceCheckpoint
  6141.     #if defined ac_OnPlayerLeaveRaceCheckpoint
  6142.         forward ac_OnPlayerLeaveRaceCheckpoint(playerid);
  6143.     #endif
  6144. #endif
  6145.  
  6146. #if defined _inc_y_hooks || defined _INC_y_hooks
  6147.     hook OnPlayerClickPlayerTD(playerid, PlayerText:playertextid)
  6148. #else
  6149.     public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  6150. #endif
  6151. {
  6152.     if(ACInfo[playerid][acKicked]) return 1;
  6153.     new ac_gtc = GetTickCount();
  6154.     if(ACInfo[playerid][acACAllow][49])
  6155.     {
  6156.         if(ac_gtc < ACInfo[playerid][acCall][23] + ac_Mtfc[23][0])
  6157.         {
  6158.             ac_FloodDetect(playerid, 23);
  6159.             return 1;
  6160.         }
  6161.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6162.         else ACInfo[playerid][acFloodCount][23] = ACInfo[playerid][acFloodCount][27] = 0;
  6163.     }
  6164.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][23] = ac_gtc;
  6165.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6166.         && defined ac_OnPlayerClickPlayerTextDraw
  6167.         return ac_OnPlayerClickPlayerTextDraw(playerid, playertextid);
  6168.     #else
  6169.         return 0;
  6170.     #endif
  6171. }
  6172.  
  6173. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6174.     #if defined _ALS_OnPlayerClickPlayerTextDra\
  6175.         || defined _ALS_OnPlayerClickPlayerTD
  6176.         #undef OnPlayerClickPlayerTextDraw
  6177.     #else
  6178.         #define _ALS_OnPlayerClickPlayerTD
  6179.     #endif
  6180.     #define OnPlayerClickPlayerTextDraw ac_OnPlayerClickPlayerTextDraw
  6181.     #if defined ac_OnPlayerClickPlayerTextDraw
  6182.         forward ac_OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid);
  6183.     #endif
  6184. #endif
  6185.  
  6186. #if defined _inc_y_hooks || defined _INC_y_hooks
  6187.     hook OnVehDamageStatusUpd(vehicleid, playerid)
  6188. #else
  6189.     public OnVehicleDamageStatusUpdate(vehicleid, playerid)
  6190. #endif
  6191. {
  6192.     if(ACInfo[playerid][acKicked]) return 1;
  6193.     new ac_gtc = GetTickCount();
  6194.     if(ACInfo[playerid][acACAllow][49])
  6195.     {
  6196.         if(ac_gtc < ACInfo[playerid][acCall][24] + ac_Mtfc[24][0])
  6197.         {
  6198.             ac_FloodDetect(playerid, 24);
  6199.             return 1;
  6200.         }
  6201.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6202.         else ACInfo[playerid][acFloodCount][24] = ACInfo[playerid][acFloodCount][27] = 0;
  6203.     }
  6204.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][24] = ac_gtc;
  6205.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6206.         && defined ac_OnVehicleDamageStatusUpdate
  6207.         return ac_OnVehicleDamageStatusUpdate(vehicleid, playerid);
  6208.     #else
  6209.         return 0;
  6210.     #endif
  6211. }
  6212.  
  6213. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6214.     #if defined _ALS_OnVehicleDamageStatusUpdat\
  6215.         || defined _ALS_OnVehicleDamageStatusUpd
  6216.         #undef OnVehicleDamageStatusUpdate
  6217.     #else
  6218.         #define _ALS_OnVehicleDamageStatusUpd
  6219.     #endif
  6220.     #define OnVehicleDamageStatusUpdate ac_OnVehicleDamageStatusUpdate
  6221.     #if defined ac_OnVehicleDamageStatusUpdate
  6222.         forward ac_OnVehicleDamageStatusUpdate(vehicleid, playerid);
  6223.     #endif
  6224. #endif
  6225.  
  6226. #if defined _inc_y_hooks || defined _INC_y_hooks
  6227.     hook OnVehicleSirenChange(playerid, vehicleid, newstate)
  6228. #else
  6229.     public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
  6230. #endif
  6231. {
  6232.     if(ACInfo[playerid][acKicked]) return 1;
  6233.     if(!IsPlayerNPC(playerid))
  6234.     {
  6235.         new ac_gtc = GetTickCount();
  6236.         if(ACInfo[playerid][acACAllow][49])
  6237.         {
  6238.             if(ac_gtc < ACInfo[playerid][acCall][25] + ac_Mtfc[25][0])
  6239.             {
  6240.                 ac_FloodDetect(playerid, 25);
  6241.                 return 1;
  6242.             }
  6243.             if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6244.             else ACInfo[playerid][acFloodCount][25] = ACInfo[playerid][acFloodCount][27] = 0;
  6245.         }
  6246.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][25] = ac_gtc;
  6247.     }
  6248.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6249.         && defined ac_OnVehicleSirenStateChange
  6250.         return ac_OnVehicleSirenStateChange(playerid, vehicleid, newstate);
  6251.     #else
  6252.         return 0;
  6253.     #endif
  6254. }
  6255.  
  6256. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6257.     #if defined _ALS_OnVehicleSirenStateChange
  6258.         #undef OnVehicleSirenStateChange
  6259.     #else
  6260.         #define _ALS_OnVehicleSirenStateChange
  6261.     #endif
  6262.     #define OnVehicleSirenStateChange ac_OnVehicleSirenStateChange
  6263.     #if defined ac_OnVehicleSirenStateChange
  6264.         forward ac_OnVehicleSirenStateChange(playerid, vehicleid, newstate);
  6265.     #endif
  6266. #endif
  6267.  
  6268. #if defined OnPlayerSelectDynamicObject
  6269.     #if defined _inc_y_hooks || defined _INC_y_hooks
  6270.         #if defined STREAMER_ENABLE_TAGS
  6271.             hook OnPlayerSelectDynObject(playerid, STREAMER_TAG_OBJECT objectid, modelid, Float:x, Float:y, Float:z)
  6272.         #else
  6273.             hook OnPlayerSelectDynObject(playerid, objectid, modelid, Float:x, Float:y, Float:z)
  6274.         #endif
  6275.     #else
  6276.         #if defined STREAMER_ENABLE_TAGS
  6277.             public OnPlayerSelectDynamicObject(playerid, STREAMER_TAG_OBJECT objectid, modelid, Float:x, Float:y, Float:z)
  6278.         #else
  6279.             public OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z)
  6280.         #endif
  6281.     #endif
  6282.     {
  6283.         if(ACInfo[playerid][acKicked]) return 0;
  6284.         new ac_gtc = GetTickCount();
  6285.         if(ACInfo[playerid][acACAllow][49])
  6286.         {
  6287.             if(ac_gtc < ACInfo[playerid][acCall][26] + ac_Mtfc[26][0]) ac_FloodDetect(playerid, 26);
  6288.             else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6289.             else ACInfo[playerid][acFloodCount][26] = ACInfo[playerid][acFloodCount][27] = 0;
  6290.         }
  6291.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][26] = ac_gtc;
  6292.         #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6293.             && defined ac_OnPlayerSelectDynamicObject
  6294.             return ac_OnPlayerSelectDynamicObject(playerid, objectid, modelid, x, y, z);
  6295.         #else
  6296.             return 1;
  6297.         #endif
  6298.     }
  6299.  
  6300.     #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6301.         #if defined _ALS_OnPlayerSelectDynamicObjec\
  6302.             || defined _ALS_OnPlayerSelectDynObject || defined _ALS_OnPlayerSelectDynamicObj
  6303.             #undef OnPlayerSelectDynamicObject
  6304.         #else
  6305.             #define _ALS_OnPlayerSelectDynObject
  6306.         #endif
  6307.         #define OnPlayerSelectDynamicObject ac_OnPlayerSelectDynamicObject
  6308.         #if defined ac_OnPlayerSelectDynamicObject
  6309.             #if defined STREAMER_ENABLE_TAGS
  6310.                 forward ac_OnPlayerSelectDynamicObject(playerid, STREAMER_TAG_OBJECT objectid, modelid, Float:x, Float:y, Float:z);
  6311.             #else
  6312.                 forward ac_OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z);
  6313.             #endif
  6314.         #endif
  6315.     #endif
  6316. #endif
  6317.  
  6318. #if defined _inc_y_hooks || defined _INC_y_hooks
  6319.     hook OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
  6320. #else
  6321.     public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
  6322. #endif
  6323. {
  6324.     if(ACInfo[playerid][acKicked]) return 1;
  6325.     new ac_gtc = GetTickCount();
  6326.     if(ACInfo[playerid][acACAllow][49])
  6327.     {
  6328.         if(ac_gtc < ACInfo[playerid][acCall][26] + ac_Mtfc[26][0])
  6329.         {
  6330.             ac_FloodDetect(playerid, 26);
  6331.             return 1;
  6332.         }
  6333.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6334.         else ACInfo[playerid][acFloodCount][26] = ACInfo[playerid][acFloodCount][27] = 0;
  6335.     }
  6336.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][26] = ac_gtc;
  6337.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6338.         && defined ac_OnPlayerSelectObject
  6339.         return ac_OnPlayerSelectObject(playerid, type, objectid, modelid, fX, fY, fZ);
  6340.     #else
  6341.         return 0;
  6342.     #endif
  6343. }
  6344.  
  6345. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6346.     #if defined _ALS_OnPlayerSelectObject
  6347.         #undef OnPlayerSelectObject
  6348.     #else
  6349.         #define _ALS_OnPlayerSelectObject
  6350.     #endif
  6351.     #define OnPlayerSelectObject ac_OnPlayerSelectObject
  6352.     #if defined ac_OnPlayerSelectObject
  6353.         forward ac_OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ);
  6354.     #endif
  6355. #endif
  6356.  
  6357. #if defined _inc_y_hooks || defined _INC_y_hooks
  6358.     hook OnUnoccupiedVehicleUpd(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
  6359. #else
  6360.     public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
  6361. #endif
  6362. {
  6363.     if(ACInfo[playerid][acKicked]) return 0;
  6364.     new ac_a, Float:ac_X, Float:ac_Y, Float:ac_Z, Float:ac_D = GetVehicleDistanceFromPoint(vehicleid, new_x, new_y, new_z);
  6365.     GetVehiclePos(vehicleid, ac_X, ac_Y, ac_Z);
  6366.     if(passenger_seat > 0)
  6367.     {
  6368.         if(ACInfo[playerid][acACAllow][50] &&
  6369.         (passenger_seat != (ac_a = GetPlayerVehicleSeat(playerid)) || !IsPlayerInVehicle(playerid, vehicleid)))
  6370.         {
  6371.             #if defined DEBUG
  6372.                 printf("[Nex-AC debug] AC seat: %d, passenger seat: %d, AC veh: %d, veh: %d", ac_a, passenger_seat, GetPlayerVehicleID(playerid), vehicleid);
  6373.             #endif
  6374.             #if defined OnCheatDetected
  6375.                 ac_KickWithCode(playerid, "", 0, 50, 2);
  6376.             #else
  6377.                 return ac_KickWithCode(playerid, "", 0, 50, 2);
  6378.             #endif
  6379.         }
  6380.         new Float:ac_zDiff = floatsub(new_z, ac_Z);
  6381.         if(ACInfo[playerid][acACAllow][31] && floatcmp(ac_zDiff, -5.0) == 1 &&
  6382.         (floatcmp(floatabs(vel_x), floatabs(ACVehInfo[vehicleid][acVelX])) >= 0 && floatcmp(floatabs(ACVehInfo[vehicleid][acVelX]), 0.3) == 1 ||
  6383.         floatcmp(floatabs(vel_y), floatabs(ACVehInfo[vehicleid][acVelY])) >= 0 && floatcmp(floatabs(ACVehInfo[vehicleid][acVelY]), 0.3) == 1 ||
  6384.         floatcmp(floatabs(floatsub(vel_x, ACVehInfo[vehicleid][acVelX])), 25.0) == 1 ||
  6385.         floatcmp(floatabs(floatsub(vel_y, ACVehInfo[vehicleid][acVelY])), 25.0) == 1))
  6386.         {
  6387.             if(++ACInfo[playerid][acCheatCount][4] > AC_MAX_CARSHOT_WARNINGS)
  6388.             {
  6389.                 #undef AC_MAX_CARSHOT_WARNINGS
  6390.                 #if defined DEBUG
  6391.                     printf("[Nex-AC debug] Vel x, y: %f, %f, old vel x, y: %f, %f, pos diff z: %f, vehicleid: %d",
  6392.                     vel_x, vel_y, ACVehInfo[vehicleid][acVelX], ACVehInfo[vehicleid][acVelY], ac_zDiff, vehicleid);
  6393.                 #endif
  6394.                 #if defined OnCheatDetected
  6395.                     ac_KickWithCode(playerid, "", 0, 31);
  6396.                     ACInfo[playerid][acCheatCount][4] = 0;
  6397.                 #else
  6398.                     return ac_KickWithCode(playerid, "", 0, 31);
  6399.                 #endif
  6400.             }
  6401.         }
  6402.         else if(ACInfo[playerid][acACAllow][8] &&
  6403.         floatcmp(vel_z, 0.1) >= 0 && floatcmp(vel_z, ACVehInfo[vehicleid][acVelZ]) == 1 &&
  6404.         floatcmp(floatabs(floatsub(ac_X, new_x)), floatdiv(ac_zDiff, 2.0)) == -1 && floatcmp(floatabs(floatsub(ac_Y, new_y)), floatdiv(ac_zDiff, 2.0)) == -1)
  6405.         {
  6406.             if(++ACInfo[playerid][acCheatCount][3] > AC_MAX_FLYHACK_VEH_WARNINGS)
  6407.             {
  6408.                 #undef AC_MAX_FLYHACK_VEH_WARNINGS
  6409.                 #if defined DEBUG
  6410.                     printf("[Nex-AC debug] Vel z: %f, old vel z: %f, pos diff x, y, z: %f, %f, %f, vehicleid: %d",
  6411.                     vel_z, ACVehInfo[vehicleid][acVelZ], floatsub(ac_X, new_x), floatsub(ac_Y, new_y), ac_zDiff, vehicleid);
  6412.                 #endif
  6413.                 #if defined OnCheatDetected
  6414.                     ac_KickWithCode(playerid, "", 0, 8, 2);
  6415.                     ACInfo[playerid][acCheatCount][3] = 0;
  6416.                 #else
  6417.                     return ac_KickWithCode(playerid, "", 0, 8, 2);
  6418.                 #endif
  6419.             }
  6420.         }
  6421.         else ACInfo[playerid][acCheatCount][4] =
  6422.         ACInfo[playerid][acCheatCount][3] = 0;
  6423.     }
  6424.     if(ACInfo[playerid][acACAllow][5] &&
  6425.     floatcmp(ac_D, 15.0) == 1 && floatcmp(ac_Z, -45.0) == 1 &&
  6426.     floatcmp(ac_D, floatadd(ACVehInfo[vehicleid][acPosDiff], floatmul(floatdiv(ac_D, 3.0), 1.6))) == 1)
  6427.     {
  6428.         #if defined DEBUG
  6429.             printf("[Nex-AC debug] Distance: %f, old pos diff: %f, pos z: %f, vehicleid: %d, playerid: %d",
  6430.             ac_D, ACVehInfo[vehicleid][acPosDiff], ac_Z, vehicleid, playerid);
  6431.         #endif
  6432.         #if defined OnCheatDetected
  6433.             ac_KickWithCode(playerid, "", 0, 5);
  6434.         #endif
  6435.         GetVehicleZAngle(vehicleid, ACVehInfo[vehicleid][acZAngle]);
  6436.         SetVehicleZAngle(vehicleid, ACVehInfo[vehicleid][acZAngle]);
  6437.         SetVehiclePos(vehicleid, ac_X, ac_Y, ac_Z);
  6438.         return 0;
  6439.     }
  6440.     ac_a = 1;
  6441.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6442.         && defined ac_OnUnoccupiedVehicleUpdate
  6443.         ac_a = ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, new_x, new_y, new_z, vel_x, vel_y, vel_z);
  6444.     #endif
  6445.     if(ac_a)
  6446.     {
  6447.         ACVehInfo[vehicleid][acSpeedDiff] = ac_GetSpeed3D(vel_x, vel_y, vel_z) - ac_GetSpeed3D(ACVehInfo[vehicleid][acVelX], ACVehInfo[vehicleid][acVelY], ACVehInfo[vehicleid][acVelZ]);
  6448.         ACVehInfo[vehicleid][acPosDiff] = ac_D;
  6449.         ACVehInfo[vehicleid][acVelX] = vel_x;
  6450.         ACVehInfo[vehicleid][acVelY] = vel_y;
  6451.         ACVehInfo[vehicleid][acVelZ] = vel_z;
  6452.     }
  6453.     return ac_a;
  6454. }
  6455.  
  6456. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6457.     #if defined _ALS_OnUnoccupiedVehicleUpdate
  6458.         #undef OnUnoccupiedVehicleUpdate
  6459.     #else
  6460.         #define _ALS_OnUnoccupiedVehicleUpdate
  6461.     #endif
  6462.     #define OnUnoccupiedVehicleUpdate ac_OnUnoccupiedVehicleUpdate
  6463.     #if defined ac_OnUnoccupiedVehicleUpdate
  6464.         forward ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z);
  6465.     #endif
  6466. #endif
  6467.  
  6468. #if defined _inc_y_hooks || defined _INC_y_hooks
  6469.     hook OnTrailerUpdate(playerid, vehicleid)
  6470. #else
  6471.     public OnTrailerUpdate(playerid, vehicleid)
  6472. #endif
  6473. {
  6474.     if(ACInfo[playerid][acKicked]) return 0;
  6475.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6476.         && defined ac_OnTrailerUpdate
  6477.         return ac_OnTrailerUpdate(playerid, vehicleid);
  6478.     #else
  6479.         return 1;
  6480.     #endif
  6481. }
  6482.  
  6483. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6484.     #if defined _ALS_OnTrailerUpdate
  6485.         #undef OnTrailerUpdate
  6486.     #else
  6487.         #define _ALS_OnTrailerUpdate
  6488.     #endif
  6489.     #define OnTrailerUpdate ac_OnTrailerUpdate
  6490.     #if defined ac_OnTrailerUpdate
  6491.         forward ac_OnTrailerUpdate(playerid, vehicleid);
  6492.     #endif
  6493. #endif
  6494.  
  6495. #if defined _inc_y_hooks || defined _INC_y_hooks
  6496.     hook OnPlayerEditAttachedObj(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
  6497. #else
  6498.     public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
  6499. #endif
  6500. {
  6501.     if(ACInfo[playerid][acKicked]) return 1;
  6502.     if(ACInfo[playerid][acACAllow][46] && 384 <= modelid <= 393)
  6503.     {
  6504.         #if defined DEBUG
  6505.             printf("[Nex-AC debug] Object modelid: %d", modelid);
  6506.         #endif
  6507.         ac_KickWithCode(playerid, "", 0, 46);
  6508.         return 1;
  6509.     }
  6510.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6511.         && defined ac_OnPlayerEditAttachedObject
  6512.         return ac_OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ);
  6513.     #else
  6514.         return 0;
  6515.     #endif
  6516. }
  6517.  
  6518. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6519.     #if defined _ALS_OnPlayerEditAttachedObject
  6520.         #undef OnPlayerEditAttachedObject
  6521.     #else
  6522.         #define _ALS_OnPlayerEditAttachedObject
  6523.     #endif
  6524.     #define OnPlayerEditAttachedObject ac_OnPlayerEditAttachedObject
  6525.     #if defined ac_OnPlayerEditAttachedObject
  6526.         forward ac_OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ);
  6527.     #endif
  6528. #endif
  6529.  
  6530. ac_fpublic ac_Timer(playerid)
  6531. {
  6532.     if(!IsPlayerConnected(playerid) || ACInfo[playerid][acKicked]) return 0;
  6533.     new ac_gpp;
  6534.     if(ACInfo[playerid][acACAllow][51] && (ac_gpp = NetStats_MessagesRecvPerSecond(playerid)) > AC_MAX_MSGS_REC_DIFF)
  6535.     {
  6536.         #if defined DEBUG
  6537.             printf("[Nex-AC debug] Max msgs per sec: %d, msgs per sec: %d", AC_MAX_MSGS_REC_DIFF, ac_gpp);
  6538.         #endif
  6539.         #undef AC_MAX_MSGS_REC_DIFF
  6540.         ac_KickWithCode(playerid, "", 0, 51);
  6541.     }
  6542.     ac_gpp = GetPlayerPing(playerid);
  6543.     if(ACInfo[playerid][acACAllow][38])
  6544.     {
  6545.         if(ac_gpp > AC_MAX_PING && ac_gpp != 65535)
  6546.         {
  6547.             if(++ACInfo[playerid][acCheatCount][0] > AC_MAX_PING_WARNINGS)
  6548.             {
  6549.                 #undef AC_MAX_PING_WARNINGS
  6550.                 #if defined DEBUG
  6551.                     printf("[Nex-AC debug] Max ping: %d, ping: %d", AC_MAX_PING, ac_gpp);
  6552.                 #endif
  6553.                 ac_KickWithCode(playerid, "", 0, 38);
  6554.                 #if defined OnCheatDetected
  6555.                     ACInfo[playerid][acCheatCount][0] = 0;
  6556.                 #endif
  6557.             }
  6558.         }
  6559.         else ACInfo[playerid][acCheatCount][0] = 0;
  6560.     }
  6561.     new ac_gtc = GetTickCount();
  6562.     if(ac_gtc < ACInfo[playerid][acUpdateTime] + 1500)
  6563.     {
  6564.         new ac_t;
  6565.         #if AC_USE_AMMUNATIONS || AC_USE_CASINOS
  6566.             new ac_int = GetPlayerInterior(playerid);
  6567.         #endif
  6568.         #if defined Streamer_GetDistanceToItem\
  6569.             && defined Streamer_GetIntData
  6570.             new Float:ac_tmp;
  6571.             if(ACInfo[playerid][acLastPickup] > MAX_PICKUPS)
  6572.             {
  6573.                 new Float:ac_X, Float:ac_Y, Float:ac_Z;
  6574.                 GetPlayerPos(playerid, ac_X, ac_Y, ac_Z);
  6575.                 Streamer_GetDistanceToItem(ac_X, ac_Y, ac_Z, STREAMER_TYPE_PICKUP, ACInfo[playerid][acLastPickup] - MAX_PICKUPS, ac_tmp);
  6576.                 ac_t = Streamer_GetIntData(STREAMER_TYPE_PICKUP, ACInfo[playerid][acLastPickup] - MAX_PICKUPS, E_STREAMER_EXTRA_ID) - 100;
  6577.             }
  6578.         #endif
  6579.         if(!ACInfo[playerid][acDead] && ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp)
  6580.         {
  6581.             for(new ac_i, ac_w, ac_a, bool:ac_cw, ac_s = ac_wSlot[GetPlayerWeapon(playerid)]; ac_i <= 12; ++ac_i)
  6582.             {
  6583.                 GetPlayerWeaponData(playerid, ac_i, ac_w, ac_a);
  6584.                 if(ac_w == 39) ac_cw = true;
  6585.                 if(ac_s != ac_i)
  6586.                 {
  6587.                     if(ACInfo[playerid][acSetWeapon][ac_i] != -1)
  6588.                     {
  6589.                         if(ACInfo[playerid][acSetWeapon][ac_i] == ac_w)
  6590.                         {
  6591.                             if(ACInfo[playerid][acSet][3] == ac_w) ACInfo[playerid][acSet][3] = -1;
  6592.                             ACInfo[playerid][acSetWeapon][ac_i] = -1;
  6593.                             ACInfo[playerid][acWeapon][ac_i] = ac_w;
  6594.                         }
  6595.                         else if(ACInfo[playerid][acACAllow][52] && ac_gtc > ACInfo[playerid][acGtcSetWeapon][ac_i] + ac_gpp &&
  6596.                         ++ACInfo[playerid][acNOPCount][0] > AC_MAX_NOP_WARNINGS)
  6597.                         {
  6598.                             #if defined DEBUG
  6599.                                 printf(DEBUG_CODE_5, playerid, "GivePlayerWeapon");
  6600.                                 printf("[Nex-AC debug] AC weapon: %d, weaponid: %d", ACInfo[playerid][acSetWeapon][ac_i], ac_w);
  6601.                             #endif
  6602.                             ac_KickWithCode(playerid, "", 0, 52, 13);
  6603.                             #if defined OnCheatDetected
  6604.                                 ACInfo[playerid][acSetWeapon][ac_i] = -1;
  6605.                             #endif
  6606.                         }
  6607.                     }
  6608.                     else
  6609.                     {
  6610.                         if(ACInfo[playerid][acWeapon][ac_i] != ac_w)
  6611.                         {
  6612.                             #if defined Streamer_GetDistanceToItem\
  6613.                                 && defined Streamer_GetIntData
  6614.                             if((ac_w == 0 || ac_w == 40 && ac_cw || ac_w == 46 &&
  6615.                             ACInfo[playerid][acVeh] > 0 && ACInfo[playerid][acParachute]) ||
  6616.                             0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS &&
  6617.                             ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
  6618.                             ac_a <= (3 <= ac_i <= 5 ? ACInfo[playerid][acAmmo][ac_i] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) &&
  6619.                             IsPlayerInRangeOfPoint(playerid, 8.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
  6620.                             ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]) ||
  6621.                             ACInfo[playerid][acLastPickup] > MAX_PICKUPS && ac_t == ac_w &&
  6622.                             ac_a <= (3 <= ac_i <= 5 ? ACInfo[playerid][acAmmo][ac_i] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) && floatcmp(ac_tmp, 8.0) <= 0)
  6623.                             {
  6624.                                 ACInfo[playerid][acWeapon][ac_i] = ac_w;
  6625.                                 ACInfo[playerid][acAmmo][ac_i] = ac_a;
  6626.                             }
  6627.                             #else
  6628.                             if((ac_w == 0 || ac_w == 40 && ac_cw || ac_w == 46 &&
  6629.                             ACInfo[playerid][acVeh] > 0 && ACInfo[playerid][acParachute]) ||
  6630.                             0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS &&
  6631.                             ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
  6632.                             ac_a <= (3 <= ac_i <= 5 ? ACInfo[playerid][acAmmo][ac_i] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) &&
  6633.                             IsPlayerInRangeOfPoint(playerid, 8.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
  6634.                             ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]))
  6635.                             {
  6636.                                 ACInfo[playerid][acWeapon][ac_i] = ac_w;
  6637.                                 ACInfo[playerid][acAmmo][ac_i] = ac_a;
  6638.                             }
  6639.                             #endif
  6640.                             else if(ACInfo[playerid][acACAllow][15] && !(16 <= ac_w <= 43 && ac_a == 0))
  6641.                             {
  6642.                                 #if defined DEBUG
  6643.                                     printf("[Nex-AC debug] AC weaponid: %d, AC ammo: %d, weaponid: %d, ammo: %d",
  6644.                                     ACInfo[playerid][acWeapon][ac_i], ACInfo[playerid][acAmmo][ac_i], ac_w, ac_a);
  6645.                                 #endif
  6646.                                 ac_KickWithCode(playerid, "", 0, 15, 2);
  6647.                                 #if defined OnCheatDetected
  6648.                                     ACInfo[playerid][acWeapon][ac_i] = ac_w;
  6649.                                     ACInfo[playerid][acAmmo][ac_i] = ac_a;
  6650.                                 #endif
  6651.                             }
  6652.                         }
  6653.                         if(ACInfo[playerid][acGiveAmmo][ac_i] != -65535)
  6654.                         {
  6655.                             if(ACInfo[playerid][acGiveAmmo][ac_i] == ac_a ||
  6656.                             ACInfo[playerid][acGiveAmmo][ac_i] > ac_a && ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_i] + ac_gpp)
  6657.                             {
  6658.                                 ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  6659.                                 ACInfo[playerid][acAmmo][ac_i] = ac_a;
  6660.                             }
  6661.                             else if(ACInfo[playerid][acACAllow][52] &&
  6662.                             ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_i] + ac_gpp &&
  6663.                             ++ACInfo[playerid][acNOPCount][1] > AC_MAX_NOP_WARNINGS)
  6664.                             {
  6665.                                 #if defined DEBUG
  6666.                                     printf(DEBUG_CODE_5, playerid, "SetPlayerAmmo");
  6667.                                     printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  6668.                                     ACInfo[playerid][acGiveAmmo][ac_i], ac_a, ac_w);
  6669.                                 #endif
  6670.                                 ac_KickWithCode(playerid, "", 0, 52, 14);
  6671.                                 #if defined OnCheatDetected
  6672.                                     ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  6673.                                 #endif
  6674.                             }
  6675.                         }
  6676.                         else if(16 <= ac_w <= 43)
  6677.                         {
  6678.                             if(ac_a == 0) ACInfo[playerid][acAmmo][ac_i] = 0;
  6679.                             else if(ACInfo[playerid][acACAllow][16] &&
  6680.                             (ac_w != 40 && ac_a > ACInfo[playerid][acAmmo][ac_i] || ac_a < 0 <= ACInfo[playerid][acAmmo][ac_i]))
  6681.                             {
  6682.                                 #if defined DEBUG
  6683.                                     printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  6684.                                     ACInfo[playerid][acAmmo][ac_i], ac_a, ac_w);
  6685.                                 #endif
  6686.                                 ac_KickWithCode(playerid, "", 0, 16, 2);
  6687.                                 #if defined OnCheatDetected
  6688.                                     ACInfo[playerid][acAmmo][ac_i] = ac_a;
  6689.                                 #endif
  6690.                             }
  6691.                         }
  6692.                     }
  6693.                 }
  6694.                 else if(22 <= ac_w <= 32 || 41 <= ac_w <= 42 || !ac_LagCompMode && (ac_w == 43 || 16 <= ac_w <= 39))
  6695.                 {
  6696.                     if((ac_a > ACInfo[playerid][acAmmo][ac_i] || ac_a < 0 <= ACInfo[playerid][acAmmo][ac_i]) &&
  6697.                     ACInfo[playerid][acGiveAmmo][ac_i] == -65535)
  6698.                     {
  6699.                         #if AC_USE_AMMUNATIONS
  6700.                             if(16 <= ac_w <= 39 && ac_InAmmuNation(playerid, ac_int) &&
  6701.                             ac_AmmuNationInfo[ac_w - 16][1] == ac_abs(ac_a - ACInfo[playerid][acAmmo][ac_i]))
  6702.                             {
  6703.                                 if(ACInfo[playerid][acSet][10] != -1) ACInfo[playerid][acSet][10] += ac_AmmuNationInfo[ac_w - 16][0];
  6704.                                 else ACInfo[playerid][acSet][10] = ac_AmmuNationInfo[ac_w - 16][0];
  6705.                                 ACInfo[playerid][acAmmo][ac_i] += ac_AmmuNationInfo[ac_w - 16][1];
  6706.                                 ACInfo[playerid][acGtc][15] = ac_gtc + 1650;
  6707.                                 ACInfo[playerid][acCheatCount][10] = 0;
  6708.                             }
  6709.                             else
  6710.                             {
  6711.                         #endif
  6712.                             if(ACInfo[playerid][acACAllow][16] && !ac_LagCompMode)
  6713.                             {
  6714.                                 #if defined DEBUG
  6715.                                     printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  6716.                                     ACInfo[playerid][acAmmo][ac_i], ac_a, ac_w);
  6717.                                 #endif
  6718.                                 ac_KickWithCode(playerid, "", 0, 16, 3);
  6719.                                 #if defined OnCheatDetected
  6720.                                     ACInfo[playerid][acAmmo][ac_i] = ac_a;
  6721.                                 #endif
  6722.                             }
  6723.                         #if AC_USE_AMMUNATIONS
  6724.                             }
  6725.                         #endif
  6726.                         #undef ac_abs
  6727.                     }
  6728.                     else if(ACInfo[playerid][acAmmo][ac_i] != 0) ACInfo[playerid][acAmmo][ac_i] = ac_a;
  6729.                 }
  6730.             }
  6731.         }
  6732.         ac_t = bad_GetPlayerMoney(playerid);
  6733.         #if AC_USE_AMMUNATIONS
  6734.             if(ACInfo[playerid][acSet][10] != -1)
  6735.             {
  6736.                 if(ac_t < ACInfo[playerid][acMoney] &&
  6737.                 ACInfo[playerid][acSet][10] <= ACInfo[playerid][acMoney] - ac_t) ACInfo[playerid][acSet][10] = -1;
  6738.                 else if(ACInfo[playerid][acACAllow][15] && ac_gtc > ACInfo[playerid][acGtc][15] + ac_gpp &&
  6739.                 ++ACInfo[playerid][acCheatCount][10] > AC_MAX_NOP_WARNINGS)
  6740.                 {
  6741.                     #if defined DEBUG
  6742.                         printf("[Nex-AC debug] Money: %d, old money: %d, price: %d",
  6743.                         ac_t, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][10]);
  6744.                     #endif
  6745.                     ac_KickWithCode(playerid, "", 0, 15, 4);
  6746.                     #if defined OnCheatDetected
  6747.                         ACInfo[playerid][acSet][10] = -1;
  6748.                     #endif
  6749.                 }
  6750.             }
  6751.         #endif
  6752.         #if AC_USE_TUNING_GARAGES
  6753.             if(ACInfo[playerid][acSet][12] != -1)
  6754.             {
  6755.                 if(ac_t < ACInfo[playerid][acMoney] &&
  6756.                 ACInfo[playerid][acSet][12] <= ACInfo[playerid][acMoney] - ac_t) ACInfo[playerid][acSet][12] = -1;
  6757.                 else if(ACInfo[playerid][acACAllow][23] && ac_gtc > ACInfo[playerid][acGtc][17] + ac_gpp &&
  6758.                 ++ACInfo[playerid][acCheatCount][12] > AC_MAX_NOP_WARNINGS)
  6759.                 {
  6760.                     #undef AC_MAX_NOP_WARNINGS
  6761.                     #if defined DEBUG
  6762.                         printf("[Nex-AC debug] Money: %d, old money: %d, component price: %d",
  6763.                         ac_t, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][12]);
  6764.                     #endif
  6765.                     ac_KickWithCode(playerid, "", 0, 23, 6);
  6766.                     #if defined OnCheatDetected
  6767.                         ACInfo[playerid][acSet][12] = -1;
  6768.                     #endif
  6769.                 }
  6770.             }
  6771.         #endif
  6772.         #undef AC_USE_TUNING_GARAGES
  6773.         if(ACInfo[playerid][acNOPCount][11] > 0) ACInfo[playerid][acNOPCount][11]--;
  6774.         else
  6775.         {
  6776.             if(ACInfo[playerid][acACAllow][14] &&
  6777.             ac_t > ACInfo[playerid][acMoney] && (!ACInfo[playerid][acStuntBonus] || ACInfo[playerid][acVeh] == 0))
  6778.             {
  6779.                 #if AC_USE_CASINOS
  6780.                     if(!ac_InCasino(playerid, ac_int))
  6781.                     {
  6782.                 #endif
  6783.                     #if defined DEBUG
  6784.                         printf("[Nex-AC debug] AC money: %d, money: %d, Stunt Bonus: %d, vehicleid: %d, playerid: %d",
  6785.                         ACInfo[playerid][acMoney], ac_t, ACInfo[playerid][acStuntBonus], ACInfo[playerid][acVeh], playerid);
  6786.                     #endif
  6787.                     #if defined OnCheatDetected
  6788.                         ac_KickWithCode(playerid, "", 0, 14);
  6789.                         ACInfo[playerid][acMoney] = ac_t;
  6790.                     #else
  6791.                         ac_t = ACInfo[playerid][acMoney];
  6792.                         ResetPlayerMoney(playerid);
  6793.                         GivePlayerMoney(playerid, ac_t);
  6794.                     #endif
  6795.                 #if AC_USE_CASINOS
  6796.                     }
  6797.                 #endif
  6798.             }
  6799.             ACInfo[playerid][acMoney] = ac_t;
  6800.         }
  6801.     }
  6802.     ACInfo[playerid][acCheatCount][1] = ACInfo[playerid][acCheatCount][2] = 0;
  6803.     if(ACInfo[playerid][acCheatCount][16] > 0) ACInfo[playerid][acCheatCount][16]--;
  6804.     #if defined SetPlayerTimerEx_
  6805.         ACInfo[playerid][acTimerID] = SetPlayerTimerEx_(playerid, "ac_Timer", 0, 1000, 1, "i", playerid);
  6806.     #else
  6807.         ACInfo[playerid][acTimerID] = SetTimerEx("ac_Timer", 1000, false, "i", playerid);
  6808.     #endif
  6809.     return 1;
  6810. }
  6811.  
  6812. //Don't make changes in this public
  6813. //To customize the punishments, declare 'OnCheatDetected' in your script
  6814. ac_fpublic ac_OnCheatDetected(playerid, ip_address[], type, code)
  6815. {
  6816.     if(type) BlockIpAddress(ip_address, 0);
  6817.     else
  6818.     {
  6819.         switch(code)
  6820.         {
  6821.             case 40: SendClientMessage(playerid, AC_DEFAULT_COLOR, MAX_CONNECTS_MSG);
  6822.             case 41: SendClientMessage(playerid, AC_DEFAULT_COLOR, UNKNOWN_CLIENT_MSG);
  6823.             default:
  6824.             {
  6825.                 static ac_strtmp[sizeof KICK_MSG];
  6826.                 format(ac_strtmp, sizeof ac_strtmp, KICK_MSG, code);
  6827.                 SendClientMessage(playerid, AC_DEFAULT_COLOR, ac_strtmp);
  6828.                 #undef AC_DEFAULT_COLOR
  6829.             }
  6830.         }
  6831.         new ac_vehid = GetPlayerVehicleID(playerid), ac_gpp = GetPlayerPing(playerid) + 150;
  6832.         #if defined SetPlayerTimerEx_
  6833.             ACInfo[playerid][acKickTimerID] = SetPlayerTimerEx_(playerid, "ac_KickTimer", 0, (ac_gpp > AC_MAX_PING ? AC_MAX_PING : ac_gpp), 1, "i", playerid);
  6834.         #else
  6835.             ACInfo[playerid][acKickTimerID] = SetTimerEx("ac_KickTimer", (ac_gpp > AC_MAX_PING ? AC_MAX_PING : ac_gpp), false, "i", playerid);
  6836.         #endif
  6837.         #undef AC_MAX_PING
  6838.         if(ac_vehid > 0)
  6839.         {
  6840.             if(code == 4) ACInfo[playerid][acLastVeh] = ac_vehid;
  6841.             ACInfo[playerid][acKicked] = 2;
  6842.         }
  6843.         else ACInfo[playerid][acKicked] = 1;
  6844.     }
  6845.     return 1;
  6846. }
  6847.  
  6848. ac_fpublic ac_KickTimer(playerid) return Kick(playerid);
  6849.  
  6850. #undef ac_fpublic
  6851.  
  6852. stock AntiCheatGetHealth(playerid, &Float:health)
  6853. {
  6854.     if(!IsPlayerConnected(playerid)) return 0;
  6855.     health = ACInfo[playerid][acHealth];
  6856.     return 1;
  6857. }
  6858.  
  6859. stock AntiCheatGetArmour(playerid, &Float:armour)
  6860. {
  6861.     if(!IsPlayerConnected(playerid)) return 0;
  6862.     armour = ACInfo[playerid][acArmour];
  6863.     return 1;
  6864. }
  6865.  
  6866. stock AntiCheatGetVehicleHealth(vehicleid, &Float:health)
  6867. {
  6868.     if(!GetVehicleModel(vehicleid)) return 0;
  6869.     health = ACVehInfo[vehicleid][acHealth];
  6870.     return 1;
  6871. }
  6872.  
  6873. stock AntiCheatGetWeaponData(playerid, slot, &weapons, &ammo)
  6874. {
  6875.     if(!IsPlayerConnected(playerid)) return 0;
  6876.     weapons = ACInfo[playerid][acWeapon][slot];
  6877.     ammo = ACInfo[playerid][acAmmo][slot];
  6878.     return 1;
  6879. }
  6880.  
  6881. stock AntiCheatGetSpawnWeapon(playerid, &weapon1, &weapon1_ammo, &weapon2, &weapon2_ammo, &weapon3, &weapon3_ammo)
  6882. {
  6883.     if(!IsPlayerConnected(playerid)) return 0;
  6884.     weapon1 = ACInfo[playerid][acSpawnWeapon1];
  6885.     weapon1_ammo = ACInfo[playerid][acSpawnAmmo1];
  6886.     weapon2 = ACInfo[playerid][acSpawnWeapon2];
  6887.     weapon2_ammo = ACInfo[playerid][acSpawnAmmo2];
  6888.     weapon3 = ACInfo[playerid][acSpawnWeapon3];
  6889.     weapon3_ammo = ACInfo[playerid][acSpawnAmmo3];
  6890.     return 1;
  6891. }
  6892.  
  6893. stock AntiCheatGetPos(playerid, &Float:x, &Float:y, &Float:z)
  6894. {
  6895.     if(!IsPlayerConnected(playerid)) return 0;
  6896.     x = ACInfo[playerid][acPosX];
  6897.     y = ACInfo[playerid][acPosY];
  6898.     z = ACInfo[playerid][acPosZ];
  6899.     return 1;
  6900. }
  6901.  
  6902. stock AntiCheatGetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z)
  6903. {
  6904.     if(!GetVehicleModel(vehicleid)) return 0;
  6905.     x = ACVehInfo[vehicleid][acVelX];
  6906.     y = ACVehInfo[vehicleid][acVelY];
  6907.     z = ACVehInfo[vehicleid][acVelZ];
  6908.     return 1;
  6909. }
  6910.  
  6911. static ac_GetSpeed2D(Float:ac_x, Float:ac_y) return floatround(floatmul(VectorSize(ac_x, ac_y, 0.0), 179.28625));
  6912.  
  6913. static ac_GetSpeed3D(Float:ac_x, Float:ac_y, Float:ac_z) return floatround(floatmul(VectorSize(ac_x, ac_y, ac_z), 179.28625));
  6914.  
  6915. static ac_IsVehicleSeatOccupied(vehicleid, seat)
  6916. {
  6917.     #if defined foreach
  6918.         foreach(new ac_i : Player)
  6919.         {
  6920.             if(ACInfo[ac_i][acVeh] == vehicleid && ACInfo[ac_i][acSeat] == seat) return 1;
  6921.         }
  6922.     #else
  6923.         for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  6924.         {
  6925.             if(IsPlayerInVehicle(ac_i, vehicleid) && ACInfo[ac_i][acSeat] == seat) return 1;
  6926.         }
  6927.     #endif
  6928.     return 0;
  6929. }
  6930.  
  6931. #if AC_USE_RESTAURANTS
  6932.     static ac_InRestaurant(playerid, interiorid)
  6933.     {
  6934.         new ac_i;
  6935.         switch(interiorid)
  6936.         {
  6937.             case 5: ac_i = 0;
  6938.             case 9: ac_i = 1;
  6939.             case 10: ac_i = 2;
  6940.             default: return 0;
  6941.         }
  6942.         return IsPlayerInRangeOfPoint(playerid, 3.0, ac_Restaurants[ac_i][0], ac_Restaurants[ac_i][1], ac_Restaurants[ac_i][2]);
  6943.     }
  6944. #endif
  6945. #undef AC_USE_RESTAURANTS
  6946.  
  6947. #if AC_USE_AMMUNATIONS
  6948.     static ac_InAmmuNation(playerid, interiorid)
  6949.     {
  6950.         new ac_i, ac_s;
  6951.         switch(interiorid)
  6952.         {
  6953.             case 1: ac_i = 0, ac_s = -1;
  6954.             case 4: ac_i = 1, ac_s = 0;
  6955.             case 6: ac_i = 3, ac_s = 1;
  6956.             default: return 0;
  6957.         }
  6958.         for(; ac_i > ac_s; --ac_i)
  6959.         {
  6960.             if(IsPlayerInRangeOfPoint(playerid, 3.0, ac_AmmuNations[ac_i][0],
  6961.             ac_AmmuNations[ac_i][1], ac_AmmuNations[ac_i][2])) return 1;
  6962.         }
  6963.         return 0;
  6964.     }
  6965. #endif
  6966. #undef AC_USE_AMMUNATIONS
  6967.  
  6968. #if AC_USE_PAYNSPRAY
  6969.     static ac_InPayNSpray(playerid, interiorid)
  6970.     {
  6971.         if(interiorid == 0)
  6972.         {
  6973.             for(new ac_i = sizeof(ac_PayNSpray) - 1; ac_i >= 0; --ac_i)
  6974.             {
  6975.                 if(IsPlayerInRangeOfPoint(playerid, 7.5, ac_PayNSpray[ac_i][0], ac_PayNSpray[ac_i][1], ac_PayNSpray[ac_i][2])) return 1;
  6976.             }
  6977.         }
  6978.         return 0;
  6979.     }
  6980. #endif
  6981. #undef AC_USE_PAYNSPRAY
  6982.  
  6983. #if AC_USE_VENDING_MACHINES
  6984.     static ac_NearVendingMachine(playerid, interiorid)
  6985.     {
  6986.         new ac_i, ac_s;
  6987.         switch(interiorid)
  6988.         {
  6989.             case 0: ac_i = 44, ac_s = -1;
  6990.             case 1: ac_i = 51, ac_s = 44;
  6991.             case 2: ac_i = 52, ac_s = 51;
  6992.             case 3: ac_i = 58, ac_s = 52;
  6993.             case 6: ac_i = 60, ac_s = 58;
  6994.             case 7: ac_i = 61, ac_s = 60;
  6995.             case 15: ac_i = 62, ac_s = 61;
  6996.             case 16: ac_i = 65, ac_s = 62;
  6997.             case 17: ac_i = 72, ac_s = 65;
  6998.             case 18: ac_i = 74, ac_s = 72;
  6999.             default: return 0;
  7000.         }
  7001.         for(; ac_i > ac_s; --ac_i)
  7002.         {
  7003.             if(IsPlayerInRangeOfPoint(playerid, 1.5, ac_vMachines[ac_i][0], ac_vMachines[ac_i][1], ac_vMachines[ac_i][2])) return 1;
  7004.         }
  7005.         return 0;
  7006.     }
  7007. #endif
  7008. #undef AC_USE_VENDING_MACHINES
  7009.  
  7010. #if AC_USE_CASINOS
  7011.     static ac_InCasino(playerid, interiorid)
  7012.     {
  7013.         new ac_i, ac_s;
  7014.         switch(interiorid)
  7015.         {
  7016.             case 1: ac_i = 41, ac_s = -1;
  7017.             case 10: ac_i = 61, ac_s = 41;
  7018.             case 12: ac_i = 70, ac_s = 61;
  7019.             default: return 0;
  7020.         }
  7021.         for(; ac_i > ac_s; --ac_i)
  7022.         {
  7023.             if(IsPlayerInRangeOfPoint(playerid, ac_Casinos[ac_i][3], ac_Casinos[ac_i][0],
  7024.             ac_Casinos[ac_i][1], ac_Casinos[ac_i][2])) return 1;
  7025.         }
  7026.         return 0;
  7027.     }
  7028. #endif
  7029. #undef AC_USE_CASINOS
  7030.  
  7031. static ac_IsCompatible(modelid, componentid)
  7032. {
  7033.     if(modelid > 0)
  7034.     {
  7035.         switch(componentid)
  7036.         {
  7037.             case 1000..1191:
  7038.             {
  7039.                 componentid -= 1000;
  7040.                 if(ac_vMods[(modelid - 400) * 6 + (componentid >>> 5)] & 1 << (componentid & 0b00011111)) return 1;
  7041.             }
  7042.             case 1192, 1193:
  7043.             {
  7044.                 if(modelid == 576) return 1;
  7045.             }
  7046.         }
  7047.     }
  7048.     return 0;
  7049. }
  7050.  
  7051. static ac_IpToInt(const s_szIP[])
  7052. {
  7053.     new ac_aiBytes[1], ac_iPos;
  7054.     ac_aiBytes{0} = strval(s_szIP[ac_iPos]);
  7055.     while(ac_iPos < 15 && s_szIP[ac_iPos++] != '.'){}
  7056.     ac_aiBytes{1} = strval(s_szIP[ac_iPos]);
  7057.     while(ac_iPos < 15 && s_szIP[ac_iPos++] != '.'){}
  7058.     ac_aiBytes{2} = strval(s_szIP[ac_iPos]);
  7059.     while(ac_iPos < 15 && s_szIP[ac_iPos++] != '.'){}
  7060.     ac_aiBytes{3} = strval(s_szIP[ac_iPos]);
  7061.     return ac_aiBytes[0];
  7062. }
  7063.  
  7064. static ac_FloodDetect(playerid, publicid)
  7065. {
  7066.     if(!ACInfo[playerid][acKicked])
  7067.     {
  7068.         if(++ACInfo[playerid][acFloodCount][publicid] > ac_Mtfc[publicid][1])
  7069.         {
  7070.             #if defined DEBUG
  7071.                 printf(DEBUG_CODE_1, playerid, ac_Mtfc[publicid][1], publicid);
  7072.                 #undef DEBUG
  7073.             #endif
  7074.             #if defined OnCheatDetected
  7075.                 ac_KickWithCode(playerid, "", 0, 49, publicid);
  7076.                 ACInfo[playerid][acFloodCount][publicid] = ACInfo[playerid][acFloodCount][27] = 0;
  7077.             #else
  7078.                 return ac_KickWithCode(playerid, "", 0, 49, publicid);
  7079.             #endif
  7080.         }
  7081.         ACInfo[playerid][acCall][publicid] = ACInfo[playerid][acCall][27] = GetTickCount();
  7082.     }
  7083.     return 0;
  7084. }
  7085.  
  7086. static ac_KickWithCode(playerid, ip_address[], type, code, code2 = 0)
  7087. {
  7088.     if(type == 0 && (!IsPlayerConnected(playerid) || ACInfo[playerid][acKicked]) ||
  7089.     !(0 <= code < sizeof ac_ACAllow)) return 0;
  7090.     ac_sInfo[5]++;
  7091.     switch(code)
  7092.     {
  7093.         case 0..35, 37, 39, 51: ac_sInfo[0]++;
  7094.         case 36, 38, 40, 41, 50: ac_sInfo[4]++;
  7095.         case 42: ac_sInfo[1]++;
  7096.         case 47..49: ac_sInfo[3]++;
  7097.         case 43..46: ac_sInfo[2]++;
  7098.     }
  7099.     new ac_strtmp[6];
  7100.     if(code2) format(ac_strtmp, sizeof ac_strtmp, " (%d)", code2);
  7101.     if(type) printf(SUSPICION_2, ip_address, code, ac_strtmp);
  7102.     else printf(SUSPICION_1, playerid, code, ac_strtmp);
  7103.     #if defined OnCheatDetected
  7104.         OnCheatDetected(playerid, ip_address, type, code);
  7105.     #else
  7106.         ac_OnCheatDetected(playerid, ip_address, type, code);
  7107.     #endif
  7108.     return 0;
  7109. }
  7110.  
  7111. static ac_LoadCfg()
  7112. {
  7113.     static ac_strtmp[10];
  7114.     new ac_i, ac_string[415], File:ac_cfgFile;
  7115.     if(fexist(AC_CONFIG_FILE))
  7116.     {
  7117.         if((ac_cfgFile = fopen(AC_CONFIG_FILE, io_read)))
  7118.         {
  7119.             #if defined sscanf
  7120.                 new ac_j;
  7121.             #endif
  7122.             while(fread(ac_cfgFile, ac_string) > 0)
  7123.             {
  7124.                 #if defined sscanf
  7125.                     sscanf(ac_string, "i'//'i", ac_j, ac_i);
  7126.                     ac_ACAllow[ac_i] = !!ac_j;
  7127.                 #else
  7128.                     if((ac_i = strfind(ac_string, "//")) != -1)
  7129.                     {
  7130.                         strmid(ac_strtmp, ac_string, ac_i + 2, strlen(ac_string));
  7131.                         if(0 <= (ac_i = strval(ac_strtmp)) < sizeof ac_ACAllow) ac_ACAllow[ac_i] = !!strval(ac_string);
  7132.                     }
  7133.                 #endif
  7134.             }
  7135.             fclose(ac_cfgFile);
  7136.         }
  7137.         else return 0;
  7138.     }
  7139.     else if((ac_cfgFile = fopen(AC_CONFIG_FILE, io_write)))
  7140.     {
  7141.         #undef AC_CONFIG_FILE
  7142.         for(; ac_i < sizeof ac_ACAllow; ++ac_i)
  7143.         {
  7144.             format(ac_strtmp, sizeof ac_strtmp, "%d //%d\r\n", ac_ACAllow[ac_i], ac_i);
  7145.             strcat(ac_string, ac_strtmp);
  7146.         }
  7147.         fwrite(ac_cfgFile, ac_string);
  7148.         fclose(ac_cfgFile);
  7149.     }
  7150.     else return 0;
  7151.     return 1;
  7152. }
  7153.  
  7154. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement