Advertisement
Guest User

Nex-AC

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