Guest User

Nex-AC

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