Guest User

Nex-AC

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