SHARE
TWEET

Nex-AC

a guest Sep 1st, 2019 710 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Nex-AC by Nexius v1.9.49 (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.49"
  30.  
  31. #define AC_SERVER_VERSION           "0.3.7"
  32. #define AC_SERVER_DL_VERSION        "0.3.DL"
  33.  
  34. #if !defined AC_CLIENT_VERSION
  35.     #define AC_CLIENT_VERSION           "0.3"
  36. #endif
  37.  
  38. #if !defined AC_USE_CONFIG_FILES
  39.     #define AC_USE_CONFIG_FILES         true
  40. #endif
  41.  
  42. #if AC_USE_CONFIG_FILES
  43.     #if !defined AC_CONFIG_FILE
  44.         #define AC_CONFIG_FILE          "nex-ac_settings.cfg"
  45.     #endif
  46.  
  47.     #if !defined AC_NOP_CONFIG_FILE
  48.         #define AC_NOP_CONFIG_FILE      "nex-ac_nop_settings.cfg"
  49.     #endif
  50. #else
  51.     #pragma unused CFG_OPENING_ERROR
  52. #endif
  53.  
  54. #if !defined AC_USE_VENDING_MACHINES
  55.     #define AC_USE_VENDING_MACHINES     true
  56. #endif
  57.  
  58. #if !defined AC_USE_TUNING_GARAGES
  59.     #define AC_USE_TUNING_GARAGES       true
  60. #endif
  61.  
  62. #if !defined AC_USE_PICKUP_WEAPONS
  63.     #define AC_USE_PICKUP_WEAPONS       true
  64. #endif
  65.  
  66. #if !defined AC_USE_AMMUNATIONS
  67.     #define AC_USE_AMMUNATIONS          true
  68. #endif
  69.  
  70. #if !defined AC_USE_RESTAURANTS
  71.     #define AC_USE_RESTAURANTS          true
  72. #endif
  73.  
  74. #if !defined AC_USE_PAYNSPRAY
  75.     #define AC_USE_PAYNSPRAY            true
  76. #endif
  77.  
  78. #if !defined AC_USE_CASINOS
  79.     #define AC_USE_CASINOS              true
  80. #endif
  81.  
  82. #if !defined AC_USE_QUERY
  83.     #define AC_USE_QUERY                true
  84. #endif
  85.  
  86. #if !defined AC_USE_NPC
  87.     #define AC_USE_NPC                  true
  88. #endif
  89.  
  90. #if !defined AC_USE_STATISTICS
  91.     #define AC_USE_STATISTICS           true
  92. #endif
  93.  
  94. #if !AC_USE_STATISTICS
  95.     #pragma unused STATS_STRING_1
  96.     #pragma unused STATS_STRING_2
  97.     #pragma unused STATS_STRING_3
  98.     #pragma unused STATS_STRING_4
  99.     #pragma unused STATS_STRING_5
  100.     #pragma unused STATS_STRING_6
  101.     #pragma unused STATS_STRING_7
  102.     #pragma unused STATS_STRING_8
  103. #endif
  104.  
  105. #if !defined AUTOSAVE_SETTINGS_IN_CONFIG
  106.     #define AUTOSAVE_SETTINGS_IN_CONFIG     false
  107. #endif
  108.  
  109. #if !defined AC_DEFAULT_COLOR
  110.     #define AC_DEFAULT_COLOR                -1
  111. #endif
  112.  
  113. #if !defined AC_MAX_CLASSES
  114.     #define AC_MAX_CLASSES                  320
  115. #endif
  116.  
  117. #if !defined AC_MAX_CONNECTS_FROM_IP
  118.     #define AC_MAX_CONNECTS_FROM_IP         1
  119. #endif
  120.  
  121. #if !defined AC_MAX_RCON_LOGIN_ATTEMPT
  122.     #define AC_MAX_RCON_LOGIN_ATTEMPT       1
  123. #endif
  124.  
  125. #if !defined AC_MAX_MSGS_REC_DIFF
  126.     #define AC_MAX_MSGS_REC_DIFF            800
  127. #endif
  128.  
  129. #if !defined AC_MAX_PING
  130.     #define AC_MAX_PING                     500
  131. #endif
  132.  
  133. #if !defined AC_MIN_TIME_RECONNECT
  134.     #define AC_MIN_TIME_RECONNECT           12      //In seconds
  135. #endif
  136.  
  137. #if !defined AC_SPEEDHACK_VEH_RESET_DELAY
  138.     #define AC_SPEEDHACK_VEH_RESET_DELAY    3       //In seconds
  139. #endif
  140.  
  141. #if !defined AC_MAX_NOP_WARNINGS
  142.     #define AC_MAX_NOP_WARNINGS             8
  143. #endif
  144.  
  145. #if !defined AC_MAX_NOP_TIMER_WARNINGS
  146.     #define AC_MAX_NOP_TIMER_WARNINGS       3
  147. #endif
  148.  
  149. #if !defined AC_MAX_PING_WARNINGS
  150.     #define AC_MAX_PING_WARNINGS            8
  151. #endif
  152.  
  153. #if !defined AC_MAX_AIR_WARNINGS
  154.     #define AC_MAX_AIR_WARNINGS             4
  155. #endif
  156.  
  157. #if !defined AC_MAX_AIR_VEH_WARNINGS
  158.     #define AC_MAX_AIR_VEH_WARNINGS         4
  159. #endif
  160.  
  161. #if !defined AC_MAX_FLYHACK_VEH_WARNINGS
  162.     #define AC_MAX_FLYHACK_VEH_WARNINGS     3
  163. #endif
  164.  
  165. #if !defined AC_MAX_FLYHACK_BIKE_WARNINGS
  166.     #define AC_MAX_FLYHACK_BIKE_WARNINGS    5
  167. #endif
  168.  
  169. #if !defined AC_MAX_CARSHOT_WARNINGS
  170.     #define AC_MAX_CARSHOT_WARNINGS         4
  171. #endif
  172.  
  173. #if !defined AC_MAX_PRO_AIM_WARNINGS
  174.     #define AC_MAX_PRO_AIM_WARNINGS         2
  175. #endif
  176.  
  177. #if !defined AC_MAX_AFK_GHOST_WARNINGS
  178.     #define AC_MAX_AFK_GHOST_WARNINGS       2
  179. #endif
  180.  
  181. #if !defined AC_MAX_RAPID_FIRE_WARNINGS
  182.     #define AC_MAX_RAPID_FIRE_WARNINGS      16
  183. #endif
  184.  
  185. #if !defined AC_MAX_AUTO_C_WARNINGS
  186.     #define AC_MAX_AUTO_C_WARNINGS          8
  187. #endif
  188.  
  189. #if !defined AC_MAX_GODMODE_WARNINGS
  190.     #define AC_MAX_GODMODE_WARNINGS         3
  191. #endif
  192.  
  193. #if !defined AC_MAX_GODMODE_VEH_WARNINGS
  194.     #define AC_MAX_GODMODE_VEH_WARNINGS     3
  195. #endif
  196.  
  197. #if !defined AC_MAX_SILENT_AIM_WARNINGS
  198.     #define AC_MAX_SILENT_AIM_WARNINGS      2
  199. #endif
  200.  
  201. #if !defined AC_MAX_FAKE_WEAPON_WARNINGS
  202.     #define AC_MAX_FAKE_WEAPON_WARNINGS     2
  203. #endif
  204.  
  205. #if !defined AC_MAX_FLYHACK_WARNINGS
  206.     #define AC_MAX_FLYHACK_WARNINGS         2
  207. #endif
  208.  
  209. #if !defined AC_MAX_TELEPORT_GLITCH_WARNINGS
  210.     #define AC_MAX_TELEPORT_GLITCH_WARNINGS 1
  211. #endif
  212.  
  213. #if !defined AC_MAX_SPEEDHACK_VEH_WARNINGS
  214.     #define AC_MAX_SPEEDHACK_VEH_WARNINGS   (1 * AC_SPEEDHACK_VEH_RESET_DELAY)
  215. #endif
  216.  
  217. #if !defined AC_MAX_SPEEDHACK_WARNINGS
  218.     #define AC_MAX_SPEEDHACK_WARNINGS       4
  219. #endif
  220.  
  221. #if !defined AC_MAX_CJ_RUN_WARNINGS
  222.     #define AC_MAX_CJ_RUN_WARNINGS          3
  223. #endif
  224.  
  225. #if !defined AC_MAX_MONEY_WARNINGS
  226.     #define AC_MAX_MONEY_WARNINGS           2
  227. #endif
  228.  
  229. #define ac_fpublic%0(%1) forward%0(%1); public%0(%1)
  230. #define ac_AbsoluteAngle(%0) ((floatround(%0, floatround_floor) % 360) + floatfract(%0))
  231. #define ac_abs(%0) (((%0) < 0) ? (-(%0)) : ((%0)))
  232.  
  233. //'ac_ACAllow' contains the default settings that will be set if no config file is found
  234. //Don't change these values if you already have 'scriptfiles\nex-ac_settings.cfg'
  235. static bool:ac_ACAllow[] =
  236. {
  237.     true,   //0 Anti-AirBreak (onfoot)
  238.     true,   //1 Anti-AirBreak (in vehicle)
  239.     true,   //2 Anti-teleport hack (onfoot)
  240.     true,   //3 Anti-teleport hack (in vehicle)
  241.     true,   //4 Anti-teleport hack (into/between vehicles)
  242.     true,   //5 Anti-teleport hack (vehicle to player)
  243.     true,   //6 Anti-teleport hack (pickups)
  244.     true,   //7 Anti-FlyHack (onfoot)
  245.     true,   //8 Anti-FlyHack (in vehicle)
  246.     true,   //9 Anti-SpeedHack (onfoot)
  247.     true,   //10 Anti-SpeedHack (in vehicle)
  248.     true,   //11 Anti-Health hack (in vehicle)
  249.     true,   //12 Anti-Health hack (onfoot)
  250.     true,   //13 Anti-Armour hack
  251.     true,   //14 Anti-Money hack
  252.     true,   //15 Anti-Weapon hack
  253.     true,   //16 Anti-Ammo hack (add)
  254.     true,   //17 Anti-Ammo hack (infinite)
  255.     true,   //18 Anti-Special actions hack
  256.     true,   //19 Anti-GodMode from bullets (onfoot)
  257.     true,   //20 Anti-GodMode from bullets (in vehicle)
  258.     true,   //21 Anti-Invisible hack
  259.     true,   //22 Anti-lagcomp-spoof
  260.     true,   //23 Anti-Tuning hack
  261.     false//24 Anti-Parkour mod
  262.     true,   //25 Anti-Quick turn
  263.     true,   //26 Anti-Rapid fire
  264.     true,   //27 Anti-FakeSpawn
  265.     true,   //28 Anti-FakeKill
  266.     true,   //29 Anti-Pro Aim
  267.     true,   //30 Anti-CJ run
  268.     true,   //31 Anti-CarShot
  269.     true,   //32 Anti-CarJack
  270.     false//33 Anti-UnFreeze
  271.     true,   //34 Anti-AFK Ghost
  272.     true,   //35 Anti-Full Aiming
  273.  
  274.     false//36 Anti-Fake NPC
  275.     true,   //37 Anti-Reconnect
  276.     true,   //38 Anti-High ping
  277.     true,   //39 Anti-Dialog hack
  278.     true,   //40 Protection from sandbox
  279.     true,   //41 Protection from invalid version
  280.     true,   //42 Anti-Rcon hack
  281.  
  282.     true,   //43 Anti-Tuning crasher
  283.     true,   //44 Anti-Invalid seat crasher
  284.     true,   //45 Anti-Dialog crasher
  285.     true,   //46 Anti-Attached object crasher
  286.     true,   //47 Anti-Weapon Crasher
  287.  
  288.     true,   //48 Protection from connection flood in one slot
  289.     true,   //49 Anti-callback functions flood
  290.     true,   //50 Anti-flood by seat changing
  291.  
  292.     true,   //51 Anti-DoS
  293.  
  294.     true    //52 Anti-NOPs
  295. },
  296.  
  297. bool:ac_NOPAllow[] =
  298. {
  299.     true,   //0 Anti-NOP GivePlayerWeapon
  300.     true,   //1 Anti-NOP SetPlayerAmmo
  301.     true,   //2 Anti-NOP SetPlayerInterior
  302.     true,   //3 Anti-NOP SetPlayerHealth
  303.     true,   //4 Anti-NOP SetVehicleHealth
  304.     true,   //5 Anti-NOP SetPlayerArmour
  305.     true,   //6 Anti-NOP SetPlayerSpecialAction
  306.     true,   //7 Anti-NOP PutPlayerInVehicle
  307.     true,   //8 Anti-NOP TogglePlayerSpectating
  308.     true,   //9 Anti-NOP SpawnPlayer
  309.     true,   //10 Anti-NOP SetPlayerPos
  310.     true    //11 Anti-NOP RemovePlayerFromVehicle
  311. };
  312.  
  313. static const ac_Mtfc[][] =
  314. {
  315.     {150, 8},   //0 OnDialogResponse
  316.     {800, 2},   //1 OnEnterExitModShop
  317.     {250, 5},   //2 OnPlayerClickMap
  318.     {400, 5},   //3 OnPlayerClickPlayer
  319.     {50, 11},   //4 OnPlayerClickTextDraw
  320.     {350, 5},   //5 OnPlayerCommandText
  321.     {50, 8},    //6 OnPlayerEnterVehicle
  322.     {50, 11},   //7 OnPlayerExitVehicle
  323.     {50, 8},    //8 OnPlayerPickUpPickup
  324.     {150, 8},   //9 OnPlayerRequestClass
  325.     {150, 8},   //10 OnPlayerSelectedMenuRow
  326.     {600, 5},   //11 OnPlayerStateChange
  327.     {450, 2},   //12 OnVehicleMod
  328.     {450, 2},   //13 OnVehiclePaintjob
  329.     {450, 2},   //14 OnVehicleRespray
  330.     {300, 1},   //15 OnVehicleDeath
  331.     {400, 3},   //16 OnPlayerText
  332.     {150, 8},   //17 OnPlayerEnterCheckpoint
  333.     {150, 8},   //18 OnPlayerLeaveCheckpoint
  334.     {150, 5},   //19 OnPlayerRequestSpawn
  335.     {150, 8},   //20 OnPlayerExitedMenu
  336.     {150, 8},   //21 OnPlayerEnterRaceCheckpoint
  337.     {150, 8},   //22 OnPlayerLeaveRaceCheckpoint
  338.     {50, 11},   //23 OnPlayerClickPlayerTextDraw
  339.     {51, 9},    //24 OnVehicleDamageStatusUpdate
  340.     {150, 8},   //25 OnVehicleSirenStateChange
  341.     {150, 5},   //26 OnPlayerSelectObject
  342.     {50, 11}    //27 Cross-public
  343. },
  344.  
  345. ac_wSlot[] =
  346. {
  347.     0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10, 10, 10,
  348.     10, 8, 8, 8, 8, 8, 8, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5,
  349.     4, 6, 6, 7, 7, 7, 7, 8, 12, 9, 9, 9, 11, 11, 11
  350. },
  351.  
  352. ac_vType[] =
  353. {
  354.     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
  355.     0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 3, 6, 0, 0, 0, 0, 0, 6, 0, 0,
  356.     0, 0, 0, 0, 0, 0, 3, 2, 5, 7, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0,
  357.     1, 5, 5, 5, 0, 0, 0, 0, 5, 2, 0, 5, 3, 3, 0, 0, 1, 0, 0, 0,
  358.     0, 4, 0, 0, 3, 0, 0, 2, 2, 0, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0,
  359.     0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 1, 1, 1, 0, 0, 0, 0, 0, 1,
  360.     1, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 1,
  361.     0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
  362.     0, 0, 0, 2, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 1, 0, 0,
  363.     0, 5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 1, 1, 0, 3, 0, 0, 0, 0,
  364.     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  365. },
  366.  
  367. #if AC_USE_PICKUP_WEAPONS
  368.     ac_wModel[] =
  369.     {
  370.         0, 331, 333, 334, 335, 336, 337, 338, 339, 341, 321, 322, 323, 324, 325,
  371.         326, 342, 343, 344, 345, 345, 345, 346, 347, 348, 349, 350, 351, 352, 353, 355, 356,
  372.         372, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 371
  373.     },
  374.  
  375.     ac_pAmmo[] =
  376.     {
  377.         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  378.         1, 1, 1, 8, 8, 8, 8, 4, 4, 30, 10, 10, 15,
  379.         10, 10, 60, 60, 80, 80, 60, 20, 10, 4, 3,
  380.         100, 500, 5, 1, 500, 500, 36, 0, 0, 1
  381.     },
  382. #endif
  383.  
  384. #if AC_USE_TUNING_GARAGES
  385.     ac_cPrice[] =
  386.     {
  387.         400, 550, 200, 250, 100, 150, 80, 500, 500, 200, 1000, 220, 250, 100, 400,
  388.         500, 200, 500, 350, 300, 250, 200, 150, 350, 50, 1000, 480, 480, 770, 680, 370,
  389.         370, 170, 120, 790, 150, 500, 690, 190, 390, 500, 390, 1000, 500, 500, 510, 710,
  390.         670, 530, 810, 620, 670, 530, 130, 210, 230, 520, 430, 620, 720, 530, 180, 550, 430,
  391.         830, 850, 750, 250, 200, 550, 450, 550, 450, 1100, 1030, 980, 1560, 1620, 1200,
  392.         1030, 900, 1230, 820, 1560, 1350, 770, 100, 1500, 150, 650, 450, 100, 750,
  393.         350, 450, 350, 1000, 620, 1140, 1000, 940, 780, 830, 3250, 1610, 1540, 780, 780, 780,
  394.         1610, 1540, 0, 0, 3340, 3250, 2130, 2050, 2040, 780, 940, 780, 940, 780, 860,
  395.         780, 1120, 3340, 3250, 3340, 1650, 3380, 3290, 1590, 830, 800, 1500, 1000, 800,
  396.         580, 470, 870, 980, 150, 150, 100, 100, 490, 600, 890, 1000, 1090, 840, 910,
  397.         1200, 1030, 1030, 920, 930, 550, 1050, 1050, 950, 650, 450, 550, 850, 950,
  398.         850, 950, 970, 880, 990, 900, 950, 1000, 900, 1000, 900, 2050, 2150, 2130,
  399.         2050, 2130, 2040, 2150, 2040, 2095, 2175, 2080, 2200, 1200, 1040, 940, 1100
  400.     },
  401. #endif
  402.  
  403. #if AC_USE_AMMUNATIONS
  404.     ac_AmmuNationInfo[][] =
  405.     {
  406.         {200, 30}, {600, 30}, {1200, 15},
  407.         {600, 15}, {800, 12}, {1000, 10},
  408.         {500, 60}, {2000, 90}, {3500, 120},
  409.         {4500, 150}, {300, 60}
  410.     },
  411.  
  412.     Float:ac_AmmuNations[][] =
  413.     {
  414.         {296.5541, -38.5138, 1001.5156},
  415.         {295.7008, -80.8109, 1001.5156},
  416.         {290.1963, -109.7721, 1001.5156},
  417.         {312.2592, -166.1385, 999.601}
  418.     },
  419. #endif
  420.  
  421. #if AC_USE_RESTAURANTS
  422.     Float:ac_Restaurants[][] =
  423.     {
  424.         {374.0, -119.641, 1001.4922},
  425.         {368.789, -6.857, 1001.8516},
  426.         {375.566, -68.222, 1001.5151}
  427.     },
  428. #endif
  429.  
  430. #if AC_USE_PAYNSPRAY
  431.     Float:ac_PayNSpray[][] =
  432.     {
  433.         {2064.2842, -1831.4736, 13.5469},
  434.         {-2425.7822, 1021.1392, 50.3977},
  435.         {-1420.5195, 2584.2305, 55.8433},
  436.         {487.6401, -1739.9479, 11.1385},
  437.         {1024.8651, -1024.087, 32.1016},
  438.         {-1904.7019, 284.5968, 41.0469},
  439.         {1975.2384, 2162.5088, 11.0703},
  440.         {2393.4456, 1491.5537, 10.5616},
  441.         {720.0854, -455.2807, 16.3359},
  442.         {-99.9417, 1117.9048, 19.7417}
  443.     },
  444. #endif
  445.  
  446. #if AC_USE_VENDING_MACHINES
  447.     Float:ac_vMachines[][] =
  448.     {
  449.         {-862.82, 1536.6, 21.98},
  450.         {2271.72, -76.46, 25.96},
  451.         {1277.83, 372.51, 18.95},
  452.         {662.42, -552.16, 15.71},
  453.         {201.01, -107.61, 0.89},
  454.         {-253.74, 2597.95, 62.24},
  455.         {-253.74, 2599.75, 62.24},
  456.         {-76.03, 1227.99, 19.12},
  457.         {-14.7, 1175.35, 18.95},
  458.         {-1455.11, 2591.66, 55.23},
  459.         {2352.17, -1357.15, 23.77},
  460.         {2325.97, -1645.13, 14.21},
  461.         {2139.51, -1161.48, 23.35},
  462.         {2153.23, -1016.14, 62.23},
  463.         {1928.73, -1772.44, 12.94},
  464.         {1154.72, -1460.89, 15.15},
  465.         {2480.85, -1959.27, 12.96},
  466.         {2060.11, -1897.64, 12.92},
  467.         {1729.78, -1943.04, 12.94},
  468.         {1634.1, -2237.53, 12.89},
  469.         {1789.21, -1369.26, 15.16},
  470.         {-2229.18, 286.41, 34.7},
  471.         {2319.99, 2532.85, 10.21},
  472.         {2845.72, 1295.04, 10.78},
  473.         {2503.14, 1243.69, 10.21},
  474.         {2647.69, 1129.66, 10.21},
  475.         {-2420.21, 984.57, 44.29},
  476.         {-2420.17, 985.94, 44.29},
  477.         {2085.77, 2071.35, 10.45},
  478.         {1398.84, 2222.6, 10.42},
  479.         {1659.46, 1722.85, 10.21},
  480.         {1520.14, 1055.26, 10.0},
  481.         {-1980.78, 142.66, 27.07},
  482.         {-2118.96, -423.64, 34.72},
  483.         {-2118.61, -422.41, 34.72},
  484.         {-2097.27, -398.33, 34.72},
  485.         {-2092.08, -490.05, 34.72},
  486.         {-2063.27, -490.05, 34.72},
  487.         {-2005.64, -490.05, 34.72},
  488.         {-2034.46, -490.05, 34.72},
  489.         {-2068.56, -398.33, 34.72},
  490.         {-2039.85, -398.33, 34.72},
  491.         {-2011.14, -398.33, 34.72},
  492.         {-1350.11, 492.28, 10.58},
  493.         {-1350.11, 493.85, 10.58},
  494.         {2222.36, 1602.64, 1000.06},
  495.         {2222.2, 1606.77, 1000.05},
  496.         {2155.9, 1606.77, 1000.05},
  497.         {2155.84, 1607.87, 1000.06},
  498.         {2209.9, 1607.19, 1000.05},
  499.         {2202.45, 1617.0, 1000.06},
  500.         {2209.24, 1621.21, 1000.06},
  501.         {2576.7, -1284.43, 1061.09},
  502.         {330.67, 178.5, 1020.07},
  503.         {331.92, 178.5, 1020.07},
  504.         {350.9, 206.08, 1008.47},
  505.         {361.56, 158.61, 1008.47},
  506.         {371.59, 178.45, 1020.07},
  507.         {374.89, 188.97, 1008.47},
  508.         {-19.03, -57.83, 1003.63},
  509.         {-36.14, -57.87, 1003.63},
  510.         {316.87, -140.35, 998.58},
  511.         {2225.2, -1153.42, 1025.9},
  512.         {-15.1, -140.22, 1003.63},
  513.         {-16.53, -140.29, 1003.63},
  514.         {-35.72, -140.22, 1003.63},
  515.         {373.82, -178.14, 1000.73},
  516.         {379.03, -178.88, 1000.73},
  517.         {495.96, -24.32, 1000.73},
  518.         {500.56, -1.36, 1000.73},
  519.         {501.82, -1.42, 1000.73},
  520.         {-33.87, -186.76, 1003.63},
  521.         {-32.44, -186.69, 1003.63},
  522.         {-16.11, -91.64, 1003.63},
  523.         {-17.54, -91.71, 1003.63}
  524.     },
  525. #endif
  526.  
  527. #if AC_USE_CASINOS
  528.     Float:ac_Casinos[][] =
  529.     {
  530.         {2241.2878, 1617.1624, 1006.1797, 2.0},
  531.         {2240.9736, 1604.6592, 1006.1797, 6.0},
  532.         {2242.5427, 1592.8726, 1006.1836, 6.0},
  533.         {2230.2124, 1592.1426, 1006.1832, 6.0},
  534.         {2230.4717, 1604.484, 1006.186, 6.0},
  535.         {2230.3298, 1616.9272, 1006.1799, 3.0},
  536.         {2251.9407, 1586.1736, 1006.186, 1.0},
  537.         {2218.6785, 1587.3448, 1006.1749, 1.0},
  538.         {2219.2773, 1591.7467, 1006.1867, 1.0},
  539.         {2218.5408, 1589.3229, 1006.184, 1.0},
  540.         {2218.6477, 1593.6279, 1006.1797, 1.0},
  541.         {2221.926, 1603.8285, 1006.1797, 1.0},
  542.         {2218.5095, 1603.8385, 1006.1797, 1.0},
  543.         {2219.9597, 1603.9216, 1006.1797, 1.0},
  544.         {2216.3054, 1603.7996, 1006.1819, 1.0},
  545.         {2218.731, 1619.8046, 1006.1794, 1.0},
  546.         {2218.9407, 1617.8413, 1006.1821, 1.0},
  547.         {2218.668, 1615.4681, 1006.1797, 1.0},
  548.         {2218.6418, 1613.2629, 1006.1797, 1.0},
  549.         {2252.4272, 1589.8412, 1006.1797, 5.0},
  550.         {2252.4229, 1596.6169, 1006.1797, 5.0},
  551.         {2255.1565, 1608.8784, 1006.186, 1.0},
  552.         {2254.8496, 1610.8605, 1006.1797, 1.0},
  553.         {2255.2917, 1612.9167, 1006.1797, 1.0},
  554.         {2255.033, 1614.8892, 1006.1797, 1.0},
  555.         {2255.1213, 1616.8284, 1006.1797, 1.0},
  556.         {2255.2161, 1618.8005, 1006.1797, 1.0},
  557.         {2268.5281, 1606.4894, 1006.1797, 1.0},
  558.         {2270.4922, 1606.8539, 1006.1797, 1.0},
  559.         {2272.5693, 1606.4473, 1006.1797, 1.0},
  560.         {2274.5391, 1607.0122, 1006.1797, 1.0},
  561.         {2271.8447, 1586.1633, 1006.1797, 1.0},
  562.         {2261.4844, 1586.1724, 1006.1797, 1.0},
  563.         {2257.4507, 1589.6555, 1006.1797, 5.0},
  564.         {2267.8994, 1589.8672, 1006.1797, 5.0},
  565.         {2262.8486, 1590.026, 1006.1797, 5.0},
  566.         {2272.6458, 1589.7704, 1006.1797, 5.0},
  567.         {2272.6533, 1596.5682, 1006.1797, 5.0},
  568.         {2270.4895, 1596.4606, 1006.1797, 5.0},
  569.         {2265.4441, 1596.4299, 1006.1797, 5.0},
  570.         {2260.0308, 1596.7987, 1006.1797, 5.0},
  571.         {2254.9907, 1596.241, 1006.1797, 5.0},
  572.         {1956.9524, 988.2533, 992.4688, 2.0},
  573.         {1961.6155, 993.0375, 992.4688, 2.0},
  574.         {1963.7998, 998.4406, 992.4745, 2.0},
  575.         {1936.2885, 987.1995, 992.4745, 2.0},
  576.         {1944.9768, 986.3937, 992.4688, 2.0},
  577.         {1940.7397, 990.9521, 992.4609, 2.0},
  578.         {1940.0966, 1005.8996, 992.4688, 6.0},
  579.         {1938.8785, 1014.1768, 992.4688, 6.0},
  580.         {1938.8811, 1021.4434, 992.4688, 6.0},
  581.         {1966.5975, 1006.6469, 992.4745, 6.0},
  582.         {1966.5979, 1014.1024, 992.4688, 6.0},
  583.         {1939.8351, 1029.912, 992.4688, 6.0},
  584.         {1956.854, 1047.3718, 992.4688, 6.0},
  585.         {1961.356, 1042.8112, 992.4688, 6.0},
  586.         {1963.811, 1037.1263, 992.4745, 6.0},
  587.         {1961.733, 1025.8929, 992.4688, 10.0},
  588.         {1961.708, 1010.3194, 992.4688, 10.0},
  589.         {1966.5989, 1029.7954, 992.4745, 6.0},
  590.         {1961.4139, 1017.8281, 992.4688, 10.0},
  591.         {1966.5985, 1021.7686, 992.4688, 6.0},
  592.         {1128.7106, -1.9779, 1000.6797, 1.0},
  593.         {1125.2388, 1.61, 1000.6797, 1.0},
  594.         {1125.1249, -5.0489, 1000.6797, 1.0},
  595.         {1127.4139, 3.0199, 1000.6797, 1.0},
  596.         {1135.0634, -3.8695, 1000.6797, 1.0},
  597.         {1135.0861, 0.6107, 1000.6797, 1.0},
  598.         {1132.8943, -1.7139, 1000.6797, 1.0},
  599.         {1125.3727, 3.0315, 1000.6797, 1.0},
  600.         {1119.0272, -1.4916, 1000.6924, 1.0}
  601.     },
  602. #endif
  603.  
  604. ac_MaxPassengers[] =
  605. {
  606.     0x10331113, 0x11311131, 0x11331313, 0x80133301, 0x1381F110,
  607.     0x10311103, 0x10001F10, 0x11113311, 0x13113311, 0x31101100,
  608.     0x30002301, 0x11031311, 0x11111331, 0x10013111, 0x01131100,
  609.     0x11111110, 0x11100031, 0x11130111, 0x33113311, 0x11111101,
  610.     0x33101133, 0x10100510, 0x03133111, 0xFF11113F, 0x13330111,
  611.     0xFF131111, 0x0000FF3F
  612. },
  613.  
  614. ac_vMods[] =
  615. {
  616.     0x033C2700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x021A27FA, 0x00000000, 0x00FFFE00,
  617.     0x00000007, 0x0003C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  618.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x023B2785, 0x00000000, 0x00FFFE00,
  619.     0x00000007, 0x00000000, 0x00000000, 0x02BC4703, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  620.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  621.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  622.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x03BA278A, 0x00000000, 0x00FFFE00,
  623.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  624.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  625.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  626.     0x028E078A, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  627.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  628.     0x02310744, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  629.     0x00000007, 0x00000000, 0x00000000, 0x0228073A, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  630.     0x02BD4701, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x023A2780, 0x00000000, 0x00FFFE00,
  631.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  632.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  633.     0x00000007, 0x00000000, 0x00000000, 0x0228077A, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  634.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  635.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  636.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  637.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  638.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  639.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  640.     0x027A27CA, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  641.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  642.     0x0282278A, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  643.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  644.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  645.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  646.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  647.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  648.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  649.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  650.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  651.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  652.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  653.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  654.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  655.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  656.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  657.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  658.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  659.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  660.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  661.     0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  662.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  663.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  664.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  665.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  666.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  667.     0x00000007, 0x00000000, 0x00000000, 0x023E07C0, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  668.     0x03703730, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  669.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  670.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  671.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  672.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  673.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  674.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  675.     0x00000007, 0x00000000, 0x00000000, 0x031D2775, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  676.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02BE4788, 0x00000000, 0x00FFFE00,
  677.     0x00000007, 0x0003C000, 0x00000000, 0x02010771, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  678.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  679.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  680.     0x029A0FCE, 0x00000000, 0x00FFFE00, 0x00000007, 0x0000C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  681.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  682.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x03382700, 0x00000000, 0x00FFFE00,
  683.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  684.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  685.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  686.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  687.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  688.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  689.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  690.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  691.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  692.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  693.     0x00000007, 0x00000000, 0x00000000, 0x023F8795, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  694.     0x029F078C, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000, 0x029627EA, 0x00000000, 0x00FFFE00,
  695.     0x00000007, 0x0003C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  696.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  697.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  698.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  699.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  700.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x0236C782, 0x00000000, 0x00FFFE00,
  701.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  702.     0x029E1FCA, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  703.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  704.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  705.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0xFC000437, 0x00000000, 0x021C0000,
  706.     0x02000700, 0x00000000, 0x00FFFE00, 0x03FE6007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  707.     0x00001B87, 0x00000001, 0x01E00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  708.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  709.     0x00000007, 0x00000000, 0x00000000, 0x039E07D2, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  710.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x023CC700, 0x00000000, 0x00FFFE00,
  711.     0x00000007, 0x00030000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  712.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  713.     0x00000007, 0x00000000, 0x00000000, 0x038E07D6, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  714.     0x023D0709, 0x00000000, 0x00FFFE00, 0x00000007, 0x0000C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  715.     0x00000007, 0x00000000, 0x00000000, 0x029E1F8A, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  716.     0x029C077A, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000, 0x02BD076C, 0x00000000, 0x00FFFE00,
  717.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  718.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  719.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  720.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  721.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0xFFFFFE00, 0x00000007, 0x00000000, 0x000001F8,
  722.     0x02000700, 0x00000000, 0x00FFFFFE, 0x00000007, 0xC0000000, 0x00002007, 0xFE000700, 0x00000003, 0x00FFFE00,
  723.     0x00000007, 0x00003C00, 0x00000600, 0xCE000700, 0xFF800000, 0x00FFFE01, 0x00000007, 0x3C000000, 0x00000000,
  724.     0x02000700, 0x000003FC, 0x00FFFE00, 0x00000007, 0x003C0000, 0x00001800, 0x02000700, 0x00000000, 0x00FFFE00,
  725.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  726.     0x02000700, 0x007FE000, 0x00FFFE00, 0x00000007, 0x03C00000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  727.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000047, 0x0000003E, 0x3C000000,
  728.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  729.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  730.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  731.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  732.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00001C00, 0x00FFFE00,
  733.     0x0000000F, 0x00000000, 0x0003C000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x000003C0, 0xC0000000,
  734.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  735.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  736.     0x029607C2, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  737.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  738.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  739.     0x00000007, 0x00000000, 0x00000000, 0x03FFE7CF, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  740.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  741.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  742.     0x031727F1, 0x00000000, 0x00FFFE00, 0x00000007, 0x00030000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  743.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  744.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  745.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  746.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  747.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  748.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  749.     0x00000007, 0x00000000, 0x00000000, 0x025627F0, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  750.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  751.     0x00000007, 0x00000000, 0x00000000, 0x039E07C2, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  752.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  753.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  754.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  755.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  756.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  757.     0x00000007, 0x00000000, 0x00000000
  758. };
  759.  
  760. static stock const Float:ac_wMinRange[] =
  761. {
  762.     25.0, 25.0, 25.0, 30.0, 25.0, 35.0,
  763.     25.0, 35.0, 40.0, 40.0, 25.0, 55.0,
  764.     50.0, 50.0, 50.0, 4.0, 65.0
  765. };
  766.  
  767. enum acInfo
  768. {
  769.     Float:acPosX,
  770.     Float:acPosY,
  771.     Float:acPosZ,
  772.     Float:acDropJpX,
  773.     Float:acDropJpY,
  774.     Float:acDropJpZ,
  775.     Float:acSpawnPosX,
  776.     Float:acSpawnPosY,
  777.     Float:acSpawnPosZ,
  778.     Float:acSetVehHealth,
  779.     Float:acLastPosX,
  780.     Float:acLastPosY,
  781.     Float:acSetPosX,
  782.     Float:acSetPosY,
  783.     Float:acSetPosZ,
  784.     acSpeed,
  785.     acHealth,
  786.     acArmour,
  787.     acMoney,
  788.     acLastShot,
  789.     acLastWeapon,
  790.     acEnterSeat,
  791.     acEnterVeh,
  792.     acKickVeh,
  793.     acVeh,
  794.     acSeat,
  795.     acDialog,
  796.     acNextDialog,
  797.     acInt,
  798.     acAnim,
  799.     acDmgRes,
  800.     acSpecAct,
  801.     acNextSpecAct,
  802.     acLastSpecAct,
  803.     acLastPickup,
  804.     acReloadTick,
  805.     acShotTick,
  806.     acSpawnTick,
  807.     acTimerTick,
  808.     acSetPosTick,
  809.     acUpdateTick,
  810.     acEnterVehTick,
  811.     acSpawnWeapon1,
  812.     acSpawnWeapon2,
  813.     acSpawnWeapon3,
  814.     acSpawnAmmo1,
  815.     acSpawnAmmo2,
  816.     acSpawnAmmo3,
  817.     acSpawnRes,
  818.     acTimerID,
  819.     acKickTimerID,
  820.     acParachute,
  821.     acIntRet,
  822.     acKicked,
  823.     acIp[16],
  824.     acSet[13],
  825.     acGtc[20],
  826.     acWeapon[13],
  827.     acAmmo[13],
  828.     acSetWeapon[13],
  829.     acGiveAmmo[13],
  830.     acGtcSetWeapon[13],
  831.     acGtcGiveAmmo[13],
  832.     acNOPCount[12],
  833.     acCheatCount[22],
  834.     acCall[sizeof ac_Mtfc],
  835.     acFloodCount[sizeof ac_Mtfc],
  836.     bool:acNOPAllow[sizeof ac_NOPAllow],
  837.     bool:acACAllow[sizeof ac_ACAllow],
  838.     bool:acStuntBonus,
  839.     bool:acModShop,
  840.     bool:acUnFrozen,
  841.     bool:acOnline,
  842.     bool:acDeathRes,
  843.     bool:acVehDmgRes,
  844.     bool:acSpawned,
  845.     bool:acDead,
  846.     bool:acTpToZ,
  847.     bool:acIntEnterExits,
  848.     bool:acSpec
  849. }
  850.  
  851. enum acVehInfo
  852. {
  853.     Float:acVelX,
  854.     Float:acVelY,
  855.     Float:acVelZ,
  856.     Float:acPosX,
  857.     Float:acPosY,
  858.     Float:acPosZ,
  859.     Float:acSpawnPosX,
  860.     Float:acSpawnPosY,
  861.     Float:acSpawnPosZ,
  862.     Float:acSpawnZAngle,
  863.     Float:acPosDiff,
  864.     Float:acZAngle,
  865.     Float:acHealth,
  866.     acLastSpeed,
  867.     acSpeedDiff,
  868.     acDriver,
  869.     acInt,
  870.     acPaintJob,
  871.     bool:acSpawned
  872. }
  873.  
  874. enum acPickInfo
  875. {
  876.     Float:acPosX,
  877.     Float:acPosY,
  878.     Float:acPosZ,
  879.     acType,
  880.     acWeapon
  881. }
  882.  
  883. static
  884.     Float:ac_ClassPos[AC_MAX_CLASSES][3],
  885.     ac_ClassWeapon[AC_MAX_CLASSES][3],
  886.     ac_ClassAmmo[AC_MAX_CLASSES][3],
  887.  
  888.     #if AC_USE_STATISTICS
  889.         ac_sInfo[6],
  890.     #endif
  891.  
  892.     ACInfo[MAX_PLAYERS][acInfo],
  893.     ACVehInfo[MAX_VEHICLES][acVehInfo],
  894.     ACPickInfo[MAX_PICKUPS][acPickInfo],
  895.  
  896.     bool:ac_IntEnterExits = true,
  897.     bool:ac_StuntBonus = true,
  898.     bool:ac_LagCompMode,
  899.     #if !AC_USE_QUERY
  900.         bool:ac_QueryEnable,
  901.     #endif
  902.     bool:ac_RconEnable,
  903.     bool:ac_PedAnims;
  904.  
  905. static stock bool:ac_VehFriendlyFire;
  906.  
  907. ac_fpublic ac_AddStaticVehicle(vehicleid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle)
  908. {
  909.     ACVehInfo[vehicleid][acInt] =
  910.     ACVehInfo[vehicleid][acLastSpeed] =
  911.     ACVehInfo[vehicleid][acSpeedDiff] = 0;
  912.     ACVehInfo[vehicleid][acPaintJob] = 3;
  913.     ACVehInfo[vehicleid][acSpawned] = true;
  914.     ACVehInfo[vehicleid][acHealth] = 1000.0;
  915.     ACVehInfo[vehicleid][acPosDiff] =
  916.     ACVehInfo[vehicleid][acVelX] =
  917.     ACVehInfo[vehicleid][acVelY] =
  918.     ACVehInfo[vehicleid][acVelZ] = 0.0;
  919.     ACVehInfo[vehicleid][acSpawnPosX] =
  920.     ACVehInfo[vehicleid][acPosX] = spawn_x;
  921.     ACVehInfo[vehicleid][acSpawnPosY] =
  922.     ACVehInfo[vehicleid][acPosY] = spawn_y;
  923.     ACVehInfo[vehicleid][acSpawnPosZ] =
  924.     ACVehInfo[vehicleid][acPosZ] = spawn_z;
  925.     ACVehInfo[vehicleid][acSpawnZAngle] =
  926.     ACVehInfo[vehicleid][acZAngle] = z_angle;
  927.     ACVehInfo[vehicleid][acDriver] = INVALID_PLAYER_ID;
  928.     return 1;
  929. }
  930.  
  931. ac_fpublic ac_CreateVehicle(vehicleid, ac_vehicletype, Float:x, Float:y, Float:z, Float:rotation)
  932. {
  933.     ACVehInfo[vehicleid][acInt] =
  934.     ACVehInfo[vehicleid][acLastSpeed] =
  935.     ACVehInfo[vehicleid][acSpeedDiff] = 0;
  936.     ACVehInfo[vehicleid][acPaintJob] = 3;
  937.     ACVehInfo[vehicleid][acHealth] = 1000.0;
  938.     ACVehInfo[vehicleid][acPosDiff] =
  939.     ACVehInfo[vehicleid][acVelX] =
  940.     ACVehInfo[vehicleid][acVelY] =
  941.     ACVehInfo[vehicleid][acVelZ] = 0.0;
  942.     ACVehInfo[vehicleid][acSpawnPosX] =
  943.     ACVehInfo[vehicleid][acPosX] = x;
  944.     ACVehInfo[vehicleid][acSpawnPosY] =
  945.     ACVehInfo[vehicleid][acPosY] = y;
  946.     ACVehInfo[vehicleid][acSpawnPosZ] =
  947.     ACVehInfo[vehicleid][acPosZ] = z;
  948.     ACVehInfo[vehicleid][acSpawnZAngle] =
  949.     ACVehInfo[vehicleid][acZAngle] = rotation;
  950.     if(!ac_IsATrainCarriage(ac_vehicletype)) ACVehInfo[vehicleid][acSpawned] = true;
  951.     ACVehInfo[vehicleid][acDriver] = INVALID_PLAYER_ID;
  952.     return 1;
  953. }
  954.  
  955. 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)
  956. {
  957.     if(0 <= ac_classid < AC_MAX_CLASSES)
  958.     {
  959.         #undef AC_MAX_CLASSES
  960.         ac_ClassPos[ac_classid][0] = ac_spawn_x;
  961.         ac_ClassPos[ac_classid][1] = ac_spawn_y;
  962.         ac_ClassPos[ac_classid][2] = ac_spawn_z;
  963.         ac_ClassWeapon[ac_classid][0] = ac_weapon1;
  964.         ac_ClassAmmo[ac_classid][0] = ac_weapon1_ammo;
  965.         ac_ClassWeapon[ac_classid][1] = ac_weapon2;
  966.         ac_ClassAmmo[ac_classid][1] = ac_weapon2_ammo;
  967.         ac_ClassWeapon[ac_classid][2] = ac_weapon3;
  968.         ac_ClassAmmo[ac_classid][2] = ac_weapon3_ammo;
  969.     }
  970.     return 1;
  971. }
  972.  
  973. 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)
  974. {
  975.     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;
  976.     ACInfo[playerid][acSpawnPosX] = ac_x;
  977.     ACInfo[playerid][acSpawnPosY] = ac_y;
  978.     ACInfo[playerid][acSpawnPosZ] = ac_z;
  979.     ACInfo[playerid][acSpawnWeapon1] = ac_weapon1;
  980.     ACInfo[playerid][acSpawnAmmo1] = ac_weapon1_ammo;
  981.     ACInfo[playerid][acSpawnWeapon2] = ac_weapon2;
  982.     ACInfo[playerid][acSpawnAmmo2] = ac_weapon2_ammo;
  983.     ACInfo[playerid][acSpawnWeapon3] = ac_weapon3;
  984.     ACInfo[playerid][acSpawnAmmo3] = ac_weapon3_ammo;
  985.     return 1;
  986. }
  987.  
  988. ac_fpublic ac_AddStaticPickup(pickupid, ac_model, ac_type, Float:ac_X, Float:ac_Y, Float:ac_Z)
  989. {
  990.     #if AC_USE_PICKUP_WEAPONS
  991.         ACPickInfo[pickupid][acWeapon] = 0;
  992.         switch(ac_type)
  993.         {
  994.             case 2, 3, 15, 22:
  995.             {
  996.                 switch(ac_model)
  997.                 {
  998.                     case 370: ACPickInfo[pickupid][acType] = 1;
  999.                     case 1240: ACPickInfo[pickupid][acType] = 2;
  1000.                     case 1242: ACPickInfo[pickupid][acType] = 3;
  1001.                     case 321..326, 331, 333..339, 341..353, 355..369, 371, 372:
  1002.                     {
  1003.                         for(new ac_i = 46; ac_i >= 1; --ac_i)
  1004.                         {
  1005.                             if(ac_wModel[ac_i] == ac_model)
  1006.                             {
  1007.                                 ACPickInfo[pickupid][acType] = 4;
  1008.                                 ACPickInfo[pickupid][acWeapon] = ac_i;
  1009.                                 break;
  1010.                             }
  1011.                         }
  1012.                     }
  1013.                 }
  1014.             }
  1015.         }
  1016.     #endif
  1017.     ACPickInfo[pickupid][acPosX] = ac_X;
  1018.     ACPickInfo[pickupid][acPosY] = ac_Y;
  1019.     ACPickInfo[pickupid][acPosZ] = ac_Z;
  1020.     return 1;
  1021. }
  1022.  
  1023. ac_fpublic ac_CreatePickup(pickupid, ac_model, ac_type, Float:ac_X, Float:ac_Y, Float:ac_Z)
  1024. {
  1025.     #if AC_USE_PICKUP_WEAPONS
  1026.         ACPickInfo[pickupid][acWeapon] = 0;
  1027.         switch(ac_type)
  1028.         {
  1029.             case 2, 3, 15, 22:
  1030.             {
  1031.                 switch(ac_model)
  1032.                 {
  1033.                     case 370: ACPickInfo[pickupid][acType] = 1;
  1034.                     case 1240: ACPickInfo[pickupid][acType] = 2;
  1035.                     case 1242: ACPickInfo[pickupid][acType] = 3;
  1036.                     case 321..326, 331, 333..339, 341..353, 355..369, 371, 372:
  1037.                     {
  1038.                         for(new ac_i = 46; ac_i >= 1; --ac_i)
  1039.                         {
  1040.                             if(ac_wModel[ac_i] == ac_model)
  1041.                             {
  1042.                                 ACPickInfo[pickupid][acType] = 4;
  1043.                                 ACPickInfo[pickupid][acWeapon] = ac_i;
  1044.                                 break;
  1045.                             }
  1046.                         }
  1047.                     }
  1048.                 }
  1049.             }
  1050.         }
  1051.     #endif
  1052.     ACPickInfo[pickupid][acPosX] = ac_X;
  1053.     ACPickInfo[pickupid][acPosY] = ac_Y;
  1054.     ACPickInfo[pickupid][acPosZ] = ac_Z;
  1055.     return 1;
  1056. }
  1057.  
  1058. #if AC_USE_PICKUP_WEAPONS\
  1059.     && defined Streamer_SetIntData
  1060.     #if defined STREAMER_ENABLE_TAGS
  1061.         ac_fpublic ac_CreateDynamicPickup(STREAMER_TAG_PICKUP:pickupid, ac_modelid, ac_type)
  1062.     #else
  1063.         ac_fpublic ac_CreateDynamicPickup(pickupid, ac_modelid, ac_type)
  1064.     #endif
  1065.     {
  1066.         Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, 0);
  1067.         switch(ac_type)
  1068.         {
  1069.             case 2, 3, 15, 22:
  1070.             {
  1071.                 switch(ac_modelid)
  1072.                 {
  1073.                     case 370: Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, 1);
  1074.                     case 1240: Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, 2);
  1075.                     case 1242: Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, 3);
  1076.                     case 321..326, 331, 333..339, 341..353, 355..369, 371, 372:
  1077.                     {
  1078.                         for(new ac_i = 46; ac_i >= 1; --ac_i)
  1079.                         {
  1080.                             if(ac_wModel[ac_i] == ac_modelid)
  1081.                             {
  1082.                                 Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, ac_i + 100);
  1083.                                 break;
  1084.                             }
  1085.                         }
  1086.                     }
  1087.                 }
  1088.             }
  1089.         }
  1090.         return 1;
  1091.     }
  1092. #endif
  1093.  
  1094. #if defined Streamer_UpdateEx
  1095.     stock ac_Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, type = -1, compensatedtime = -1, freezeplayer = 1)
  1096.     {
  1097.         if(!Streamer_UpdateEx(playerid, x, y, z, worldid, interiorid, type, compensatedtime, freezeplayer)) return 0;
  1098.         if(compensatedtime >= 0)
  1099.         {
  1100.             ACInfo[playerid][acSet][8] = 4;
  1101.             ACInfo[playerid][acNOPCount][10] = 0;
  1102.             ACInfo[playerid][acSetPosX] = x;
  1103.             ACInfo[playerid][acSetPosY] = y;
  1104.             ACInfo[playerid][acSetPosZ] = z;
  1105.             ACInfo[playerid][acSetPosTick] =
  1106.             ACInfo[playerid][acGtc][11] = GetTickCount() + 3250;
  1107.         }
  1108.         return 1;
  1109.     }
  1110.  
  1111.     #if defined _ALS_Streamer_UpdateEx
  1112.         #undef Streamer_UpdateEx
  1113.     #else
  1114.         #define _ALS_Streamer_UpdateEx
  1115.     #endif
  1116.     #define Streamer_UpdateEx ac_Streamer_UpdateEx
  1117. #endif
  1118.  
  1119. stock ac_GetPlayerVersion(playerid, version[], len)
  1120. {
  1121.     new ac_ret = GetPlayerVersion(playerid, version, len);
  1122.     for(new ac_i = ac_ret - 1; ac_i >= 0; --ac_i)
  1123.     {
  1124.         if(version[ac_i] == '%')
  1125.         {
  1126.             strdel(version, ac_i, ac_i + 1);
  1127.             ac_ret--;
  1128.         }
  1129.     }
  1130.     return ac_ret;
  1131. }
  1132.  
  1133. #if defined _ALS_GetPlayerVersion
  1134.     #undef GetPlayerVersion
  1135. #else
  1136.     #define _ALS_GetPlayerVersion
  1137. #endif
  1138. #define GetPlayerVersion ac_GetPlayerVersion
  1139.  
  1140. stock ac_GetPlayerFacingAngle(playerid, &Float:ang)
  1141. {
  1142.     if(!GetPlayerFacingAngle(playerid, ang)) return 0;
  1143.     if(ang != ang) ang = 0.0;
  1144.     ang = ac_AbsoluteAngle(ang);
  1145.     return 1;
  1146. }
  1147.  
  1148. #if defined _ALS_GetPlayerFacingAngle
  1149.     #undef GetPlayerFacingAngle
  1150. #else
  1151.     #define _ALS_GetPlayerFacingAngle
  1152. #endif
  1153. #define GetPlayerFacingAngle ac_GetPlayerFacingAngle
  1154.  
  1155. stock ac_GetVehicleZAngle(vehicleid, &Float:z_angle)
  1156. {
  1157.     if(!GetVehicleZAngle(vehicleid, z_angle)) return 0;
  1158.     if(z_angle != z_angle) z_angle = 0.0;
  1159.     z_angle = ac_AbsoluteAngle(z_angle);
  1160.     #undef ac_AbsoluteAngle
  1161.     return 1;
  1162. }
  1163.  
  1164. #if defined _ALS_GetVehicleZAngle
  1165.     #undef GetVehicleZAngle
  1166. #else
  1167.     #define _ALS_GetVehicleZAngle
  1168. #endif
  1169. #define GetVehicleZAngle ac_GetVehicleZAngle
  1170.  
  1171. ac_fpublic ac_DestroyVehicle(vehicleid)
  1172. {
  1173.     if(!DestroyVehicle(vehicleid)) return 0;
  1174.     ACVehInfo[vehicleid][acSpawned] = false;
  1175.     return 1;
  1176. }
  1177.  
  1178. ac_fpublic ac_DestroyPickup(pickupid)
  1179. {
  1180.     if(!DestroyPickup(pickupid)) return 0;
  1181.     ACPickInfo[pickupid][acType] = 0;
  1182.     return 1;
  1183. }
  1184.  
  1185. ac_fpublic ac_DisableInteriorEnterExits()
  1186. {
  1187.     ac_IntEnterExits = false;
  1188.     return DisableInteriorEnterExits();
  1189. }
  1190.  
  1191. ac_fpublic ac_UsePlayerPedAnims()
  1192. {
  1193.     ac_PedAnims = true;
  1194.     return UsePlayerPedAnims();
  1195. }
  1196.  
  1197. #if defined EnableVehicleFriendlyFire
  1198.     ac_fpublic ac_EnableVehicleFriendlyFire()
  1199.     {
  1200.         ac_VehFriendlyFire = true;
  1201.         return EnableVehicleFriendlyFire();
  1202.     }
  1203. #endif
  1204.  
  1205. ac_fpublic ac_EnableStuntBonusForAll(enable)
  1206. {
  1207.     ac_StuntBonus = !!enable;
  1208.     #if defined foreach
  1209.         foreach(new ac_i : Player) ACInfo[ac_i][acStuntBonus] = ac_StuntBonus;
  1210.     #else
  1211.         #if defined GetPlayerPoolSize
  1212.             for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1213.         #else
  1214.             for(new ac_i = MAX_PLAYERS - 1; ac_i >= 0; --ac_i)
  1215.         #endif
  1216.         {
  1217.             if(IsPlayerConnected(ac_i)) ACInfo[ac_i][acStuntBonus] = ac_StuntBonus;
  1218.         }
  1219.     #endif
  1220.     return EnableStuntBonusForAll(enable);
  1221. }
  1222.  
  1223. ac_fpublic ac_EnableStuntBonusForPlayer(playerid, enable)
  1224. {
  1225.     if(!EnableStuntBonusForPlayer(playerid, enable)) return 0;
  1226.     ACInfo[playerid][acStuntBonus] = !!enable;
  1227.     return 1;
  1228. }
  1229.  
  1230. ac_fpublic ac_ShowPlayerDialog(playerid, ac_dialogid)
  1231. {
  1232.     ACInfo[playerid][acDialog] = ac_dialogid;
  1233.     return 1;
  1234. }
  1235.  
  1236. ac_fpublic ac_fs_ShowPlayerDialog(playerid, ac_dialogid)
  1237. {
  1238.     ACInfo[playerid][acNextDialog] = ac_dialogid;
  1239.     return 1;
  1240. }
  1241.  
  1242. ac_fpublic ac_TogglePlayerControllable(playerid, toggle)
  1243. {
  1244.     if(!TogglePlayerControllable(playerid, toggle)) return 0;
  1245.     ACInfo[playerid][acUnFrozen] = !!toggle;
  1246.     return 1;
  1247. }
  1248.  
  1249. ac_fpublic ac_TogglePlayerSpectating(playerid, toggle)
  1250. {
  1251.     if(!TogglePlayerSpectating(playerid, toggle)) return 0;
  1252.     if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING || ACInfo[playerid][acSet][6] != -1)
  1253.     {
  1254.         if(!toggle)
  1255.         {
  1256.             if(ACInfo[playerid][acDead]) ACInfo[playerid][acSet][7] = 4;
  1257.             else
  1258.             {
  1259.                 ACInfo[playerid][acSet][3] =
  1260.                 ACInfo[playerid][acSet][4] =
  1261.                 ACInfo[playerid][acSet][6] =
  1262.                 ACInfo[playerid][acSet][8] =
  1263.                 ACInfo[playerid][acSet][9] =
  1264.                 ACInfo[playerid][acNextSpecAct] = -1;
  1265.                 for(new ac_i = 12; ac_i >= 0; --ac_i)
  1266.                 {
  1267.                     ACInfo[playerid][acSetWeapon][ac_i] = -1;
  1268.                     ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  1269.                 }
  1270.                 ACInfo[playerid][acTpToZ] = false;
  1271.                 ACInfo[playerid][acUnFrozen] = true;
  1272.                 ACInfo[playerid][acSet][7] = 1;
  1273.             }
  1274.             ACInfo[playerid][acSpawnRes]++;
  1275.             ACInfo[playerid][acSpec] = false;
  1276.             ACInfo[playerid][acSpawnTick] = ACInfo[playerid][acNOPCount][9] = 0;
  1277.             ACInfo[playerid][acGtc][13] = GetTickCount() + 2650;
  1278.         }
  1279.     }
  1280.     else if(toggle)
  1281.     {
  1282.         ACInfo[playerid][acSet][6] = 1;
  1283.         ACInfo[playerid][acNOPCount][8] = 0;
  1284.         ACInfo[playerid][acGtc][12] = GetTickCount() + 2650;
  1285.     }
  1286.     return 1;
  1287. }
  1288.  
  1289. ac_fpublic ac_SpawnPlayer(playerid)
  1290. {
  1291.     if(!SpawnPlayer(playerid)) return 0;
  1292.     if(ACInfo[playerid][acDead]) ACInfo[playerid][acSet][7] = 5;
  1293.     else
  1294.     {
  1295.         ACInfo[playerid][acSet][3] =
  1296.         ACInfo[playerid][acSet][4] =
  1297.         ACInfo[playerid][acSet][8] =
  1298.         ACInfo[playerid][acSet][9] =
  1299.         ACInfo[playerid][acNextSpecAct] = -1;
  1300.         for(new ac_i = 12; ac_i >= 0; --ac_i)
  1301.         {
  1302.             ACInfo[playerid][acSetWeapon][ac_i] = -1;
  1303.             ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  1304.         }
  1305.         ACInfo[playerid][acTpToZ] = false;
  1306.         ACInfo[playerid][acUnFrozen] = true;
  1307.         ACInfo[playerid][acSet][7] = 2;
  1308.     }
  1309.     ACInfo[playerid][acSpawnRes]++;
  1310.     ACInfo[playerid][acSpawnTick] = ACInfo[playerid][acNOPCount][9] = 0;
  1311.     ACInfo[playerid][acGtc][13] = GetTickCount() + 2650;
  1312.     return 1;
  1313. }
  1314.  
  1315. ac_fpublic ac_SetPlayerHealth(playerid, Float:ac_health)
  1316. {
  1317.     if(!SetPlayerHealth(playerid, ac_health)) return 0;
  1318.     if(ac_health < 0.0) ac_health = 0.0;
  1319.     ACInfo[playerid][acNOPCount][3] = 0;
  1320.     ACInfo[playerid][acSet][1] = floatround(ac_health, floatround_tozero);
  1321.     ACInfo[playerid][acGtc][3] = GetTickCount() + 2650;
  1322.     return 1;
  1323. }
  1324.  
  1325. ac_fpublic ac_SetPlayerArmour(playerid, Float:ac_armour)
  1326. {
  1327.     if(!SetPlayerArmour(playerid, ac_armour)) return 0;
  1328.     if(ac_armour < 0.0) ac_armour = 0.0;
  1329.     ACInfo[playerid][acNOPCount][5] = 0;
  1330.     ACInfo[playerid][acSet][2] = floatround(ac_armour, floatround_tozero);
  1331.     ACInfo[playerid][acGtc][5] = GetTickCount() + 2650;
  1332.     return 1;
  1333. }
  1334.  
  1335. ac_fpublic ac_GivePlayerWeapon(playerid, ac_weaponid, ac_ammo)
  1336. {
  1337.     if(ac_IsValidWeapon(ac_weaponid))
  1338.     {
  1339.         new ac_s = ac_wSlot[ac_weaponid];
  1340.         ACInfo[playerid][acNOPCount][0] = ACInfo[playerid][acNOPCount][1] = 0;
  1341.         if(16 <= ac_weaponid <= 18 || 22 <= ac_weaponid <= 43)
  1342.         {
  1343.             if(3 <= ac_s <= 5 || (ACInfo[playerid][acSetWeapon][ac_s] == -1
  1344.             ? ACInfo[playerid][acWeapon][ac_s] : ACInfo[playerid][acSetWeapon][ac_s]) == ac_weaponid)
  1345.             {
  1346.                 if(ACInfo[playerid][acGiveAmmo][ac_s] != -65535) ACInfo[playerid][acGiveAmmo][ac_s] += ac_ammo;
  1347.                 else ACInfo[playerid][acGiveAmmo][ac_s] = ACInfo[playerid][acAmmo][ac_s] + ac_ammo;
  1348.             }
  1349.             else ACInfo[playerid][acGiveAmmo][ac_s] = ac_ammo;
  1350.             if(ACInfo[playerid][acGiveAmmo][ac_s] < -32768) ac_ammo = ACInfo[playerid][acGiveAmmo][ac_s] = -32768;
  1351.             else if(ACInfo[playerid][acGiveAmmo][ac_s] > 32767) ac_ammo = ACInfo[playerid][acGiveAmmo][ac_s] = 32767;
  1352.             ACInfo[playerid][acReloadTick] = 0;
  1353.         }
  1354.         else ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  1355.         ACInfo[playerid][acSetWeapon][ac_s] = ACInfo[playerid][acSet][3] = ac_weaponid;
  1356.         ACInfo[playerid][acGtcGiveAmmo][ac_s] =
  1357.         ACInfo[playerid][acGtcSetWeapon][ac_s] =
  1358.         ACInfo[playerid][acGtc][2] = GetTickCount() + 2650;
  1359.     }
  1360.     return GivePlayerWeapon(playerid, ac_weaponid, ac_ammo);
  1361. }
  1362.  
  1363. ac_fpublic ac_SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo)
  1364. {
  1365.     if(ac_ammo < -32768) ac_ammo = -32768;
  1366.     else if(ac_ammo > 32767) ac_ammo = 32767;
  1367.     if(16 <= ac_weaponslot <= 43)
  1368.     {
  1369.         new ac_s = ac_wSlot[ac_weaponslot];
  1370.         if(ACInfo[playerid][acWeapon][ac_s] > 0 || ACInfo[playerid][acSetWeapon][ac_s] > 0)
  1371.         {
  1372.             ACInfo[playerid][acNOPCount][1] = 0;
  1373.             ACInfo[playerid][acGiveAmmo][ac_s] = ac_ammo;
  1374.             ACInfo[playerid][acGtcGiveAmmo][ac_s] = GetTickCount() + 2650;
  1375.         }
  1376.     }
  1377.     return SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo);
  1378. }
  1379.  
  1380. ac_fpublic ac_SetPlayerArmedWeapon(playerid, ac_weaponid)
  1381. {
  1382.     if(!SetPlayerArmedWeapon(playerid, ac_weaponid)) return 0;
  1383.     if(ac_IsValidWeapon(ac_weaponid))
  1384.     {
  1385.         new ac_s = ac_wSlot[ac_weaponid];
  1386.         if((ac_weaponid == ACInfo[playerid][acWeapon][ac_s] || ac_weaponid == ACInfo[playerid][acSetWeapon][ac_s]) &&
  1387.         (ACInfo[playerid][acAmmo][ac_s] != 0 || ACInfo[playerid][acGiveAmmo][ac_s] != 0))
  1388.         {
  1389.             ACInfo[playerid][acNOPCount][0] = 0;
  1390.             ACInfo[playerid][acSet][3] = ac_weaponid;
  1391.             ACInfo[playerid][acGtc][2] = GetTickCount() + 2650;
  1392.         }
  1393.     }
  1394.     return 1;
  1395. }
  1396.  
  1397. ac_fpublic ac_ResetPlayerWeapons(playerid)
  1398. {
  1399.     if(!ResetPlayerWeapons(playerid)) return 0;
  1400.     for(new ac_i = 12; ac_i >= 0; --ac_i)
  1401.     {
  1402.         ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acAmmo][ac_i] = 0;
  1403.         ACInfo[playerid][acSetWeapon][ac_i] = -1;
  1404.         ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  1405.     }
  1406.     ACInfo[playerid][acSet][3] = -1;
  1407.     ACInfo[playerid][acGtc][7] = GetTickCount() + 2650;
  1408.     return 1;
  1409. }
  1410.  
  1411. ac_fpublic ac_GivePlayerMoney(playerid, ac_money)
  1412. {
  1413.     if(!GivePlayerMoney(playerid, ac_money)) return 0;
  1414.     ACInfo[playerid][acNOPCount][11] = AC_MAX_MONEY_WARNINGS;
  1415.     ACInfo[playerid][acMoney] += ac_money;
  1416.     #undef AC_MAX_MONEY_WARNINGS
  1417.     return 1;
  1418. }
  1419.  
  1420. ac_fpublic ac_ResetPlayerMoney(playerid)
  1421. {
  1422.     if(!ResetPlayerMoney(playerid)) return 0;
  1423.     ACInfo[playerid][acNOPCount][11] = 0;
  1424.     ACInfo[playerid][acMoney] = 0;
  1425.     return 1;
  1426. }
  1427.  
  1428. ac_fpublic ac_GetPlayerMoney(playerid) return ACInfo[playerid][acMoney];
  1429.  
  1430. ac_fpublic ac_SetPlayerSpecialAction(playerid, ac_actionid)
  1431. {
  1432.     if(!SetPlayerSpecialAction(playerid, ac_actionid)) return 0;
  1433.     if(ac_actionid == SPECIAL_ACTION_USEJETPACK || SPECIAL_ACTION_CUFFED <= ac_actionid <= 25 ||
  1434.     (ac_actionid == SPECIAL_ACTION_USECELLPHONE || ac_actionid == 68 || SPECIAL_ACTION_DANCE1 <= ac_actionid <= SPECIAL_ACTION_DANCE4) && ACInfo[playerid][acVeh] == 0 ||
  1435.     ac_actionid == SPECIAL_ACTION_STOPUSECELLPHONE && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_USECELLPHONE ||
  1436.     (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 ||
  1437.     ac_actionid == SPECIAL_ACTION_NONE && ACInfo[playerid][acSpecAct] != SPECIAL_ACTION_DUCK &&
  1438.     ACInfo[playerid][acSpecAct] != SPECIAL_ACTION_ENTER_VEHICLE && ACInfo[playerid][acSpecAct] != SPECIAL_ACTION_HANDSUP)
  1439.     {
  1440.         ACInfo[playerid][acNOPCount][6] = 0;
  1441.         if((ac_actionid == 68 || SPECIAL_ACTION_HANDSUP <= ac_actionid <= SPECIAL_ACTION_USECELLPHONE || SPECIAL_ACTION_DRINK_BEER <= ac_actionid <= 25) &&
  1442.         SPECIAL_ACTION_DANCE1 <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_DANCE4 ||
  1443.         SPECIAL_ACTION_DRINK_BEER <= ac_actionid <= 25 && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_DUCK ||
  1444.         (ac_actionid == SPECIAL_ACTION_NONE || SPECIAL_ACTION_CUFFED <= ac_actionid <= 25) && ACInfo[playerid][acVeh] ||
  1445.         SPECIAL_ACTION_CUFFED <= ac_actionid <= 25 && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_ENTER_VEHICLE) ACInfo[playerid][acNextSpecAct] = ac_actionid;
  1446.         else
  1447.         {
  1448.             if(ac_actionid == SPECIAL_ACTION_STOPUSECELLPHONE) ac_actionid = SPECIAL_ACTION_NONE;
  1449.             else if(ac_actionid == SPECIAL_ACTION_USEJETPACK || ac_actionid == SPECIAL_ACTION_HANDSUP ||
  1450.             ac_actionid == 68 || SPECIAL_ACTION_DANCE1 <= ac_actionid <= SPECIAL_ACTION_DANCE4 ||
  1451.             SPECIAL_ACTION_DRINK_BEER <= ac_actionid <= SPECIAL_ACTION_DRINK_SPRUNK) ACInfo[playerid][acNextSpecAct] = ACInfo[playerid][acSpecAct];
  1452.             else ACInfo[playerid][acNextSpecAct] = -1;
  1453.             ACInfo[playerid][acSet][4] = ac_actionid;
  1454.             ACInfo[playerid][acGtc][6] = GetTickCount() + 3250;
  1455.         }
  1456.     }
  1457.     return 1;
  1458. }
  1459.  
  1460. ac_fpublic ac_SetPlayerInterior(playerid, ac_interiorid)
  1461. {
  1462.     if(!SetPlayerInterior(playerid, ac_interiorid)) return 0;
  1463.     ACInfo[playerid][acNOPCount][2] = 0;
  1464.     ACInfo[playerid][acSet][0] = ac_interiorid % 256;
  1465.     ACInfo[playerid][acGtc][0] = GetTickCount() + 3250;
  1466.     return 1;
  1467. }
  1468.  
  1469. ac_fpublic ac_SetPlayerPos(playerid, Float:ac_x, Float:ac_y, Float:ac_z)
  1470. {
  1471.     if(!SetPlayerPos(playerid, ac_x, ac_y, ac_z)) return 0;
  1472.     ACInfo[playerid][acSet][8] = 1;
  1473.     ACInfo[playerid][acNOPCount][10] = 0;
  1474.     ACInfo[playerid][acSetPosX] = ac_x;
  1475.     ACInfo[playerid][acSetPosY] = ac_y;
  1476.     ACInfo[playerid][acSetPosZ] = ac_z;
  1477.     ACInfo[playerid][acSetPosTick] =
  1478.     ACInfo[playerid][acGtc][11] = GetTickCount() + 3250;
  1479.     return 1;
  1480. }
  1481.  
  1482. ac_fpublic ac_SetPlayerPosFindZ(playerid, Float:ac_x, Float:ac_y, Float:ac_z)
  1483. {
  1484.     if(!SetPlayerPosFindZ(playerid, ac_x, ac_y, ac_z)) return 0;
  1485.     ACInfo[playerid][acSet][8] = 2;
  1486.     ACInfo[playerid][acTpToZ] = true;
  1487.     ACInfo[playerid][acNOPCount][10] = 0;
  1488.     ACInfo[playerid][acSetPosX] = ac_x;
  1489.     ACInfo[playerid][acSetPosY] = ac_y;
  1490.     ACInfo[playerid][acSetPosTick] =
  1491.     ACInfo[playerid][acGtc][11] = GetTickCount() + 3250;
  1492.     return 1;
  1493. }
  1494.  
  1495. ac_fpublic ac_SetPlayerVelocity(playerid, Float:ac_X, Float:ac_Y, Float:ac_Z)
  1496. {
  1497.     if(!SetPlayerVelocity(playerid, ac_X, ac_Y, ac_Z)) return 0;
  1498.     ACInfo[playerid][acSpeed] = ac_GetSpeed(ac_X, ac_Y, ac_Z);
  1499.     ACInfo[playerid][acGtc][10] = GetTickCount() + 1650;
  1500.     return 1;
  1501. }
  1502.  
  1503. ac_fpublic ac_PutPlayerInVehicle(playerid, ac_vehicleid, ac_seatid)
  1504. {
  1505.     if(!PutPlayerInVehicle(playerid, ac_vehicleid, ac_seatid)) return 0;
  1506.     if(!(SPECIAL_ACTION_DANCE1 <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_DANCE4) &&
  1507.     !(SPECIAL_ACTION_DRINK_BEER <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_DRINK_SPRUNK) &&
  1508.     GetPlayerVirtualWorld(playerid) == GetVehicleVirtualWorld(ac_vehicleid))
  1509.     {
  1510.         new ac_model = GetVehicleModel(ac_vehicleid);
  1511.         ACInfo[playerid][acNOPCount][7] = 0;
  1512.         ACInfo[playerid][acSet][9] = ac_vehicleid;
  1513.         if(ac_IsABus(ac_model) || ac_IsVehicleSeatOccupied(ac_vehicleid, ac_seatid) ||
  1514.         ac_seatid > ac_GetMaxPassengers(ac_model)) ACInfo[playerid][acSet][5] = -1;
  1515.         else ACInfo[playerid][acSet][5] = ac_seatid;
  1516.         ACInfo[playerid][acGtc][1] = GetTickCount() + 2650;
  1517.     }
  1518.     return 1;
  1519. }
  1520.  
  1521. ac_fpublic ac_RemovePlayerFromVehicle(playerid)
  1522. {
  1523.     if(!RemovePlayerFromVehicle(playerid)) return 0;
  1524.     ACInfo[playerid][acSet][11] = 1;
  1525.     ACInfo[playerid][acGtc][8] = GetTickCount() + 4650;
  1526.     return 1;
  1527. }
  1528.  
  1529. ac_fpublic ac_SetVehiclePos(vehicleid, Float:ac_x, Float:ac_y, Float:ac_z)
  1530. {
  1531.     if(!SetVehiclePos(vehicleid, ac_x, ac_y, ac_z)) return 0;
  1532.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1533.     if(ac_driver != INVALID_PLAYER_ID)
  1534.     {
  1535.         ACInfo[ac_driver][acSet][8] = 3;
  1536.         ACInfo[ac_driver][acNOPCount][10] = 0;
  1537.         ACInfo[ac_driver][acSetPosX] = ac_x;
  1538.         ACInfo[ac_driver][acSetPosY] = ac_y;
  1539.         ACInfo[ac_driver][acSetPosZ] = ac_z;
  1540.         ACInfo[ac_driver][acSetPosTick] =
  1541.         ACInfo[ac_driver][acGtc][11] = GetTickCount() + 3250;
  1542.     }
  1543.     else
  1544.     {
  1545.         ACVehInfo[vehicleid][acPosX] = ac_x;
  1546.         ACVehInfo[vehicleid][acPosY] = ac_y;
  1547.         ACVehInfo[vehicleid][acPosZ] = ac_z;
  1548.     }
  1549.     return 1;
  1550. }
  1551.  
  1552. ac_fpublic ac_SetVehicleVelocity(vehicleid, Float:ac_X, Float:ac_Y, Float:ac_Z)
  1553. {
  1554.     if(!SetVehicleVelocity(vehicleid, ac_X, ac_Y, ac_Z)) return 0;
  1555.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1556.     if(ac_driver != INVALID_PLAYER_ID)
  1557.     {
  1558.         ACVehInfo[vehicleid][acVelX] = ac_X;
  1559.         ACVehInfo[vehicleid][acVelY] = ac_Y;
  1560.         ACVehInfo[vehicleid][acVelZ] = ac_Z;
  1561.         ACInfo[ac_driver][acGtc][9] = GetTickCount() + 1650;
  1562.     }
  1563.     return 1;
  1564. }
  1565.  
  1566. ac_fpublic ac_SetVehicleAngularVelocity(vehicleid, Float:ac_X, Float:ac_Y, Float:ac_Z)
  1567. {
  1568.     if(!SetVehicleAngularVelocity(vehicleid, ac_X, ac_Y, ac_Z)) return 0;
  1569.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1570.     if(ac_driver != INVALID_PLAYER_ID)
  1571.     {
  1572.         ACVehInfo[vehicleid][acVelX] = ac_X;
  1573.         ACVehInfo[vehicleid][acVelY] = ac_Y;
  1574.         ACVehInfo[vehicleid][acVelZ] = ac_Z;
  1575.         ACInfo[ac_driver][acGtc][9] = GetTickCount() + 1650;
  1576.     }
  1577.     return 1;
  1578. }
  1579.  
  1580. ac_fpublic ac_LinkVehicleToInterior(vehicleid, ac_interiorid)
  1581. {
  1582.     if(!LinkVehicleToInterior(vehicleid, ac_interiorid)) return 0;
  1583.     ACVehInfo[vehicleid][acInt] = ac_interiorid % 256;
  1584.     return 1;
  1585. }
  1586.  
  1587. ac_fpublic ac_ChangeVehiclePaintjob(vehicleid, ac_paintjobid)
  1588. {
  1589.     ACVehInfo[vehicleid][acPaintJob] = ac_paintjobid;
  1590.     return ChangeVehiclePaintjob(vehicleid, ac_paintjobid);
  1591. }
  1592.  
  1593. ac_fpublic ac_SetVehicleHealth(vehicleid, Float:ac_health)
  1594. {
  1595.     if(!SetVehicleHealth(vehicleid, ac_health)) return 0;
  1596.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1597.     if(ac_driver != INVALID_PLAYER_ID)
  1598.     {
  1599.         ACInfo[ac_driver][acNOPCount][4] = 0;
  1600.         ACInfo[ac_driver][acSetVehHealth] = ac_health;
  1601.         ACInfo[ac_driver][acGtc][4] = GetTickCount() + 2650;
  1602.     }
  1603.     else ACVehInfo[vehicleid][acHealth] = ac_health;
  1604.     return 1;
  1605. }
  1606.  
  1607. ac_fpublic ac_RepairVehicle(vehicleid)
  1608. {
  1609.     if(!RepairVehicle(vehicleid)) return 0;
  1610.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1611.     if(ac_driver != INVALID_PLAYER_ID)
  1612.     {
  1613.         ACInfo[ac_driver][acNOPCount][4] = 0;
  1614.         ACInfo[ac_driver][acSetVehHealth] = 1000.0;
  1615.         ACInfo[ac_driver][acGtc][4] = GetTickCount() + 2650;
  1616.     }
  1617.     else ACVehInfo[vehicleid][acHealth] = 1000.0;
  1618.     return 1;
  1619. }
  1620.  
  1621. ac_fpublic ac_SetVehicleToRespawn(vehicleid)
  1622. {
  1623.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1624.     if(ac_driver != INVALID_PLAYER_ID) ACInfo[ac_driver][acGtc][9] = GetTickCount() + 1650;
  1625.     return SetVehicleToRespawn(vehicleid);
  1626. }
  1627.  
  1628. ac_fpublic ac_EnableAntiCheat(code, enable)
  1629. {
  1630.     if(!(0 <= code < sizeof ac_ACAllow)) return 0;
  1631.     if(code == 42)
  1632.     {
  1633.         if(enable)
  1634.         {
  1635.             if(!ac_ACAllow[code])
  1636.             {
  1637.                 #if !AC_USE_QUERY
  1638.                     ac_QueryEnable = !!GetServerVarAsBool("query");
  1639.                 #endif
  1640.                 ac_RconEnable = !!GetServerVarAsBool("rcon");
  1641.             }
  1642.             #if !AC_USE_QUERY
  1643.                 SendRconCommand("query 0");
  1644.             #endif
  1645.             SendRconCommand("rcon 0");
  1646.         }
  1647.         else
  1648.         {
  1649.             static ac_strtmp[9];
  1650.             #if !AC_USE_QUERY
  1651.                 format(ac_strtmp, sizeof ac_strtmp, "query %b", ac_QueryEnable);
  1652.                 SendRconCommand(ac_strtmp);
  1653.             #endif
  1654.             format(ac_strtmp, sizeof ac_strtmp, "rcon %b", ac_RconEnable);
  1655.             SendRconCommand(ac_strtmp);
  1656.         }
  1657.     }
  1658.     ac_ACAllow[code] = !!enable;
  1659.     if(enable)
  1660.     {
  1661.         #if defined foreach
  1662.             foreach(new ac_i : Player)
  1663.         #else
  1664.             #if defined GetPlayerPoolSize
  1665.                 for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1666.             #else
  1667.                 for(new ac_i = MAX_PLAYERS - 1; ac_i >= 0; --ac_i)
  1668.             #endif
  1669.             {
  1670.                 if(IsPlayerConnected(ac_i))
  1671.         #endif
  1672.         {
  1673.             ACInfo[ac_i][acACAllow][code] = ac_ACAllow[code];
  1674.             switch(code)
  1675.             {
  1676.                 case 7: ACInfo[ac_i][acCheatCount][15] = 0;
  1677.                 case 8: ACInfo[ac_i][acCheatCount][3] = 0;
  1678.                 case 9: ACInfo[ac_i][acCheatCount][17] = 0;
  1679.                 case 10: ACInfo[ac_i][acCheatCount][16] = ACInfo[ac_i][acCheatCount][20] = 0;
  1680.                 #if AC_USE_AMMUNATIONS
  1681.                     case 15: ACInfo[ac_i][acCheatCount][10] = 0;
  1682.                 #endif
  1683.                 case 17: ACInfo[ac_i][acCheatCount][7] = 0;
  1684.                 case 19: ACInfo[ac_i][acCheatCount][9] = 0;
  1685.                 case 20: ACInfo[ac_i][acCheatCount][11] = 0;
  1686.                 #if AC_USE_TUNING_GARAGES
  1687.                     case 23: ACInfo[ac_i][acCheatCount][12] = 0;
  1688.                 #endif
  1689.                 case 26: ACInfo[ac_i][acCheatCount][14] = ACInfo[ac_i][acCheatCount][8] = 0;
  1690.                 case 29: ACInfo[ac_i][acCheatCount][13] = ACInfo[ac_i][acCheatCount][6] = 0;
  1691.                 case 30: ACInfo[ac_i][acCheatCount][19] = 0;
  1692.                 case 31: ACInfo[ac_i][acCheatCount][4] = 0;
  1693.                 case 34: ACInfo[ac_i][acCheatCount][5] = 0;
  1694.                 case 38: ACInfo[ac_i][acCheatCount][0] = 0;
  1695.                 case 47: ACInfo[ac_i][acCheatCount][18] = 0;
  1696.             }
  1697.         }
  1698.         #if !defined foreach
  1699.             }
  1700.         #endif
  1701.     }
  1702.     else
  1703.     {
  1704.         #if defined foreach
  1705.             foreach(new ac_i : Player) ACInfo[ac_i][acACAllow][code] = ac_ACAllow[code];
  1706.         #else
  1707.             #if defined GetPlayerPoolSize
  1708.                 for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1709.             #else
  1710.                 for(new ac_i = MAX_PLAYERS - 1; ac_i >= 0; --ac_i)
  1711.             #endif
  1712.             {
  1713.                 if(IsPlayerConnected(ac_i)) ACInfo[ac_i][acACAllow][code] = ac_ACAllow[code];
  1714.             }
  1715.         #endif
  1716.     }
  1717.     #if AC_USE_CONFIG_FILES && AUTOSAVE_SETTINGS_IN_CONFIG
  1718.         static ac_strtmp[10];
  1719.         new ac_string[415], File:ac_cfgFile;
  1720.         if((ac_cfgFile = fopen(AC_CONFIG_FILE, io_write)))
  1721.         {
  1722.             for(new ac_i; ac_i < sizeof ac_ACAllow; ++ac_i)
  1723.             {
  1724.                 format(ac_strtmp, sizeof ac_strtmp, "%d //%d\r\n", ac_ACAllow[ac_i], ac_i);
  1725.                 strcat(ac_string, ac_strtmp);
  1726.             }
  1727.             fwrite(ac_cfgFile, ac_string);
  1728.             fclose(ac_cfgFile);
  1729.         }
  1730.     #endif
  1731.     return 1;
  1732. }
  1733.  
  1734. ac_fpublic ac_EnableAntiNOP(nopcode, enable)
  1735. {
  1736.     if(!(0 <= nopcode < sizeof ac_NOPAllow)) return 0;
  1737.     ac_NOPAllow[nopcode] = !!enable;
  1738.     #if defined foreach
  1739.         foreach(new ac_i : Player) ACInfo[ac_i][acNOPAllow][nopcode] = ac_NOPAllow[nopcode];
  1740.     #else
  1741.         #if defined GetPlayerPoolSize
  1742.             for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1743.         #else
  1744.             for(new ac_i = MAX_PLAYERS - 1; ac_i >= 0; --ac_i)
  1745.         #endif
  1746.         {
  1747.             if(IsPlayerConnected(ac_i)) ACInfo[ac_i][acNOPAllow][nopcode] = ac_NOPAllow[nopcode];
  1748.         }
  1749.     #endif
  1750.     #if AC_USE_CONFIG_FILES && AUTOSAVE_SETTINGS_IN_CONFIG
  1751.         static ac_strtmp[10];
  1752.         new ac_string[87], File:ac_cfgFile;
  1753.         if((ac_cfgFile = fopen(AC_NOP_CONFIG_FILE, io_write)))
  1754.         {
  1755.             for(new ac_i; ac_i < sizeof ac_NOPAllow; ++ac_i)
  1756.             {
  1757.                 format(ac_strtmp, sizeof ac_strtmp, "%d //%d\r\n", ac_NOPAllow[ac_i], ac_i);
  1758.                 strcat(ac_string, ac_strtmp);
  1759.             }
  1760.             fwrite(ac_cfgFile, ac_string);
  1761.             fclose(ac_cfgFile);
  1762.         }
  1763.     #endif
  1764.     #undef AUTOSAVE_SETTINGS_IN_CONFIG
  1765.     return 1;
  1766. }
  1767.  
  1768. ac_fpublic ac_EnableAntiCheatForPlayer(playerid, code, enable)
  1769. {
  1770.     if(!(0 <= code < sizeof ac_ACAllow)) return -1;
  1771.     ACInfo[playerid][acACAllow][code] = !!enable;
  1772.     if(enable)
  1773.     {
  1774.         switch(code)
  1775.         {
  1776.             case 7: ACInfo[playerid][acCheatCount][15] = 0;
  1777.             case 8: ACInfo[playerid][acCheatCount][3] = 0;
  1778.             case 9: ACInfo[playerid][acCheatCount][17] = 0;
  1779.             case 10: ACInfo[playerid][acCheatCount][16] = ACInfo[playerid][acCheatCount][20] = 0;
  1780.             #if AC_USE_AMMUNATIONS
  1781.                 case 15: ACInfo[playerid][acCheatCount][10] = 0;
  1782.             #endif
  1783.             case 17: ACInfo[playerid][acCheatCount][7] = 0;
  1784.             case 19: ACInfo[playerid][acCheatCount][9] = 0;
  1785.             case 20: ACInfo[playerid][acCheatCount][11] = 0;
  1786.             #if AC_USE_TUNING_GARAGES
  1787.                 case 23: ACInfo[playerid][acCheatCount][12] = 0;
  1788.             #endif
  1789.             case 26: ACInfo[playerid][acCheatCount][14] = ACInfo[playerid][acCheatCount][8] = 0;
  1790.             case 29: ACInfo[playerid][acCheatCount][13] = ACInfo[playerid][acCheatCount][6] = 0;
  1791.             case 30: ACInfo[playerid][acCheatCount][19] = 0;
  1792.             case 31: ACInfo[playerid][acCheatCount][4] = 0;
  1793.             case 34: ACInfo[playerid][acCheatCount][5] = 0;
  1794.             case 38: ACInfo[playerid][acCheatCount][0] = 0;
  1795.             case 47: ACInfo[playerid][acCheatCount][18] = 0;
  1796.         }
  1797.     }
  1798.     return 1;
  1799. }
  1800.  
  1801. ac_fpublic ac_EnableAntiNOPForPlayer(playerid, nopcode, enable)
  1802. {
  1803.     if(!(0 <= nopcode < sizeof ac_NOPAllow)) return -1;
  1804.     ACInfo[playerid][acNOPAllow][nopcode] = !!enable;
  1805.     return 1;
  1806. }
  1807.  
  1808. ac_fpublic ac_IsAntiCheatEnabled(code)
  1809. {
  1810.     if(!(0 <= code < sizeof ac_ACAllow)) return 0;
  1811.     return ac_ACAllow[code];
  1812. }
  1813.  
  1814. ac_fpublic ac_IsAntiNOPEnabled(nopcode)
  1815. {
  1816.     if(!(0 <= nopcode < sizeof ac_NOPAllow)) return 0;
  1817.     return ac_NOPAllow[nopcode];
  1818. }
  1819.  
  1820. ac_fpublic ac_IsAntiCheatEnabledForPlayer(playerid, code)
  1821. {
  1822.     if(!(0 <= code < sizeof ac_ACAllow)) return 0;
  1823.     return ACInfo[playerid][acACAllow][code];
  1824. }
  1825.  
  1826. ac_fpublic ac_IsAntiNOPEnabledForPlayer(playerid, nopcode)
  1827. {
  1828.     if(!(0 <= nopcode < sizeof ac_NOPAllow)) return 0;
  1829.     return ACInfo[playerid][acNOPAllow][nopcode];
  1830. }
  1831.  
  1832. ac_fpublic ac_AntiCheatGetSpeed(playerid) return ACInfo[playerid][acSpeed];
  1833.  
  1834. ac_fpublic ac_AntiCheatGetAnimationIndex(playerid) return ACInfo[playerid][acAnim];
  1835.  
  1836. ac_fpublic ac_AntiCheatGetDialog(playerid) return ACInfo[playerid][acDialog];
  1837.  
  1838. ac_fpublic ac_AntiCheatGetEnterVehicle(playerid) return ACInfo[playerid][acEnterVeh];
  1839.  
  1840. ac_fpublic ac_AntiCheatGetVehicleID(playerid) return ACInfo[playerid][acVeh];
  1841.  
  1842. ac_fpublic ac_AntiCheatGetWeapon(playerid) return ACInfo[playerid][acLastWeapon];
  1843.  
  1844. ac_fpublic ac_AntiCheatGetVehicleSeat(playerid) return ACInfo[playerid][acSeat];
  1845.  
  1846. ac_fpublic ac_AntiCheatGetSpecialAction(playerid) return ACInfo[playerid][acSpecAct];
  1847.  
  1848. ac_fpublic ac_AntiCheatGetLastSpecialActio(playerid) return ACInfo[playerid][acLastSpecAct];
  1849.  
  1850. ac_fpublic ac_AntiCheatGetLastShotWeapon(playerid) return ACInfo[playerid][acLastShot];
  1851.  
  1852. ac_fpublic ac_AntiCheatGetLastPickup(playerid) return ACInfo[playerid][acLastPickup];
  1853.  
  1854. ac_fpublic ac_AntiCheatGetLastUpdateTime(playerid) return ACInfo[playerid][acUpdateTick];
  1855.  
  1856. ac_fpublic ac_AntiCheatGetLastReloadTime(playerid) return ACInfo[playerid][acReloadTick];
  1857.  
  1858. ac_fpublic ac_AntiCheatGetLastEnteredVehTi(playerid) return ACInfo[playerid][acEnterVehTick];
  1859.  
  1860. ac_fpublic ac_AntiCheatGetLastShotTime(playerid) return ACInfo[playerid][acShotTick];
  1861.  
  1862. ac_fpublic ac_AntiCheatGetLastSpawnTime(playerid) return ACInfo[playerid][acSpawnTick];
  1863.  
  1864. ac_fpublic ac_AntiCheatIntEnterExitsIsEnab(playerid) return ACInfo[playerid][acIntEnterExits];
  1865.  
  1866. ac_fpublic ac_AntiCheatStuntBonusIsEnabled(playerid) return ACInfo[playerid][acStuntBonus];
  1867.  
  1868. ac_fpublic ac_AntiCheatIsInModShop(playerid) return ACInfo[playerid][acModShop];
  1869.  
  1870. ac_fpublic ac_AntiCheatIsFrozen(playerid) return !ACInfo[playerid][acUnFrozen];
  1871.  
  1872. ac_fpublic ac_AntiCheatIsDead(playerid) return ACInfo[playerid][acDead];
  1873.  
  1874. ac_fpublic ac_AntiCheatIsConnected(playerid) return ACInfo[playerid][acOnline];
  1875.  
  1876. ac_fpublic ac_AntiCheatKickWithDesync(playerid, code)
  1877. {
  1878.     if(ACInfo[playerid][acKicked] > 0) return -1;
  1879.     new ac_gpp = GetPlayerPing(playerid) + 150;
  1880.     ACInfo[playerid][acKickTimerID] = SetTimerEx("ac_KickTimer", (ac_gpp > AC_MAX_PING ? AC_MAX_PING : ac_gpp), false, "i", playerid);
  1881.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  1882.     {
  1883.         if(code == 4) ACInfo[playerid][acKickVeh] = GetPlayerVehicleID(playerid);
  1884.         ACInfo[playerid][acKicked] = 2;
  1885.     }
  1886.     else ACInfo[playerid][acKicked] = 1;
  1887.     return 1;
  1888. }
  1889.  
  1890. ac_fpublic ac_AntiCheatIsKickedWithDesync(playerid) return ACInfo[playerid][acKicked];
  1891.  
  1892. ac_fpublic ac_AntiCheatGetNextDialog(playerid) return ACInfo[playerid][acNextDialog];
  1893.  
  1894. ac_fpublic ac_AntiCheatGetVehicleDriver(vehicleid) return ACVehInfo[vehicleid][acDriver];
  1895.  
  1896. ac_fpublic ac_AntiCheatGetVehicleInterior(vehicleid) return ACVehInfo[vehicleid][acInt];
  1897.  
  1898. ac_fpublic ac_AntiCheatGetVehiclePaintjob(vehicleid) return ACVehInfo[vehicleid][acPaintJob];
  1899.  
  1900. ac_fpublic ac_AntiCheatGetInterior(playerid) return ACInfo[playerid][acInt];
  1901.  
  1902. #endif
  1903.  
  1904. stock acc_AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2)
  1905. {
  1906.     new ac_vehicleid = AddStaticVehicle(modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2);
  1907.     if(ac_vehicleid != INVALID_VEHICLE_ID)
  1908.     {
  1909.         #if defined FILTERSCRIPT
  1910.             CallRemoteFunction("ac_AddStaticVehicle", "iffff", ac_vehicleid, spawn_x, spawn_y, spawn_z, z_angle);
  1911.         #else
  1912.             ac_AddStaticVehicle(ac_vehicleid, spawn_x, spawn_y, spawn_z, z_angle);
  1913.         #endif
  1914.     }
  1915.     return ac_vehicleid;
  1916. }
  1917.  
  1918. #if defined _ALS_AddStaticVehicle
  1919.     #undef AddStaticVehicle
  1920. #else
  1921.     #define _ALS_AddStaticVehicle
  1922. #endif
  1923. #define AddStaticVehicle acc_AddStaticVehicle
  1924.  
  1925. #if defined OnVehicleSirenStateChange
  1926.     stock acc_AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay, addsiren = 0)
  1927.     {
  1928.         new ac_vehicleid = AddStaticVehicleEx(modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2, respawn_delay, addsiren);
  1929. #else
  1930.     stock acc_AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay)
  1931.     {
  1932.         new ac_vehicleid = AddStaticVehicleEx(modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2, respawn_delay);
  1933. #endif
  1934.     if(ac_vehicleid != INVALID_VEHICLE_ID)
  1935.     {
  1936.         #if defined FILTERSCRIPT
  1937.             CallRemoteFunction("ac_AddStaticVehicle", "iffff", ac_vehicleid, spawn_x, spawn_y, spawn_z, z_angle);
  1938.         #else
  1939.             ac_AddStaticVehicle(ac_vehicleid, spawn_x, spawn_y, spawn_z, z_angle);
  1940.         #endif
  1941.     }
  1942.     return ac_vehicleid;
  1943. }
  1944.  
  1945. #if defined _ALS_AddStaticVehicleEx
  1946.     #undef AddStaticVehicleEx
  1947. #else
  1948.     #define _ALS_AddStaticVehicleEx
  1949. #endif
  1950. #define AddStaticVehicleEx acc_AddStaticVehicleEx
  1951.  
  1952. #if defined OnVehicleSirenStateChange
  1953.     stock acc_CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, addsiren = 0)
  1954.     {
  1955.         new ac_vehicleid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay, addsiren);
  1956. #else
  1957.     stock acc_CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay)
  1958.     {
  1959.         new ac_vehicleid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay);
  1960. #endif
  1961.     if(ac_vehicleid != INVALID_VEHICLE_ID && ac_vehicleid > 0)
  1962.     {
  1963.         #if defined FILTERSCRIPT
  1964.             CallRemoteFunction("ac_CreateVehicle", "iiffff", ac_vehicleid, vehicletype, x, y, z, rotation);
  1965.         #else
  1966.             ac_CreateVehicle(ac_vehicleid, vehicletype, x, y, z, rotation);
  1967.         #endif
  1968.     }
  1969.     return ac_vehicleid;
  1970. }
  1971.  
  1972. #if defined _ALS_CreateVehicle
  1973.     #undef CreateVehicle
  1974. #else
  1975.     #define _ALS_CreateVehicle
  1976. #endif
  1977. #define CreateVehicle acc_CreateVehicle
  1978.  
  1979. 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)
  1980. {
  1981.     new ac_classid = AddPlayerClass(modelid, spawn_x, spawn_y, spawn_z, z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1982.     #if defined FILTERSCRIPT
  1983.         CallRemoteFunction("ac_AddPlayerClass", "ifffiiiiii", ac_classid, spawn_x, spawn_y, spawn_z, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1984.     #else
  1985.         ac_AddPlayerClass(ac_classid, spawn_x, spawn_y, spawn_z, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1986.     #endif
  1987.     return ac_classid;
  1988. }
  1989.  
  1990. #if defined _ALS_AddPlayerClass
  1991.     #undef AddPlayerClass
  1992. #else
  1993.     #define _ALS_AddPlayerClass
  1994. #endif
  1995. #define AddPlayerClass acc_AddPlayerClass
  1996.  
  1997. 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)
  1998. {
  1999.     new ac_classid = AddPlayerClassEx(teamid, modelid, spawn_x, spawn_y, spawn_z, z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2000.     #if defined FILTERSCRIPT
  2001.         CallRemoteFunction("ac_AddPlayerClass", "ifffiiiiii", ac_classid, spawn_x, spawn_y, spawn_z, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2002.     #else
  2003.         ac_AddPlayerClass(ac_classid, spawn_x, spawn_y, spawn_z, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2004.     #endif
  2005.     return ac_classid;
  2006. }
  2007.  
  2008. #if defined _ALS_AddPlayerClassEx
  2009.     #undef AddPlayerClassEx
  2010. #else
  2011.     #define _ALS_AddPlayerClassEx
  2012. #endif
  2013. #define AddPlayerClassEx acc_AddPlayerClassEx
  2014.  
  2015. stock orig_SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
  2016.     return SetSpawnInfo(playerid, team, skin, x, y, z, rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2017.  
  2018. stock acc_SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
  2019. {
  2020.     #if defined FILTERSCRIPT
  2021.         return CallRemoteFunction("ac_SetSpawnInfo", "iiiffffiiiiii", playerid, team, skin, x, y, z, rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2022.     #else
  2023.         return ac_SetSpawnInfo(playerid, team, skin, x, y, z, rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2024.     #endif
  2025. }
  2026.  
  2027. #if defined _ALS_SetSpawnInfo
  2028.     #undef SetSpawnInfo
  2029. #else
  2030.     #define _ALS_SetSpawnInfo
  2031. #endif
  2032. #define SetSpawnInfo acc_SetSpawnInfo
  2033.  
  2034. stock acc_AddStaticPickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0)
  2035. {
  2036.     new ac_pickupid = CreatePickup(model, type, X, Y, Z, virtualworld);
  2037.     if(ac_pickupid != -1)
  2038.     {
  2039.         #if defined FILTERSCRIPT
  2040.             return CallRemoteFunction("ac_AddStaticPickup", "iiifff", ac_pickupid, model, type, X, Y, Z);
  2041.         #else
  2042.             return ac_AddStaticPickup(ac_pickupid, model, type, X, Y, Z);
  2043.         #endif
  2044.     }
  2045.     return 0;
  2046. }
  2047.  
  2048. #if defined _ALS_AddStaticPickup
  2049.     #undef AddStaticPickup
  2050. #else
  2051.     #define _ALS_AddStaticPickup
  2052. #endif
  2053. #define AddStaticPickup acc_AddStaticPickup
  2054.  
  2055. stock acc_CreatePickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0)
  2056. {
  2057.     new ac_pickupid = CreatePickup(model, type, X, Y, Z, virtualworld);
  2058.     if(ac_pickupid != -1)
  2059.     {
  2060.         #if defined FILTERSCRIPT
  2061.             CallRemoteFunction("ac_CreatePickup", "iiifff", ac_pickupid, model, type, X, Y, Z);
  2062.         #else
  2063.             ac_CreatePickup(ac_pickupid, model, type, X, Y, Z);
  2064.         #endif
  2065.     }
  2066.     return ac_pickupid;
  2067. }
  2068.  
  2069. #if defined _ALS_CreatePickup
  2070.     #undef CreatePickup
  2071. #else
  2072.     #define _ALS_CreatePickup
  2073. #endif
  2074. #define CreatePickup acc_CreatePickup
  2075.  
  2076. #if defined CreateDynamicPickup
  2077.     #if defined STREAMER_ENABLE_TAGS
  2078.         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)
  2079.         {
  2080.             new STREAMER_TAG_PICKUP:ac_pickupid = CreateDynamicPickup(modelid, type, x, y, z, worldid, interiorid, playerid, streamdistance, areaid, priority);
  2081.     #else
  2082.         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)
  2083.         {
  2084.             new ac_pickupid = CreateDynamicPickup(modelid, type, x, y, z, worldid, interiorid, playerid, streamdistance, areaid, priority);
  2085.     #endif
  2086.         if(_:ac_pickupid > 0)
  2087.         {
  2088.             #if defined FILTERSCRIPT
  2089.                 CallRemoteFunction("ac_CreateDynamicPickup", "iii", ac_pickupid, modelid, type);
  2090.             #elseif AC_USE_PICKUP_WEAPONS
  2091.                 ac_CreateDynamicPickup(ac_pickupid, modelid, type);
  2092.             #endif
  2093.         }
  2094.         return ac_pickupid;
  2095.     }
  2096.  
  2097.     #if defined _ALS_CreateDynamicPickup
  2098.         #undef CreateDynamicPickup
  2099.     #else
  2100.         #define _ALS_CreateDynamicPickup
  2101.     #endif
  2102.     #define CreateDynamicPickup acc_CreateDynamicPickup
  2103. #endif
  2104.  
  2105. #if defined CreateDynamicPickupEx
  2106.     #if defined STREAMER_ENABLE_TAGS
  2107.         stock STREAMER_TAG_PICKUP:acc_CreateDynamicPickupEx(modelid, type, Float:x, Float:y, Float:z, Float:streamdistance = 200.0, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA:areas[] = { STREAMER_TAG_AREA:-1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas)
  2108.         {
  2109.             new STREAMER_TAG_PICKUP:ac_pickupid = CreateDynamicPickupEx(modelid, type, x, y, z, streamdistance, worlds, interiors, players, areas, priority, maxworlds, maxinteriors, maxplayers, maxareas);
  2110.     #else
  2111.             stock acc_CreateDynamicPickupEx(modelid, type, Float:x, Float:y, Float:z, Float:streamdistance = 200.0, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const areas[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas)
  2112.         {
  2113.             new ac_pickupid = CreateDynamicPickupEx(modelid, type, x, y, z, streamdistance, worlds, interiors, players, areas, priority, maxworlds, maxinteriors, maxplayers, maxareas);
  2114.     #endif
  2115.         if(_:ac_pickupid > 0)
  2116.         {
  2117.             #if defined FILTERSCRIPT
  2118.                 CallRemoteFunction("ac_CreateDynamicPickup", "iii", ac_pickupid, modelid, type);
  2119.             #elseif AC_USE_PICKUP_WEAPONS
  2120.                 ac_CreateDynamicPickup(ac_pickupid, modelid, type);
  2121.             #endif
  2122.         }
  2123.         return ac_pickupid;
  2124.     }
  2125.  
  2126.     #if defined _ALS_CreateDynamicPickupEx
  2127.         #undef CreateDynamicPickupEx
  2128.     #else
  2129.         #define _ALS_CreateDynamicPickupEx
  2130.     #endif
  2131.     #define CreateDynamicPickupEx acc_CreateDynamicPickupEx
  2132. #endif
  2133.  
  2134. stock acc_DestroyVehicle(vehicleid)
  2135. {
  2136.     #if defined FILTERSCRIPT
  2137.         return CallRemoteFunction("ac_DestroyVehicle", "i", vehicleid);
  2138.     #else
  2139.         return ac_DestroyVehicle(vehicleid);
  2140.     #endif
  2141. }
  2142.  
  2143. #if defined _ALS_DestroyVehicle
  2144.     #undef DestroyVehicle
  2145. #else
  2146.     #define _ALS_DestroyVehicle
  2147. #endif
  2148. #define DestroyVehicle acc_DestroyVehicle
  2149.  
  2150. stock acc_DestroyPickup(pickup)
  2151. {
  2152.     #if defined FILTERSCRIPT
  2153.         return CallRemoteFunction("ac_DestroyPickup", "i", pickup);
  2154.     #else
  2155.         return ac_DestroyPickup(pickup);
  2156.     #endif
  2157. }
  2158.  
  2159. #if defined _ALS_DestroyPickup
  2160.     #undef DestroyPickup
  2161. #else
  2162.     #define _ALS_DestroyPickup
  2163. #endif
  2164. #define DestroyPickup acc_DestroyPickup
  2165.  
  2166. stock acc_DisableInteriorEnterExits()
  2167. {
  2168.     #if defined FILTERSCRIPT
  2169.         return CallRemoteFunction("ac_DisableInteriorEnterExits", "");
  2170.     #else
  2171.         return ac_DisableInteriorEnterExits();
  2172.     #endif
  2173. }
  2174.  
  2175. #if defined _ALS_DisableInteriorEnterExits
  2176.     #undef DisableInteriorEnterExits
  2177. #else
  2178.     #define _ALS_DisableInteriorEnterExits
  2179. #endif
  2180. #define DisableInteriorEnterExits acc_DisableInteriorEnterExits
  2181.  
  2182. stock acc_UsePlayerPedAnims()
  2183. {
  2184.     #if defined FILTERSCRIPT
  2185.         return CallRemoteFunction("ac_UsePlayerPedAnims", "");
  2186.     #else
  2187.         return ac_UsePlayerPedAnims();
  2188.     #endif
  2189. }
  2190.  
  2191. #if defined _ALS_UsePlayerPedAnims
  2192.     #undef UsePlayerPedAnims
  2193. #else
  2194.     #define _ALS_UsePlayerPedAnims
  2195. #endif
  2196. #define UsePlayerPedAnims acc_UsePlayerPedAnims
  2197.  
  2198. #if defined EnableVehicleFriendlyFire
  2199.     stock acc_EnableVehicleFriendlyFire()
  2200.     {
  2201.         #if defined FILTERSCRIPT
  2202.             return CallRemoteFunction("ac_EnableVehicleFriendlyFire", "");
  2203.         #else
  2204.             return ac_EnableVehicleFriendlyFire();
  2205.         #endif
  2206.     }
  2207.  
  2208.     #if defined _ALS_EnableVehicleFriendlyFire
  2209.         #undef EnableVehicleFriendlyFire
  2210.     #else
  2211.         #define _ALS_EnableVehicleFriendlyFire
  2212.     #endif
  2213.     #define EnableVehicleFriendlyFire acc_EnableVehicleFriendlyFire
  2214. #endif
  2215.  
  2216. stock acc_EnableStuntBonusForAll(enable)
  2217. {
  2218.     #if defined FILTERSCRIPT
  2219.         return CallRemoteFunction("ac_EnableStuntBonusForAll", "i", enable);
  2220.     #else
  2221.         return ac_EnableStuntBonusForAll(enable);
  2222.     #endif
  2223. }
  2224.  
  2225. #if defined _ALS_EnableStuntBonusForAll
  2226.     #undef EnableStuntBonusForAll
  2227. #else
  2228.     #define _ALS_EnableStuntBonusForAll
  2229. #endif
  2230. #define EnableStuntBonusForAll acc_EnableStuntBonusForAll
  2231.  
  2232. stock acc_EnableStuntBonusForPlayer(playerid, enable)
  2233. {
  2234.     #if defined FILTERSCRIPT
  2235.         return CallRemoteFunction("ac_EnableStuntBonusForPlayer", "ii", playerid, enable);
  2236.     #else
  2237.         return ac_EnableStuntBonusForPlayer(playerid, enable);
  2238.     #endif
  2239. }
  2240.  
  2241. #if defined _ALS_EnableStuntBonusForPlayer
  2242.     #undef EnableStuntBonusForPlayer
  2243. #else
  2244.     #define _ALS_EnableStuntBonusForPlayer
  2245. #endif
  2246. #define EnableStuntBonusForPlayer acc_EnableStuntBonusForPlayer
  2247.  
  2248. #if defined _inc_y_dialog || defined _INC_y_dialog
  2249.     stock ac_Dialog_Show(playerid, style, string:title[], string:caption[], string:button1[], string:button2[] = "", dialog = -1)
  2250.     {
  2251.         if(!(0 <= playerid < MAX_PLAYERS))
  2252.         {
  2253.             #if defined FILTERSCRIPT
  2254.                 CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, dialog);
  2255.             #else
  2256.                 ac_ShowPlayerDialog(playerid, dialog);
  2257.             #endif
  2258.         }
  2259.         return Dialog_Show(playerid, style, title, caption, button1, button2, dialog);
  2260.     }
  2261.  
  2262.     #if defined _ALS_Dialog_Show
  2263.         #undef Dialog_Show
  2264.     #else
  2265.         #define _ALS_Dialog_Show
  2266.     #endif
  2267.     #define Dialog_Show ac_Dialog_Show
  2268. #endif
  2269.  
  2270. stock orig_ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]) return ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
  2271.  
  2272. stock acc_ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
  2273. {
  2274.     if(ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2))
  2275.     {
  2276.         #if defined FILTERSCRIPT
  2277.             return CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, dialogid);
  2278.         #else
  2279.             return ac_ShowPlayerDialog(playerid, dialogid);
  2280.         #endif
  2281.     }
  2282.     return 0;
  2283. }
  2284.  
  2285. #if defined _ALS_ShowPlayerDialog
  2286.     #undef ShowPlayerDialog
  2287. #else
  2288.     #define _ALS_ShowPlayerDialog
  2289. #endif
  2290. #define ShowPlayerDialog acc_ShowPlayerDialog
  2291.  
  2292. stock orig_TogglePlayerControllable(playerid, toggle) return TogglePlayerControllable(playerid, toggle);
  2293.  
  2294. stock acc_TogglePlayerControllable(playerid, toggle)
  2295. {
  2296.     #if defined FILTERSCRIPT
  2297.         return CallRemoteFunction("ac_TogglePlayerControllable", "ii", playerid, toggle);
  2298.     #else
  2299.         return ac_TogglePlayerControllable(playerid, toggle);
  2300.     #endif
  2301. }
  2302.  
  2303. #if defined _ALS_TogglePlayerControllable
  2304.     #undef TogglePlayerControllable
  2305. #else
  2306.     #define _ALS_TogglePlayerControllable
  2307. #endif
  2308. #define TogglePlayerControllable acc_TogglePlayerControllable
  2309.  
  2310. stock orig_TogglePlayerSpectating(playerid, toggle) return TogglePlayerSpectating(playerid, toggle);
  2311.  
  2312. stock acc_TogglePlayerSpectating(playerid, toggle)
  2313. {
  2314.     #if defined FILTERSCRIPT
  2315.         return CallRemoteFunction("ac_TogglePlayerSpectating", "ii", playerid, toggle);
  2316.     #else
  2317.         return ac_TogglePlayerSpectating(playerid, toggle);
  2318.     #endif
  2319. }
  2320.  
  2321. #if defined _ALS_TogglePlayerSpectating
  2322.     #undef TogglePlayerSpectating
  2323. #else
  2324.     #define _ALS_TogglePlayerSpectating
  2325. #endif
  2326. #define TogglePlayerSpectating acc_TogglePlayerSpectating
  2327.  
  2328. stock orig_SpawnPlayer(playerid) return SpawnPlayer(playerid);
  2329.  
  2330. stock acc_SpawnPlayer(playerid)
  2331. {
  2332.     #if defined FILTERSCRIPT
  2333.         return CallRemoteFunction("ac_SpawnPlayer", "i", playerid);
  2334.     #else
  2335.         return ac_SpawnPlayer(playerid);
  2336.     #endif
  2337. }
  2338.  
  2339. #if defined _ALS_SpawnPlayer
  2340.     #undef SpawnPlayer
  2341. #else
  2342.     #define _ALS_SpawnPlayer
  2343. #endif
  2344. #define SpawnPlayer acc_SpawnPlayer
  2345.  
  2346. stock orig_SetPlayerHealth(playerid, Float:health) return SetPlayerHealth(playerid, health);
  2347.  
  2348. stock acc_SetPlayerHealth(playerid, Float:health)
  2349. {
  2350.     #if defined FILTERSCRIPT
  2351.         return CallRemoteFunction("ac_SetPlayerHealth", "if", playerid, health);
  2352.     #else
  2353.         return ac_SetPlayerHealth(playerid, health);
  2354.     #endif
  2355. }
  2356.  
  2357. #if defined _ALS_SetPlayerHealth
  2358.     #undef SetPlayerHealth
  2359. #else
  2360.     #define _ALS_SetPlayerHealth
  2361. #endif
  2362. #define SetPlayerHealth acc_SetPlayerHealth
  2363.  
  2364. stock orig_SetPlayerArmour(playerid, Float:armour) return SetPlayerArmour(playerid, armour);
  2365.  
  2366. stock acc_SetPlayerArmour(playerid, Float:armour)
  2367. {
  2368.     #if defined FILTERSCRIPT
  2369.         return CallRemoteFunction("ac_SetPlayerArmour", "if", playerid, armour);
  2370.     #else
  2371.         return ac_SetPlayerArmour(playerid, armour);
  2372.     #endif
  2373. }
  2374.  
  2375. #if defined _ALS_SetPlayerArmour
  2376.     #undef SetPlayerArmour
  2377. #else
  2378.     #define _ALS_SetPlayerArmour
  2379. #endif
  2380. #define SetPlayerArmour acc_SetPlayerArmour
  2381.  
  2382. stock orig_GivePlayerWeapon(playerid, weaponid, ammo) return GivePlayerWeapon(playerid, weaponid, ammo);
  2383.  
  2384. stock acc_GivePlayerWeapon(playerid, weaponid, ammo)
  2385. {
  2386.     if(!(0 <= playerid < MAX_PLAYERS)) return 0;
  2387.     #if defined FILTERSCRIPT
  2388.         return CallRemoteFunction("ac_GivePlayerWeapon", "iid", playerid, weaponid, ammo);
  2389.     #else
  2390.         return ac_GivePlayerWeapon(playerid, weaponid, ammo);
  2391.     #endif
  2392. }
  2393.  
  2394. #if defined _ALS_GivePlayerWeapon
  2395.     #undef GivePlayerWeapon
  2396. #else
  2397.     #define _ALS_GivePlayerWeapon
  2398. #endif
  2399. #define GivePlayerWeapon acc_GivePlayerWeapon
  2400.  
  2401. stock orig_SetPlayerAmmo(playerid, weaponslot, ammo) return SetPlayerAmmo(playerid, weaponslot, ammo);
  2402.  
  2403. stock acc_SetPlayerAmmo(playerid, weaponslot, ammo)
  2404. {
  2405.     if(!(0 <= playerid < MAX_PLAYERS)) return 0;
  2406.     #if defined FILTERSCRIPT
  2407.         return CallRemoteFunction("ac_SetPlayerAmmo", "iid", playerid, weaponslot, ammo);
  2408.     #else
  2409.         return ac_SetPlayerAmmo(playerid, weaponslot, ammo);
  2410.     #endif
  2411. }
  2412.  
  2413. #if defined _ALS_SetPlayerAmmo
  2414.     #undef SetPlayerAmmo
  2415. #else
  2416.     #define _ALS_SetPlayerAmmo
  2417. #endif
  2418. #define SetPlayerAmmo acc_SetPlayerAmmo
  2419.  
  2420. stock orig_SetPlayerArmedWeapon(playerid, weaponid) return SetPlayerArmedWeapon(playerid, weaponid);
  2421.  
  2422. stock acc_SetPlayerArmedWeapon(playerid, weaponid)
  2423. {
  2424.     #if defined FILTERSCRIPT
  2425.         return CallRemoteFunction("ac_SetPlayerArmedWeapon", "ii", playerid, weaponid);
  2426.     #else
  2427.         return ac_SetPlayerArmedWeapon(playerid, weaponid);
  2428.     #endif
  2429. }
  2430.  
  2431. #if defined _ALS_SetPlayerArmedWeapon
  2432.     #undef SetPlayerArmedWeapon
  2433. #else
  2434.     #define _ALS_SetPlayerArmedWeapon
  2435. #endif
  2436. #define SetPlayerArmedWeapon acc_SetPlayerArmedWeapon
  2437.  
  2438. stock orig_ResetPlayerWeapons(playerid) return ResetPlayerWeapons(playerid);
  2439.  
  2440. stock acc_ResetPlayerWeapons(playerid)
  2441. {
  2442.     #if defined FILTERSCRIPT
  2443.         return CallRemoteFunction("ac_ResetPlayerWeapons", "i", playerid);
  2444.     #else
  2445.         return ac_ResetPlayerWeapons(playerid);
  2446.     #endif
  2447. }
  2448.  
  2449. #if defined _ALS_ResetPlayerWeapons
  2450.     #undef ResetPlayerWeapons
  2451. #else
  2452.     #define _ALS_ResetPlayerWeapons
  2453. #endif
  2454. #define ResetPlayerWeapons acc_ResetPlayerWeapons
  2455.  
  2456. stock orig_GivePlayerMoney(playerid, money) return GivePlayerMoney(playerid, money);
  2457.  
  2458. stock acc_GivePlayerMoney(playerid, money)
  2459. {
  2460.     #if defined FILTERSCRIPT
  2461.         return CallRemoteFunction("ac_GivePlayerMoney", "id", playerid, money);
  2462.     #else
  2463.         return ac_GivePlayerMoney(playerid, money);
  2464.     #endif
  2465. }
  2466.  
  2467. #if defined _ALS_GivePlayerMoney
  2468.     #undef GivePlayerMoney
  2469. #else
  2470.     #define _ALS_GivePlayerMoney
  2471. #endif
  2472. #define GivePlayerMoney acc_GivePlayerMoney
  2473.  
  2474. stock orig_ResetPlayerMoney(playerid) return ResetPlayerMoney(playerid);
  2475.  
  2476. stock acc_ResetPlayerMoney(playerid)
  2477. {
  2478.     #if defined FILTERSCRIPT
  2479.         return CallRemoteFunction("ac_ResetPlayerMoney", "i", playerid);
  2480.     #else
  2481.         return ac_ResetPlayerMoney(playerid);
  2482.     #endif
  2483. }
  2484.  
  2485. #if defined _ALS_ResetPlayerMoney
  2486.     #undef ResetPlayerMoney
  2487. #else
  2488.     #define _ALS_ResetPlayerMoney
  2489. #endif
  2490. #define ResetPlayerMoney acc_ResetPlayerMoney
  2491.  
  2492. stock orig_GetPlayerMoney(playerid) return GetPlayerMoney(playerid);
  2493.  
  2494. stock acc_GetPlayerMoney(playerid)
  2495. {
  2496.     if(!IsPlayerConnected(playerid)) return 0;
  2497.     #if defined FILTERSCRIPT
  2498.         return CallRemoteFunction("ac_GetPlayerMoney", "i", playerid);
  2499.     #else
  2500.         return ac_GetPlayerMoney(playerid);
  2501.     #endif
  2502. }
  2503.  
  2504. #if defined _ALS_GetPlayerMoney
  2505.     #undef GetPlayerMoney
  2506. #else
  2507.     #define _ALS_GetPlayerMoney
  2508. #endif
  2509. #define GetPlayerMoney acc_GetPlayerMoney
  2510.  
  2511. stock orig_SetPlayerSpecialAction(playerid, actionid) return SetPlayerSpecialAction(playerid, actionid);
  2512.  
  2513. stock acc_SetPlayerSpecialAction(playerid, actionid)
  2514. {
  2515.     #if defined FILTERSCRIPT
  2516.         return CallRemoteFunction("ac_SetPlayerSpecialAction", "ii", playerid, actionid);
  2517.     #else
  2518.         return ac_SetPlayerSpecialAction(playerid, actionid);
  2519.     #endif
  2520. }
  2521.  
  2522. #if defined _ALS_SetPlayerSpecialAction
  2523.     #undef SetPlayerSpecialAction
  2524. #else
  2525.     #define _ALS_SetPlayerSpecialAction
  2526. #endif
  2527. #define SetPlayerSpecialAction acc_SetPlayerSpecialAction
  2528.  
  2529. stock orig_SetPlayerInterior(playerid, interiorid) return SetPlayerInterior(playerid, interiorid);
  2530.  
  2531. stock acc_SetPlayerInterior(playerid, interiorid)
  2532. {
  2533.     #if defined FILTERSCRIPT
  2534.         return CallRemoteFunction("ac_SetPlayerInterior", "ii", playerid, interiorid);
  2535.     #else
  2536.         return ac_SetPlayerInterior(playerid, interiorid);
  2537.     #endif
  2538. }
  2539.  
  2540. #if defined _ALS_SetPlayerInterior
  2541.     #undef SetPlayerInterior
  2542. #else
  2543.     #define _ALS_SetPlayerInterior
  2544. #endif
  2545. #define SetPlayerInterior acc_SetPlayerInterior
  2546.  
  2547. stock orig_SetPlayerPos(playerid, Float:x, Float:y, Float:z) return SetPlayerPos(playerid, x, y, z);
  2548.  
  2549. stock acc_SetPlayerPos(playerid, Float:x, Float:y, Float:z)
  2550. {
  2551.     #if defined FILTERSCRIPT
  2552.         return CallRemoteFunction("ac_SetPlayerPos", "ifff", playerid, x, y, z);
  2553.     #else
  2554.         return ac_SetPlayerPos(playerid, x, y, z);
  2555.     #endif
  2556. }
  2557.  
  2558. #if defined _ALS_SetPlayerPos
  2559.     #undef SetPlayerPos
  2560. #else
  2561.     #define _ALS_SetPlayerPos
  2562. #endif
  2563. #define SetPlayerPos acc_SetPlayerPos
  2564.  
  2565. stock orig_SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z) return SetPlayerPosFindZ(playerid, x, y, z);
  2566.  
  2567. stock acc_SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z)
  2568. {
  2569.     #if defined FILTERSCRIPT
  2570.         return CallRemoteFunction("ac_SetPlayerPosFindZ", "ifff", playerid, x, y, z);
  2571.     #else
  2572.         return ac_SetPlayerPosFindZ(playerid, x, y, z);
  2573.     #endif
  2574. }
  2575.  
  2576. #if defined _ALS_SetPlayerPosFindZ
  2577.     #undef SetPlayerPosFindZ
  2578. #else
  2579.     #define _ALS_SetPlayerPosFindZ
  2580. #endif
  2581. #define SetPlayerPosFindZ acc_SetPlayerPosFindZ
  2582.  
  2583. stock orig_SetPlayerVelocity(playerid, Float:X, Float:Y, Float:Z) return SetPlayerVelocity(playerid, X, Y, Z);
  2584.  
  2585. stock acc_SetPlayerVelocity(playerid, Float:X, Float:Y, Float:Z)
  2586. {
  2587.     #if defined FILTERSCRIPT
  2588.         return CallRemoteFunction("ac_SetPlayerVelocity", "ifff", playerid, X, Y, Z);
  2589.     #else
  2590.         return ac_SetPlayerVelocity(playerid, X, Y, Z);
  2591.     #endif
  2592. }
  2593.  
  2594. #if defined _ALS_SetPlayerVelocity
  2595.     #undef SetPlayerVelocity
  2596. #else
  2597.     #define _ALS_SetPlayerVelocity
  2598. #endif
  2599. #define SetPlayerVelocity acc_SetPlayerVelocity
  2600.  
  2601. stock orig_PutPlayerInVehicle(playerid, vehicleid, seatid) return PutPlayerInVehicle(playerid, vehicleid, seatid);
  2602.  
  2603. stock acc_PutPlayerInVehicle(playerid, vehicleid, seatid)
  2604. {
  2605.     #if defined FILTERSCRIPT
  2606.         return CallRemoteFunction("ac_PutPlayerInVehicle", "iii", playerid, vehicleid, seatid);
  2607.     #else
  2608.         return ac_PutPlayerInVehicle(playerid, vehicleid, seatid);
  2609.     #endif
  2610. }
  2611.  
  2612. #if defined _ALS_PutPlayerInVehicle
  2613.     #undef PutPlayerInVehicle
  2614. #else
  2615.     #define _ALS_PutPlayerInVehicle
  2616. #endif
  2617. #define PutPlayerInVehicle acc_PutPlayerInVehicle
  2618.  
  2619. stock orig_RemovePlayerFromVehicle(playerid) return RemovePlayerFromVehicle(playerid);
  2620.  
  2621. stock acc_RemovePlayerFromVehicle(playerid)
  2622. {
  2623.     #if defined FILTERSCRIPT
  2624.         return CallRemoteFunction("ac_RemovePlayerFromVehicle", "i", playerid);
  2625.     #else
  2626.         return ac_RemovePlayerFromVehicle(playerid);
  2627.     #endif
  2628. }
  2629.  
  2630. #if defined _ALS_RemovePlayerFromVehicle
  2631.     #undef RemovePlayerFromVehicle
  2632. #else
  2633.     #define _ALS_RemovePlayerFromVehicle
  2634. #endif
  2635. #define RemovePlayerFromVehicle acc_RemovePlayerFromVehicle
  2636.  
  2637. stock orig_SetVehiclePos(vehicleid, Float:x, Float:y, Float:z) return SetVehiclePos(vehicleid, x, y, z);
  2638.  
  2639. stock acc_SetVehiclePos(vehicleid, Float:x, Float:y, Float:z)
  2640. {
  2641.     #if defined FILTERSCRIPT
  2642.         return CallRemoteFunction("ac_SetVehiclePos", "ifff", vehicleid, x, y, z);
  2643.     #else
  2644.         return ac_SetVehiclePos(vehicleid, x, y, z);
  2645.     #endif
  2646. }
  2647.  
  2648. #if defined _ALS_SetVehiclePos
  2649.     #undef SetVehiclePos
  2650. #else
  2651.     #define _ALS_SetVehiclePos
  2652. #endif
  2653. #define SetVehiclePos acc_SetVehiclePos
  2654.  
  2655. stock orig_SetVehicleVelocity(vehicleid, Float:X, Float:Y, Float:Z) return SetVehicleVelocity(vehicleid, X, Y, Z);
  2656.  
  2657. stock acc_SetVehicleVelocity(vehicleid, Float:X, Float:Y, Float:Z)
  2658. {
  2659.     #if defined FILTERSCRIPT
  2660.         return CallRemoteFunction("ac_SetVehicleVelocity", "ifff", vehicleid, X, Y, Z);
  2661.     #else
  2662.         return ac_SetVehicleVelocity(vehicleid, X, Y, Z);
  2663.     #endif
  2664. }
  2665.  
  2666. #if defined _ALS_SetVehicleVelocity
  2667.     #undef SetVehicleVelocity
  2668. #else
  2669.     #define _ALS_SetVehicleVelocity
  2670. #endif
  2671. #define SetVehicleVelocity acc_SetVehicleVelocity
  2672.  
  2673. stock orig_SetVehicleAngularVelocity(vehicleid, Float:X, Float:Y, Float:Z) return SetVehicleAngularVelocity(vehicleid, X, Y, Z);
  2674.  
  2675. stock acc_SetVehicleAngularVelocity(vehicleid, Float:X, Float:Y, Float:Z)
  2676. {
  2677.     #if defined FILTERSCRIPT
  2678.         return CallRemoteFunction("ac_SetVehicleAngularVelocity", "ifff", vehicleid, X, Y, Z);
  2679.     #else
  2680.         return ac_SetVehicleAngularVelocity(vehicleid, X, Y, Z);
  2681.     #endif
  2682. }
  2683.  
  2684. #if defined _ALS_SetVehicleAngularVelocity
  2685.     #undef SetVehicleAngularVelocity
  2686. #else
  2687.     #define _ALS_SetVehicleAngularVelocity
  2688. #endif
  2689. #define SetVehicleAngularVelocity acc_SetVehicleAngularVelocity
  2690.  
  2691. stock orig_LinkVehicleToInterior(vehicleid, interiorid) return LinkVehicleToInterior(vehicleid, interiorid);
  2692.  
  2693. stock acc_LinkVehicleToInterior(vehicleid, interiorid)
  2694. {
  2695.     #if defined FILTERSCRIPT
  2696.         return CallRemoteFunction("ac_LinkVehicleToInterior", "ii", vehicleid, interiorid);
  2697.     #else
  2698.         return ac_LinkVehicleToInterior(vehicleid, interiorid);
  2699.     #endif
  2700. }
  2701.  
  2702. #if defined _ALS_LinkVehicleToInterior
  2703.     #undef LinkVehicleToInterior
  2704. #else
  2705.     #define _ALS_LinkVehicleToInterior
  2706. #endif
  2707. #define LinkVehicleToInterior acc_LinkVehicleToInterior
  2708.  
  2709. stock orig_ChangeVehiclePaintjob(vehicleid, paintjobid) return ChangeVehiclePaintjob(vehicleid, paintjobid);
  2710.  
  2711. stock acc_ChangeVehiclePaintjob(vehicleid, paintjobid)
  2712. {
  2713.     if(GetVehicleModel(vehicleid) <= 0) return 1;
  2714.     #if defined FILTERSCRIPT
  2715.         return CallRemoteFunction("ac_ChangeVehiclePaintjob", "ii", vehicleid, paintjobid);
  2716.     #else
  2717.         return ac_ChangeVehiclePaintjob(vehicleid, paintjobid);
  2718.     #endif
  2719. }
  2720.  
  2721. #if defined _ALS_ChangeVehiclePaintjob
  2722.     #undef ChangeVehiclePaintjob
  2723. #else
  2724.     #define _ALS_ChangeVehiclePaintjob
  2725. #endif
  2726. #define ChangeVehiclePaintjob acc_ChangeVehiclePaintjob
  2727.  
  2728. stock orig_SetVehicleHealth(vehicleid, Float:health) return SetVehicleHealth(vehicleid, health);
  2729.  
  2730. stock acc_SetVehicleHealth(vehicleid, Float:health)
  2731. {
  2732.     if(health < 0.0) health = 0.0;
  2733.     #if defined FILTERSCRIPT
  2734.         return CallRemoteFunction("ac_SetVehicleHealth", "if", vehicleid, health);
  2735.     #else
  2736.         return ac_SetVehicleHealth(vehicleid, health);
  2737.     #endif
  2738. }
  2739.  
  2740. #if defined _ALS_SetVehicleHealth
  2741.     #undef SetVehicleHealth
  2742. #else
  2743.     #define _ALS_SetVehicleHealth
  2744. #endif
  2745. #define SetVehicleHealth acc_SetVehicleHealth
  2746.  
  2747. stock orig_RepairVehicle(vehicleid) return RepairVehicle(vehicleid);
  2748.  
  2749. stock acc_RepairVehicle(vehicleid)
  2750. {
  2751.     #if defined FILTERSCRIPT
  2752.         return CallRemoteFunction("ac_RepairVehicle", "i", vehicleid);
  2753.     #else
  2754.         return ac_RepairVehicle(vehicleid);
  2755.     #endif
  2756. }
  2757.  
  2758. #if defined _ALS_RepairVehicle
  2759.     #undef RepairVehicle
  2760. #else
  2761.     #define _ALS_RepairVehicle
  2762. #endif
  2763. #define RepairVehicle acc_RepairVehicle
  2764.  
  2765. stock orig_SetVehicleToRespawn(vehicleid) return SetVehicleToRespawn(vehicleid);
  2766.  
  2767. stock acc_SetVehicleToRespawn(vehicleid)
  2768. {
  2769.     if(GetVehicleModel(vehicleid) <= 0) return 0;
  2770.     #if defined FILTERSCRIPT
  2771.         return CallRemoteFunction("ac_SetVehicleToRespawn", "i", vehicleid);
  2772.     #else
  2773.         return ac_SetVehicleToRespawn(vehicleid);
  2774.     #endif
  2775. }
  2776.  
  2777. #if defined _ALS_SetVehicleToRespawn
  2778.     #undef SetVehicleToRespawn
  2779. #else
  2780.     #define _ALS_SetVehicleToRespawn
  2781. #endif
  2782. #define SetVehicleToRespawn acc_SetVehicleToRespawn
  2783.  
  2784. stock EnableAntiCheat(code, enable)
  2785. {
  2786.     #if defined FILTERSCRIPT
  2787.         return CallRemoteFunction("ac_EnableAntiCheat", "ii", code, enable);
  2788.     #else
  2789.         return ac_EnableAntiCheat(code, enable);
  2790.     #endif
  2791. }
  2792.  
  2793. stock EnableAntiNOP(nopcode, enable)
  2794. {
  2795.     #if defined FILTERSCRIPT
  2796.         return CallRemoteFunction("ac_EnableAntiNOP", "ii", nopcode, enable);
  2797.     #else
  2798.         return ac_EnableAntiNOP(nopcode, enable);
  2799.     #endif
  2800. }
  2801.  
  2802. stock EnableAntiCheatForPlayer(playerid, code, enable)
  2803. {
  2804.     if(!IsPlayerConnected(playerid)) return 0;
  2805.     #if defined FILTERSCRIPT
  2806.         return CallRemoteFunction("ac_EnableAntiCheatForPlayer", "iii", playerid, code, enable);
  2807.     #else
  2808.         return ac_EnableAntiCheatForPlayer(playerid, code, enable);
  2809.     #endif
  2810. }
  2811.  
  2812. stock EnableAntiNOPForPlayer(playerid, nopcode, enable)
  2813. {
  2814.     if(!IsPlayerConnected(playerid)) return 0;
  2815.     #if defined FILTERSCRIPT
  2816.         return CallRemoteFunction("ac_EnableAntiNOPForPlayer", "iii", playerid, nopcode, enable);
  2817.     #else
  2818.         return ac_EnableAntiNOPForPlayer(playerid, nopcode, enable);
  2819.     #endif
  2820. }
  2821.  
  2822. stock IsAntiCheatEnabled(code)
  2823. {
  2824.     #if defined FILTERSCRIPT
  2825.         return CallRemoteFunction("ac_IsAntiCheatEnabled", "i", code);
  2826.     #else
  2827.         return ac_IsAntiCheatEnabled(code);
  2828.     #endif
  2829. }
  2830.  
  2831. stock IsAntiNOPEnabled(nopcode)
  2832. {
  2833.     #if defined FILTERSCRIPT
  2834.         return CallRemoteFunction("ac_IsAntiNOPEnabled", "i", nopcode);
  2835.     #else
  2836.         return ac_IsAntiNOPEnabled(nopcode);
  2837.     #endif
  2838. }
  2839.  
  2840. stock IsAntiCheatEnabledForPlayer(playerid, code)
  2841. {
  2842.     if(!IsPlayerConnected(playerid)) return 0;
  2843.     #if defined FILTERSCRIPT
  2844.         return CallRemoteFunction("ac_IsAntiCheatEnabledForPlayer", "ii", playerid, code);
  2845.     #else
  2846.         return ac_IsAntiCheatEnabledForPlayer(playerid, code);
  2847.     #endif
  2848. }
  2849.  
  2850. stock IsAntiNOPEnabledForPlayer(playerid, nopcode)
  2851. {
  2852.     if(!IsPlayerConnected(playerid)) return 0;
  2853.     #if defined FILTERSCRIPT
  2854.         return CallRemoteFunction("ac_IsAntiNOPEnabledForPlayer", "ii", playerid, nopcode);
  2855.     #else
  2856.         return ac_IsAntiNOPEnabledForPlayer(playerid, nopcode);
  2857.     #endif
  2858. }
  2859.  
  2860. stock AntiCheatGetSpeed(playerid)
  2861. {
  2862.     if(!IsPlayerConnected(playerid)) return 0;
  2863.     #if defined FILTERSCRIPT
  2864.         return CallRemoteFunction("ac_AntiCheatGetSpeed", "i", playerid);
  2865.     #else
  2866.         return ac_AntiCheatGetSpeed(playerid);
  2867.     #endif
  2868. }
  2869.  
  2870. stock AntiCheatGetAnimationIndex(playerid)
  2871. {
  2872.     if(!IsPlayerConnected(playerid)) return 0;
  2873.     #if defined FILTERSCRIPT
  2874.         return CallRemoteFunction("ac_AntiCheatGetAnimationIndex", "i", playerid);
  2875.     #else
  2876.         return ac_AntiCheatGetAnimationIndex(playerid);
  2877.     #endif
  2878. }
  2879.  
  2880. stock AntiCheatGetDialog(playerid)
  2881. {
  2882.     if(!IsPlayerConnected(playerid)) return -1;
  2883.     #if defined FILTERSCRIPT
  2884.         return CallRemoteFunction("ac_AntiCheatGetDialog", "i", playerid);
  2885.     #else
  2886.         return ac_AntiCheatGetDialog(playerid);
  2887.     #endif
  2888. }
  2889.  
  2890. stock AntiCheatGetEnterVehicle(playerid)
  2891. {
  2892.     if(!IsPlayerConnected(playerid)) return 0;
  2893.     #if defined FILTERSCRIPT
  2894.         return CallRemoteFunction("ac_AntiCheatGetEnterVehicle", "i", playerid);
  2895.     #else
  2896.         return ac_AntiCheatGetEnterVehicle(playerid);
  2897.     #endif
  2898. }
  2899.  
  2900. stock AntiCheatGetVehicleID(playerid)
  2901. {
  2902.     if(!IsPlayerConnected(playerid)) return 0;
  2903.     #if defined FILTERSCRIPT
  2904.         return CallRemoteFunction("ac_AntiCheatGetVehicleID", "i", playerid);
  2905.     #else
  2906.         return ac_AntiCheatGetVehicleID(playerid);
  2907.     #endif
  2908. }
  2909.  
  2910. stock AntiCheatGetWeapon(playerid)
  2911. {
  2912.     if(!IsPlayerConnected(playerid)) return -1;
  2913.     #if defined FILTERSCRIPT
  2914.         return CallRemoteFunction("ac_AntiCheatGetWeapon", "i", playerid);
  2915.     #else
  2916.         return ac_AntiCheatGetWeapon(playerid);
  2917.     #endif
  2918. }
  2919.  
  2920. stock AntiCheatGetVehicleSeat(playerid)
  2921. {
  2922.     if(!IsPlayerConnected(playerid)) return -1;
  2923.     #if defined FILTERSCRIPT
  2924.         return CallRemoteFunction("ac_AntiCheatGetVehicleSeat", "i", playerid);
  2925.     #else
  2926.         return ac_AntiCheatGetVehicleSeat(playerid);
  2927.     #endif
  2928. }
  2929.  
  2930. stock AntiCheatGetSpecialAction(playerid)
  2931. {
  2932.     if(!IsPlayerConnected(playerid)) return 0;
  2933.     #if defined FILTERSCRIPT
  2934.         return CallRemoteFunction("ac_AntiCheatGetSpecialAction", "i", playerid);
  2935.     #else
  2936.         return ac_AntiCheatGetSpecialAction(playerid);
  2937.     #endif
  2938. }
  2939.  
  2940. stock AntiCheatGetLastSpecialAction(playerid)
  2941. {
  2942.     if(!IsPlayerConnected(playerid)) return 0;
  2943.     #if defined FILTERSCRIPT
  2944.         return CallRemoteFunction("ac_AntiCheatGetLastSpecialActio", "i", playerid);
  2945.     #else
  2946.         return ac_AntiCheatGetLastSpecialActio(playerid);
  2947.     #endif
  2948. }
  2949.  
  2950. stock AntiCheatGetLastShotWeapon(playerid)
  2951. {
  2952.     if(!IsPlayerConnected(playerid)) return -1;
  2953.     #if defined FILTERSCRIPT
  2954.         return CallRemoteFunction("ac_AntiCheatGetLastShotWeapon", "i", playerid);
  2955.     #else
  2956.         return ac_AntiCheatGetLastShotWeapon(playerid);
  2957.     #endif
  2958. }
  2959.  
  2960. stock AntiCheatGetLastPickup(playerid)
  2961. {
  2962.     if(!IsPlayerConnected(playerid)) return -1;
  2963.     #if defined FILTERSCRIPT
  2964.         return CallRemoteFunction("ac_AntiCheatGetLastPickup", "i", playerid);
  2965.     #else
  2966.         return ac_AntiCheatGetLastPickup(playerid);
  2967.     #endif
  2968. }
  2969.  
  2970. stock AntiCheatGetLastUpdateTime(playerid)
  2971. {
  2972.     if(!IsPlayerConnected(playerid)) return 0;
  2973.     #if defined FILTERSCRIPT
  2974.         return CallRemoteFunction("ac_AntiCheatGetLastUpdateTime", "i", playerid);
  2975.     #else
  2976.         return ac_AntiCheatGetLastUpdateTime(playerid);
  2977.     #endif
  2978. }
  2979.  
  2980. stock AntiCheatGetLastReloadTime(playerid)
  2981. {
  2982.     if(!IsPlayerConnected(playerid)) return 0;
  2983.     #if defined FILTERSCRIPT
  2984.         return CallRemoteFunction("ac_AntiCheatGetLastReloadTime", "i", playerid);
  2985.     #else
  2986.         return ac_AntiCheatGetLastReloadTime(playerid);
  2987.     #endif
  2988. }
  2989.  
  2990. stock AntiCheatGetLastEnteredVehTime(playerid)
  2991. {
  2992.     if(!IsPlayerConnected(playerid)) return 0;
  2993.     #if defined FILTERSCRIPT
  2994.         return CallRemoteFunction("ac_AntiCheatGetLastEnteredVehTi", "i", playerid);
  2995.     #else
  2996.         return ac_AntiCheatGetLastEnteredVehTi(playerid);
  2997.     #endif
  2998. }
  2999.  
  3000. stock AntiCheatGetLastShotTime(playerid)
  3001. {
  3002.     if(!IsPlayerConnected(playerid)) return 0;
  3003.     #if defined FILTERSCRIPT
  3004.         return CallRemoteFunction("ac_AntiCheatGetLastShotTime", "i", playerid);
  3005.     #else
  3006.         return ac_AntiCheatGetLastShotTime(playerid);
  3007.     #endif
  3008. }
  3009.  
  3010. stock AntiCheatGetLastSpawnTime(playerid)
  3011. {
  3012.     if(!IsPlayerConnected(playerid)) return 0;
  3013.     #if defined FILTERSCRIPT
  3014.         return CallRemoteFunction("ac_AntiCheatGetLastSpawnTime", "i", playerid);
  3015.     #else
  3016.         return ac_AntiCheatGetLastSpawnTime(playerid);
  3017.     #endif
  3018. }
  3019.  
  3020. stock AntiCheatIntEnterExitsIsEnabled(playerid)
  3021. {
  3022.     if(!IsPlayerConnected(playerid)) return 0;
  3023.     #if defined FILTERSCRIPT
  3024.         return CallRemoteFunction("ac_AntiCheatIntEnterExitsIsEnab", "i", playerid);
  3025.     #else
  3026.         return ac_AntiCheatIntEnterExitsIsEnab(playerid);
  3027.     #endif
  3028. }
  3029.  
  3030. stock AntiCheatStuntBonusIsEnabled(playerid)
  3031. {
  3032.     if(!IsPlayerConnected(playerid)) return 0;
  3033.     #if defined FILTERSCRIPT
  3034.         return CallRemoteFunction("ac_AntiCheatStuntBonusIsEnabled", "i", playerid);
  3035.     #else
  3036.         return ac_AntiCheatStuntBonusIsEnabled(playerid);
  3037.     #endif
  3038. }
  3039.  
  3040. stock AntiCheatIsInModShop(playerid)
  3041. {
  3042.     if(!IsPlayerConnected(playerid)) return 0;
  3043.     #if defined FILTERSCRIPT
  3044.         return CallRemoteFunction("ac_AntiCheatIsInModShop", "i", playerid);
  3045.     #else
  3046.         return ac_AntiCheatIsInModShop(playerid);
  3047.     #endif
  3048. }
  3049.  
  3050. stock AntiCheatIsFrozen(playerid)
  3051. {
  3052.     if(!IsPlayerConnected(playerid)) return 0;
  3053.     #if defined FILTERSCRIPT
  3054.         return CallRemoteFunction("ac_AntiCheatIsFrozen", "i", playerid);
  3055.     #else
  3056.         return ac_AntiCheatIsFrozen(playerid);
  3057.     #endif
  3058. }
  3059.  
  3060. stock AntiCheatIsDead(playerid)
  3061. {
  3062.     if(!IsPlayerConnected(playerid)) return 0;
  3063.     #if defined FILTERSCRIPT
  3064.         return CallRemoteFunction("ac_AntiCheatIsDead", "i", playerid);
  3065.     #else
  3066.         return ac_AntiCheatIsDead(playerid);
  3067.     #endif
  3068. }
  3069.  
  3070. stock AntiCheatIsConnected(playerid)
  3071. {
  3072.     if(!IsPlayerConnected(playerid)) return 0;
  3073.     #if defined FILTERSCRIPT
  3074.         return CallRemoteFunction("ac_AntiCheatIsConnected", "i", playerid);
  3075.     #else
  3076.         return ac_AntiCheatIsConnected(playerid);
  3077.     #endif
  3078. }
  3079.  
  3080. stock AntiCheatKickWithDesync(playerid, code)
  3081. {
  3082.     if(!IsPlayerConnected(playerid)) return 0;
  3083.     #if defined FILTERSCRIPT
  3084.         return CallRemoteFunction("ac_AntiCheatKickWithDesync", "ii", playerid, code);
  3085.     #else
  3086.         return ac_AntiCheatKickWithDesync(playerid, code);
  3087.     #endif
  3088. }
  3089.  
  3090. stock AntiCheatIsKickedWithDesync(playerid)
  3091. {
  3092.     if(!IsPlayerConnected(playerid)) return 3;
  3093.     #if defined FILTERSCRIPT
  3094.         return CallRemoteFunction("ac_AntiCheatIsKickedWithDesync", "i", playerid);
  3095.     #else
  3096.         return ac_AntiCheatIsKickedWithDesync(playerid);
  3097.     #endif
  3098. }
  3099.  
  3100. stock AntiCheatGetVehicleDriver(vehicleid)
  3101. {
  3102.     if(GetVehicleModel(vehicleid) <= 0) return INVALID_PLAYER_ID;
  3103.     #if defined FILTERSCRIPT
  3104.         return CallRemoteFunction("ac_AntiCheatGetVehicleDriver", "i", vehicleid);
  3105.     #else
  3106.         return ac_AntiCheatGetVehicleDriver(vehicleid);
  3107.     #endif
  3108. }
  3109.  
  3110. stock AntiCheatGetVehicleInterior(vehicleid)
  3111. {
  3112.     if(GetVehicleModel(vehicleid) <= 0) return 0;
  3113.     #if defined FILTERSCRIPT
  3114.         return CallRemoteFunction("ac_AntiCheatGetVehicleInterior", "i", vehicleid);
  3115.     #else
  3116.         return ac_AntiCheatGetVehicleInterior(vehicleid);
  3117.     #endif
  3118. }
  3119.  
  3120. stock AntiCheatGetVehiclePaintjob(vehicleid)
  3121. {
  3122.     if(GetVehicleModel(vehicleid) <= 0) return 3;
  3123.     #if defined FILTERSCRIPT
  3124.         return CallRemoteFunction("ac_AntiCheatGetVehiclePaintjob", "i", vehicleid);
  3125.     #else
  3126.         return ac_AntiCheatGetVehiclePaintjob(vehicleid);
  3127.     #endif
  3128. }
  3129.  
  3130. stock AntiCheatGetInterior(playerid)
  3131. {
  3132.     if(!IsPlayerConnected(playerid)) return 0;
  3133.     #if defined FILTERSCRIPT
  3134.         return CallRemoteFunction("ac_AntiCheatGetInterior", "i", playerid);
  3135.     #else
  3136.         return ac_AntiCheatGetInterior(playerid);
  3137.     #endif
  3138. }
  3139.  
  3140. #if defined FILTERSCRIPT
  3141.  
  3142. static fs_AntiCheatGetNextDialog(playerid)
  3143. {
  3144.     if(!IsPlayerConnected(playerid)) return -1;
  3145.     return CallRemoteFunction("ac_AntiCheatGetNextDialog", "i", playerid);
  3146. }
  3147.  
  3148. static fs_AntiCheatSetDialog(playerid, dialogid)
  3149. {
  3150.     if(!(0 <= playerid < MAX_PLAYERS)) return 0;
  3151.     return CallRemoteFunction("ac_ShowPlayerDialog", "id", playerid, dialogid);
  3152. }
  3153.  
  3154. static fs_AntiCheatSetNextDialog(playerid, dialogid)
  3155. {
  3156.     if(!(0 <= playerid < MAX_PLAYERS)) return 0;
  3157.     return CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, dialogid);
  3158. }
  3159.  
  3160. #else
  3161.  
  3162. public OnGameModeInit()
  3163. {
  3164.     #if AC_USE_CONFIG_FILES
  3165.         if(!ac_LoadCfg()) printf(CFG_OPENING_ERROR, AC_CONFIG_FILE);
  3166.         if(!ac_LoadNOPCfg()) printf(CFG_OPENING_ERROR, AC_NOP_CONFIG_FILE);
  3167.     #endif
  3168.     if(ac_ACAllow[42])
  3169.     {
  3170.         #if !AC_USE_QUERY
  3171.             ac_QueryEnable = !!GetServerVarAsBool("query");
  3172.             SendRconCommand("query 0");
  3173.         #endif
  3174.         #undef AC_USE_QUERY
  3175.         ac_RconEnable = !!GetServerVarAsBool("rcon");
  3176.         SendRconCommand("rcon 0");
  3177.     }
  3178.     ac_LagCompMode = !!GetServerVarAsInt("lagcompmode");
  3179.     print(" ");
  3180.     print("--------------------------------------");
  3181.     print(LOADED_MSG_1);
  3182.     printf(LOADED_MSG_2, NEX_AC_VERSION);
  3183.     print(LOADED_MSG_3);
  3184.     print("--------------------------------------\n");
  3185.     new ac_a = 1;
  3186.     #if defined ac_OnGameModeInit
  3187.         ac_a = ac_OnGameModeInit();
  3188.     #endif
  3189.     static ac_strtmp[10];
  3190.     GetServerVarAsString("version", ac_strtmp, sizeof ac_strtmp);
  3191.     if(strfind(ac_strtmp, AC_SERVER_VERSION) == -1 && strfind(ac_strtmp, AC_SERVER_DL_VERSION) == -1) print(VERSION_WARNING);
  3192.     #undef AC_SERVER_DL_VERSION
  3193.     #undef AC_SERVER_VERSION
  3194.     return ac_a;
  3195. }
  3196.  
  3197. #if defined _ALS_OnGameModeInit
  3198.     #undef OnGameModeInit
  3199. #else
  3200.     #define _ALS_OnGameModeInit
  3201. #endif
  3202. #define OnGameModeInit ac_OnGameModeInit
  3203. #if defined ac_OnGameModeInit
  3204.     forward ac_OnGameModeInit();
  3205. #endif
  3206.  
  3207. #if AC_USE_STATISTICS
  3208.     public OnGameModeExit()
  3209.     {
  3210.         new ac_a = 1;
  3211.         #if defined ac_OnGameModeExit
  3212.             ac_a = ac_OnGameModeExit();
  3213.         #endif
  3214.         print(" ");
  3215.         print("--------------------------------------");
  3216.         print(STATS_STRING_1);
  3217.         print(STATS_STRING_2);
  3218.         printf(STATS_STRING_3, ac_sInfo[0]);
  3219.         printf(STATS_STRING_4, ac_sInfo[1]);
  3220.         printf(STATS_STRING_5, ac_sInfo[2]);
  3221.         printf(STATS_STRING_6, ac_sInfo[3]);
  3222.         printf(STATS_STRING_7, ac_sInfo[4]);
  3223.         printf(STATS_STRING_8, ac_sInfo[5]);
  3224.         print("--------------------------------------\n");
  3225.         return ac_a;
  3226.     }
  3227.  
  3228.     #if defined _ALS_OnGameModeExit
  3229.         #undef OnGameModeExit
  3230.     #else
  3231.         #define _ALS_OnGameModeExit
  3232.     #endif
  3233.     #define OnGameModeExit ac_OnGameModeExit
  3234.     #if defined ac_OnGameModeExit
  3235.         forward ac_OnGameModeExit();
  3236.     #endif
  3237. #endif
  3238.  
  3239. public OnPlayerConnect(playerid)
  3240. {
  3241.     ACInfo[playerid][acVeh] =
  3242.     ACInfo[playerid][acKicked] =
  3243.     ACInfo[playerid][acKickVeh] = 0;
  3244.     GetPlayerIp(playerid, ACInfo[playerid][acIp], 16);
  3245.     #if AC_USE_NPC
  3246.         if(IsPlayerNPC(playerid))
  3247.         {
  3248.             if(ac_ACAllow[36])
  3249.             {
  3250.                 #if defined GetLocalIP
  3251.                     new bool:ac_rslt;
  3252.                     static ac_strtmp[16];
  3253.                     ac_strtmp = "127.0.0.1";
  3254.                     while(ac_strtmp[0])
  3255.                     {
  3256.                         if(!strcmp(ACInfo[playerid][acIp], ac_strtmp))
  3257.                         {
  3258.                             ac_rslt = true;
  3259.                             break;
  3260.                         }
  3261.                         GetLocalIP(0, ac_strtmp);
  3262.                     }
  3263.                     if(!ac_rslt)
  3264.                     {
  3265.                         #if defined DEBUG
  3266.                             printf("[Nex-AC debug] NPC's IP: '%s'", ACInfo[playerid][acIp]);
  3267.                         #endif
  3268.                         ac_KickWithCode(playerid, "", 0, 36);
  3269.                     }
  3270.                 #else
  3271.                     if(strcmp(ACInfo[playerid][acIp], "127.0.0.1")) ac_KickWithCode(playerid, "", 0, 36);
  3272.                 #endif
  3273.             }
  3274.             ACInfo[playerid][acTimerID] = 0;
  3275.         }
  3276.         else
  3277.         {
  3278.     #else
  3279.         if(ac_ACAllow[36] && IsPlayerNPC(playerid)) ac_KickWithCode(playerid, "", 0, 36);
  3280.     #endif
  3281.         if(ac_ACAllow[48] && ACInfo[playerid][acOnline]) ac_KickWithCode(playerid, "", 0, 48, 1);
  3282.         if(ac_ACAllow[41])
  3283.         {
  3284.             static ac_ver[24];
  3285.             GetPlayerVersion(playerid, ac_ver, sizeof ac_ver);
  3286.             if(strfind(ac_ver, AC_CLIENT_VERSION) == -1)
  3287.             {
  3288.                 #undef AC_CLIENT_VERSION
  3289.                 #if defined DEBUG
  3290.                     printf(DEBUG_CODE_2, playerid, ac_ver);
  3291.                 #endif
  3292.                 ac_KickWithCode(playerid, "", 0, 41);
  3293.             }
  3294.         }
  3295.         new ac_i = AC_MAX_CONNECTS_FROM_IP;
  3296.         if(ac_ACAllow[40])
  3297.         {
  3298.             #if defined foreach
  3299.                 foreach(new ac_j : Player)
  3300.                 {
  3301.                     #if AC_USE_NPC
  3302.                         if(ac_j != playerid && !IsPlayerNPC(ac_j) && !strcmp(ACInfo[playerid][acIp], ACInfo[ac_j][acIp], false))
  3303.                     #else
  3304.                         if(ac_j != playerid && !strcmp(ACInfo[playerid][acIp], ACInfo[ac_j][acIp], false))
  3305.                     #endif
  3306.             #else
  3307.                 #if defined GetPlayerPoolSize
  3308.                     for(new ac_j = GetPlayerPoolSize(); ac_j >= 0; --ac_j)
  3309.                 #else
  3310.                     for(new ac_j = MAX_PLAYERS - 1; ac_j >= 0; --ac_j)
  3311.                 #endif
  3312.                 {
  3313.                     #if AC_USE_NPC
  3314.                         if(ac_j != playerid && IsPlayerConnected(ac_j) && !IsPlayerNPC(ac_j) &&
  3315.                         !strcmp(ACInfo[playerid][acIp], ACInfo[ac_j][acIp], false))
  3316.                     #else
  3317.                         if(ac_j != playerid && IsPlayerConnected(ac_j) &&
  3318.                         !strcmp(ACInfo[playerid][acIp], ACInfo[ac_j][acIp], false))
  3319.                     #endif
  3320.             #endif
  3321.                 {
  3322.                     ac_i--;
  3323.                     if(ac_i < 1)
  3324.                     {
  3325.                         #if defined DEBUG
  3326.                             printf(DEBUG_CODE_3, playerid, AC_MAX_CONNECTS_FROM_IP);
  3327.                         #endif
  3328.                         ac_KickWithCode(playerid, "", 0, 40);
  3329.                         break;
  3330.                     }
  3331.                 }
  3332.             }
  3333.         }
  3334.         ACInfo[playerid][acSpec] =
  3335.         ACInfo[playerid][acSpawned] =
  3336.         ACInfo[playerid][acDeathRes] = false;
  3337.         ACInfo[playerid][acDead] = true;
  3338.         ACInfo[playerid][acIntEnterExits] = ac_IntEnterExits;
  3339.         ACInfo[playerid][acStuntBonus] = ac_StuntBonus;
  3340.         ACInfo[playerid][acCheatCount][0] =
  3341.         ACInfo[playerid][acLastWeapon] =
  3342.         ACInfo[playerid][acSpawnRes] =
  3343.         ACInfo[playerid][acMoney] =
  3344.         ACInfo[playerid][acAnim] =
  3345.         ACInfo[playerid][acInt] = 0;
  3346.         ACInfo[playerid][acSet][12] =
  3347.         ACInfo[playerid][acSet][10] =
  3348.         ACInfo[playerid][acSet][0] =
  3349.         ACInfo[playerid][acNextDialog] =
  3350.         ACInfo[playerid][acDialog] = -1;
  3351.         ACInfo[playerid][acDropJpX] =
  3352.         ACInfo[playerid][acDropJpY] =
  3353.         ACInfo[playerid][acDropJpZ] = 25000.0;
  3354.         for(ac_i = 12; ac_i >= 0; --ac_i)
  3355.         {
  3356.             ACInfo[playerid][acSetWeapon][ac_i] = -1;
  3357.             ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  3358.         }
  3359.         for(ac_i = 27; ac_i >= 0; --ac_i) ACInfo[playerid][acFloodCount][ac_i] = 0;
  3360.         memcpy(ACInfo[playerid][acNOPAllow], ac_NOPAllow, 0, sizeof(ac_NOPAllow) * 4, sizeof ac_NOPAllow);
  3361.         memcpy(ACInfo[playerid][acACAllow], ac_ACAllow, 0, sizeof(ac_ACAllow) * 4, sizeof ac_ACAllow);
  3362.         if(ACInfo[playerid][acKicked] < 1)
  3363.         {
  3364.             ACInfo[playerid][acTimerTick] = GetTickCount();
  3365.             ACInfo[playerid][acTimerID] = SetTimerEx("ac_Timer", 1000, false, "i", playerid);
  3366.         }
  3367.     #if AC_USE_NPC
  3368.         }
  3369.     #endif
  3370.     ACInfo[playerid][acOnline] = true;
  3371.     #if defined ac_OnPlayerConnect
  3372.         return ac_OnPlayerConnect(playerid);
  3373.     #else
  3374.         return 1;
  3375.     #endif
  3376. }
  3377.  
  3378. #if defined _ALS_OnPlayerConnect
  3379.     #undef OnPlayerConnect
  3380. #else
  3381.     #define _ALS_OnPlayerConnect
  3382. #endif
  3383. #define OnPlayerConnect ac_OnPlayerConnect
  3384. #if defined ac_OnPlayerConnect
  3385.     forward ac_OnPlayerConnect(playerid);
  3386. #endif
  3387.  
  3388. public OnPlayerDisconnect(playerid, reason)
  3389. {
  3390.     #if AC_USE_NPC
  3391.         if(!IsPlayerNPC(playerid))
  3392.         {
  3393.     #endif
  3394.         #if defined KillPlayerTimer
  3395.             KillPlayerTimer(ACInfo[playerid][acTimerID]);
  3396.         #else
  3397.             KillTimer(ACInfo[playerid][acTimerID]);
  3398.         #endif
  3399.         #if defined BlockIpAddress && AC_MAX_CONNECTS_FROM_IP < 2
  3400.             if(ACInfo[playerid][acACAllow][37]) BlockIpAddress(ACInfo[playerid][acIp],
  3401.             (AC_MIN_TIME_RECONNECT * 1000) - (reason > 0 ? 0 : GetServerVarAsInt("playertimeout")));
  3402.         #endif
  3403.         #undef AC_MAX_CONNECTS_FROM_IP
  3404.         #undef AC_MIN_TIME_RECONNECT
  3405.     #if AC_USE_NPC
  3406.         }
  3407.     #endif
  3408.     #if defined KillPlayerTimer
  3409.         KillPlayerTimer(ACInfo[playerid][acKickTimerID]);
  3410.     #else
  3411.         KillTimer(ACInfo[playerid][acKickTimerID]);
  3412.     #endif
  3413.     new ac_vehid = ACInfo[playerid][acKickVeh];
  3414.     if(ac_vehid > 0)
  3415.     {
  3416.         if(ACVehInfo[ac_vehid][acDriver] == playerid) ACVehInfo[ac_vehid][acDriver] = INVALID_PLAYER_ID;
  3417.         if(ACInfo[playerid][acKicked] == 2)
  3418.         {
  3419.             LinkVehicleToInterior(ac_vehid, ACVehInfo[ac_vehid][acInt]);
  3420.             SetVehicleZAngle(ac_vehid, ACVehInfo[ac_vehid][acZAngle]);
  3421.             SetVehiclePos(ac_vehid, ACVehInfo[ac_vehid][acPosX], ACVehInfo[ac_vehid][acPosY], ACVehInfo[ac_vehid][acPosZ]);
  3422.             SetVehicleHealth(ac_vehid, ACVehInfo[ac_vehid][acHealth]);
  3423.             ChangeVehiclePaintjob(ac_vehid, ACVehInfo[ac_vehid][acPaintJob]);
  3424.         }
  3425.     }
  3426.     if((ac_vehid = ACInfo[playerid][acVeh]) > 0)
  3427.     {
  3428.         if(ACVehInfo[ac_vehid][acDriver] == playerid) ACVehInfo[ac_vehid][acDriver] = INVALID_PLAYER_ID;
  3429.         if(ACInfo[playerid][acKicked] == 2)
  3430.         {
  3431.             LinkVehicleToInterior(ac_vehid, ACVehInfo[ac_vehid][acInt]);
  3432.             SetVehicleZAngle(ac_vehid, ACVehInfo[ac_vehid][acZAngle]);
  3433.             SetVehiclePos(ac_vehid, ACVehInfo[ac_vehid][acPosX], ACVehInfo[ac_vehid][acPosY], ACVehInfo[ac_vehid][acPosZ]);
  3434.             SetVehicleHealth(ac_vehid, ACVehInfo[ac_vehid][acHealth]);
  3435.             ChangeVehiclePaintjob(ac_vehid, ACVehInfo[ac_vehid][acPaintJob]);
  3436.         }
  3437.     }
  3438.     ACInfo[playerid][acOnline] = false;
  3439.     if(ACInfo[playerid][acKicked] < 1) ACInfo[playerid][acKicked] = 3;
  3440.     #if defined ac_OnPlayerDisconnect
  3441.         return ac_OnPlayerDisconnect(playerid, reason);
  3442.     #else
  3443.         return 1;
  3444.     #endif
  3445. }
  3446.  
  3447. #if defined _ALS_OnPlayerDisconnect
  3448.     #undef OnPlayerDisconnect
  3449. #else
  3450.     #define _ALS_OnPlayerDisconnect
  3451. #endif
  3452. #define OnPlayerDisconnect ac_OnPlayerDisconnect
  3453. #if defined ac_OnPlayerDisconnect
  3454.     forward ac_OnPlayerDisconnect(playerid, reason);
  3455. #endif
  3456.  
  3457. public OnPlayerSpawn(playerid)
  3458. {
  3459.     if(ACInfo[playerid][acKicked] > 0) return 0;
  3460.     #if AC_USE_NPC
  3461.         if(!IsPlayerNPC(playerid))
  3462.         {
  3463.     #endif
  3464.         new ac_i, ac_gtc = GetTickCount();
  3465.         if(ACInfo[playerid][acSpec] && ACInfo[playerid][acSet][7] < 2)
  3466.         {
  3467.             ACInfo[playerid][acSet][3] =
  3468.             ACInfo[playerid][acSet][4] =
  3469.             ACInfo[playerid][acSet][8] =
  3470.             ACInfo[playerid][acSet][9] = -1;
  3471.             ACInfo[playerid][acSpec] = false;
  3472.         }
  3473.         else
  3474.         {
  3475.             if(ACInfo[playerid][acACAllow][27] &&
  3476.             (ACInfo[playerid][acSpawnRes] < 1 || ac_gtc < ACInfo[playerid][acSpawnTick] + 1000))
  3477.             {
  3478.                 #if defined DEBUG
  3479.                     printf("[Nex-AC debug] Spawn res: %d, respawn time: %d",
  3480.                     ACInfo[playerid][acSpawnRes], ac_gtc - ACInfo[playerid][acSpawnTick]);
  3481.                 #endif
  3482.                 ac_KickWithCode(playerid, "", 0, 27);
  3483.                 #if defined OnCheatDetected
  3484.                     ACInfo[playerid][acSpawnRes] = 1;
  3485.                 #endif
  3486.             }
  3487.             if(ACInfo[playerid][acSpawnRes] > 0) ACInfo[playerid][acSpawnRes]--;
  3488.             if(!(1 <= ACInfo[playerid][acSet][7] <= 2))
  3489.             {
  3490.                 for(ac_i = 11; ac_i >= 0; --ac_i) ACInfo[playerid][acSet][ac_i] = -1;
  3491.                 SetPlayerHealth(playerid, 100.0);
  3492.                 SetPlayerArmour(playerid, 0.0);
  3493.                 SetPlayerInterior(playerid, 0);
  3494.             }
  3495.         }
  3496.         if(!(1 <= ACInfo[playerid][acSet][7] <= 2))
  3497.         {
  3498.             for(ac_i = 12; ac_i >= 0; --ac_i)
  3499.             {
  3500.                 ACInfo[playerid][acSetWeapon][ac_i] = -1;
  3501.                 ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  3502.             }
  3503.             ACInfo[playerid][acNextSpecAct] = -1;
  3504.             ACInfo[playerid][acUnFrozen] = true;
  3505.             ACInfo[playerid][acTpToZ] = false;
  3506.         }
  3507.         for(ac_i = 12; ac_i >= 0; --ac_i)
  3508.         {
  3509.             ACInfo[playerid][acWeapon][ac_i] =
  3510.             ACInfo[playerid][acAmmo][ac_i] = 0;
  3511.         }
  3512.         ACInfo[playerid][acModShop] =
  3513.         ACInfo[playerid][acDead] = false;
  3514.         ACInfo[playerid][acSpawned] = true;
  3515.         ACInfo[playerid][acLastPickup] =
  3516.         ACInfo[playerid][acEnterSeat] =
  3517.         ACInfo[playerid][acSet][7] =
  3518.         ACInfo[playerid][acSeat] = -1;
  3519.         ACInfo[playerid][acCheatCount][5] =
  3520.         ACInfo[playerid][acCheatCount][6] =
  3521.         ACInfo[playerid][acCheatCount][7] =
  3522.         ACInfo[playerid][acCheatCount][8] =
  3523.         ACInfo[playerid][acCheatCount][9] =
  3524.         ACInfo[playerid][acCheatCount][13] =
  3525.         ACInfo[playerid][acCheatCount][14] =
  3526.         ACInfo[playerid][acCheatCount][16] =
  3527.         ACInfo[playerid][acCheatCount][18] =
  3528.         ACInfo[playerid][acCheatCount][20] =
  3529.         ACInfo[playerid][acLastSpecAct] =
  3530.         ACInfo[playerid][acLastWeapon] =
  3531.         ACInfo[playerid][acParachute] =
  3532.         ACInfo[playerid][acEnterVeh] =
  3533.         ACInfo[playerid][acLastShot] =
  3534.         ACInfo[playerid][acKickVeh] =
  3535.         ACInfo[playerid][acSpecAct] =
  3536.         ACInfo[playerid][acDmgRes] =
  3537.         ACInfo[playerid][acIntRet] =
  3538.         ACInfo[playerid][acSpeed] =
  3539.         ACInfo[playerid][acVeh] = 0;
  3540.         ACInfo[playerid][acSetPosTick] = ac_gtc + 2650;
  3541.         ACInfo[playerid][acGtc][7] = ac_gtc + 1650;
  3542.         if(ac_IsValidWeapon(ACInfo[playerid][acSpawnWeapon1]))
  3543.         {
  3544.             ac_i = ac_wSlot[ACInfo[playerid][acSpawnWeapon1]];
  3545.             ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acSpawnWeapon1];
  3546.             ACInfo[playerid][acAmmo][ac_i] = ACInfo[playerid][acSpawnAmmo1];
  3547.         }
  3548.         if(ac_IsValidWeapon(ACInfo[playerid][acSpawnWeapon2]))
  3549.         {
  3550.             ac_i = ac_wSlot[ACInfo[playerid][acSpawnWeapon2]];
  3551.             ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acSpawnWeapon2];
  3552.             ACInfo[playerid][acAmmo][ac_i] = ACInfo[playerid][acSpawnAmmo2];
  3553.         }
  3554.         if(ac_IsValidWeapon(ACInfo[playerid][acSpawnWeapon3]))
  3555.         {
  3556.             ac_i = ac_wSlot[ACInfo[playerid][acSpawnWeapon3]];
  3557.             ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acSpawnWeapon3];
  3558.             ACInfo[playerid][acAmmo][ac_i] = ACInfo[playerid][acSpawnAmmo3];
  3559.         }
  3560.     #if AC_USE_NPC
  3561.         }
  3562.     #endif
  3563.     #if defined ac_OnPlayerSpawn
  3564.         return ac_OnPlayerSpawn(playerid);
  3565.     #else
  3566.         return 1;
  3567.     #endif
  3568. }
  3569.  
  3570. #if defined _ALS_OnPlayerSpawn
  3571.     #undef OnPlayerSpawn
  3572. #else
  3573.     #define _ALS_OnPlayerSpawn
  3574. #endif
  3575. #define OnPlayerSpawn ac_OnPlayerSpawn
  3576. #if defined ac_OnPlayerSpawn
  3577.     forward ac_OnPlayerSpawn(playerid);
  3578. #endif
  3579.  
  3580. public OnPlayerDeath(playerid, killerid, reason)
  3581. {
  3582.     if(ACInfo[playerid][acKicked] > 0) return 0;
  3583.     if(ACInfo[playerid][acACAllow][28] &&
  3584.     (ACInfo[playerid][acDead] || !ACInfo[playerid][acDeathRes] &&
  3585.     (reason != WEAPON_COLLISION && reason != 255 || killerid != INVALID_PLAYER_ID)))
  3586.     {
  3587.         #if defined DEBUG
  3588.             printf("[Nex-AC debug] Is dead: %d, death res: %d, killerid: %d, reason: %d",
  3589.             ACInfo[playerid][acDead], ACInfo[playerid][acDeathRes], killerid, reason);
  3590.         #endif
  3591.         ac_KickWithCode(playerid, "", 0, 28);
  3592.     }
  3593.     ACInfo[playerid][acDead] = true;
  3594.     ACInfo[playerid][acDeathRes] = false;
  3595.     if(ACInfo[playerid][acSpawnRes] < 1) ACInfo[playerid][acSpawnTick] = GetTickCount();
  3596.     ACInfo[playerid][acSpawnRes] = 1;
  3597.     #if defined ac_OnPlayerDeath
  3598.         return ac_OnPlayerDeath(playerid, killerid, reason);
  3599.     #else
  3600.         return 1;
  3601.     #endif
  3602. }
  3603.  
  3604. #if defined _ALS_OnPlayerDeath
  3605.     #undef OnPlayerDeath
  3606. #else
  3607.     #define _ALS_OnPlayerDeath
  3608. #endif
  3609. #define OnPlayerDeath ac_OnPlayerDeath
  3610. #if defined ac_OnPlayerDeath
  3611.     forward ac_OnPlayerDeath(playerid, killerid, reason);
  3612. #endif
  3613.  
  3614. #if defined OnPlayerWeaponShot
  3615.     public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
  3616. #else
  3617.     public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
  3618. #endif
  3619. {
  3620.     if(ACInfo[playerid][acKicked] > 0) return 1;
  3621.     #if defined OnPlayerWeaponShot
  3622.         if(ACInfo[playerid][acACAllow][47] &&
  3623.         (amount < 0.0 || issuerid != INVALID_PLAYER_ID && !(0 <= issuerid < MAX_PLAYERS) || !(3 <= bodypart <= 9) || !ac_IsValidDamageReason(weaponid)))
  3624.         {
  3625.             #if defined DEBUG
  3626.                 printf("[Nex-AC debug] Issuerid: %d, amount: %f, weaponid: %d, bodypart: %d", issuerid, amount, weaponid, bodypart);
  3627.             #endif
  3628.             ac_KickWithCode(playerid, "", 0, 47, 4);
  3629.             return 1;
  3630.         }
  3631.     #else
  3632.         if(ACInfo[playerid][acACAllow][47] &&
  3633.         (amount < 0.0 || issuerid != INVALID_PLAYER_ID && !(0 <= issuerid < MAX_PLAYERS) || !ac_IsValidDamageReason(weaponid)))
  3634.         {
  3635.             #if defined DEBUG
  3636.                 printf("[Nex-AC debug] Issuerid: %d, amount: %f, weaponid: %d", issuerid, amount, weaponid);
  3637.             #endif
  3638.             ac_KickWithCode(playerid, "", 0, 47, 4);
  3639.             return 1;
  3640.         }
  3641.     #endif
  3642.     if(!ACInfo[playerid][acDead]) ACInfo[playerid][acDeathRes] = true;
  3643.     #if defined ac_OnPlayerTakeDamage
  3644.         #if defined OnPlayerWeaponShot
  3645.             return ac_OnPlayerTakeDamage(playerid, issuerid, amount, weaponid, bodypart);
  3646.         #else
  3647.             return ac_OnPlayerTakeDamage(playerid, issuerid, amount, weaponid);
  3648.         #endif
  3649.     #else
  3650.         return 0;
  3651.     #endif
  3652. }
  3653.  
  3654. #if defined _ALS_OnPlayerTakeDamage
  3655.     #undef OnPlayerTakeDamage
  3656. #else
  3657.     #define _ALS_OnPlayerTakeDamage
  3658. #endif
  3659. #define OnPlayerTakeDamage ac_OnPlayerTakeDamage
  3660. #if defined ac_OnPlayerTakeDamage
  3661.     #if defined OnPlayerWeaponShot
  3662.         forward ac_OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart);
  3663.     #else
  3664.         forward ac_OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid);
  3665.     #endif
  3666. #endif
  3667.  
  3668. #if defined OnPlayerWeaponShot
  3669.     public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
  3670. #else
  3671.     public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
  3672. #endif
  3673. {
  3674.     if(ACInfo[playerid][acKicked] > 0) return 1;
  3675.     #if defined OnPlayerWeaponShot
  3676.         if(ACInfo[playerid][acACAllow][47])
  3677.         {
  3678.             if(amount < 0.0 || !(0 <= damagedid < MAX_PLAYERS) || !(3 <= bodypart <= 9) || !ac_IsValidWeapon(weaponid))
  3679.             {
  3680.                 #if defined DEBUG
  3681.                     printf("[Nex-AC debug] Damagedid: %d, amount: %f, weaponid: %d, bodypart: %d",
  3682.                     damagedid, amount, weaponid, bodypart);
  3683.                 #endif
  3684.                 ac_KickWithCode(playerid, "", 0, 47, 3);
  3685.                 return 1;
  3686.             }
  3687.             new ac_s = ac_wSlot[weaponid];
  3688.             if(!ACInfo[playerid][acDead] && ACInfo[playerid][acWeapon][ac_s] != weaponid &&
  3689.             ACInfo[playerid][acSetWeapon][ac_s] != weaponid && weaponid != WEAPON_FLAMETHROWER)
  3690.             {
  3691.                 #if defined DEBUG
  3692.                     printf("[Nex-AC debug] Damagedid: %d, amount: %f, AC weapon: %d, weaponid: %d, bodypart: %d",
  3693.                     damagedid, amount, ACInfo[playerid][acWeapon][ac_s], weaponid, bodypart);
  3694.                 #endif
  3695.                 ac_KickWithCode(playerid, "", 0, 47, 5);
  3696.                 return 1;
  3697.             }
  3698.         }
  3699.     #else
  3700.         if(ACInfo[playerid][acACAllow][47])
  3701.         {
  3702.             if(amount < 0.0 || !(0 <= damagedid < MAX_PLAYERS) || !ac_IsValidWeapon(weaponid))
  3703.             {
  3704.                 #if defined DEBUG
  3705.                     printf("[Nex-AC debug] Damagedid: %d, amount: %f, weaponid: %d", damagedid, amount, weaponid);
  3706.                 #endif
  3707.                 ac_KickWithCode(playerid, "", 0, 47, 3);
  3708.                 return 1;
  3709.             }
  3710.             new ac_s = ac_wSlot[weaponid];
  3711.             if(!ACInfo[playerid][acDead] && ACInfo[playerid][acWeapon][ac_s] != weaponid &&
  3712.             ACInfo[playerid][acSetWeapon][ac_s] != weaponid && weaponid != WEAPON_FLAMETHROWER)
  3713.             {
  3714.                 #if defined DEBUG
  3715.                     printf("[Nex-AC debug] Damagedid: %d, amount: %f, AC weapon: %d, weaponid: %d",
  3716.                     damagedid, amount, ACInfo[playerid][acWeapon][ac_s], weaponid);
  3717.                 #endif
  3718.                 ac_KickWithCode(playerid, "", 0, 47, 5);
  3719.                 return 1;
  3720.             }
  3721.         }
  3722.     #endif
  3723.     #if defined ac_OnPlayerGiveDamage
  3724.         #if defined OnPlayerWeaponShot
  3725.             return ac_OnPlayerGiveDamage(playerid, damagedid, amount, weaponid, bodypart);
  3726.         #else
  3727.             return ac_OnPlayerGiveDamage(playerid, damagedid, amount, weaponid);
  3728.         #endif
  3729.     #else
  3730.         return 0;
  3731.     #endif
  3732. }
  3733.  
  3734. #if defined _ALS_OnPlayerGiveDamage
  3735.     #undef OnPlayerGiveDamage
  3736. #else
  3737.     #define _ALS_OnPlayerGiveDamage
  3738. #endif
  3739. #define OnPlayerGiveDamage ac_OnPlayerGiveDamage
  3740. #if defined ac_OnPlayerGiveDamage
  3741.     #if defined OnPlayerWeaponShot
  3742.         forward ac_OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart);
  3743.     #else
  3744.         forward ac_OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid);
  3745.     #endif
  3746. #endif
  3747.  
  3748. #endif
  3749.  
  3750. #if defined FILTERSCRIPT
  3751.  
  3752. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  3753. {
  3754.     if(dialogid != AntiCheatGetDialog(playerid))
  3755.     {
  3756.         new ac_nd = fs_AntiCheatGetNextDialog(playerid);
  3757.         if(dialogid == ac_nd) fs_AntiCheatSetDialog(playerid, ac_nd);
  3758.     }
  3759.     fs_AntiCheatSetNextDialog(playerid, -1);
  3760.     #if defined ac_fs_OnDialogResponse
  3761.         return ac_fs_OnDialogResponse(playerid, dialogid, response, listitem, inputtext);
  3762.     #else
  3763.         return 0;
  3764.     #endif
  3765. }
  3766.  
  3767. #if defined _ALS_OnDialogResponse
  3768.     #undef OnDialogResponse
  3769. #else
  3770.     #define _ALS_OnDialogResponse
  3771. #endif
  3772. #define OnDialogResponse ac_fs_OnDialogResponse
  3773. #if defined ac_fs_OnDialogResponse
  3774.     forward ac_fs_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
  3775. #endif
  3776.  
  3777. #else
  3778.  
  3779. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  3780. {
  3781.     if(ACInfo[playerid][acKicked] > 0) return 1;
  3782.     new ac_i = GetTickCount();
  3783.     if(ACInfo[playerid][acACAllow][49])
  3784.     {
  3785.         if(ac_i < ACInfo[playerid][acCall][0] + ac_Mtfc[0][0]) ac_FloodDetect(playerid, 0);
  3786.         else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  3787.         else ACInfo[playerid][acFloodCount][0] = ACInfo[playerid][acFloodCount][27] = 0;
  3788.     }
  3789.     if(ACInfo[playerid][acACAllow][39] && (dialogid != ACInfo[playerid][acDialog] || listitem < -1))
  3790.     {
  3791.         #if defined DEBUG
  3792.             printf("[Nex-AC debug] AC dialog: %d, dialogid: %d, listitem: %d, playerid: %d",
  3793.             ACInfo[playerid][acDialog], dialogid, listitem, playerid);
  3794.         #endif
  3795.         ac_KickWithCode(playerid, "", 0, 39);
  3796.         return 1;
  3797.     }
  3798.     ACInfo[playerid][acDialog] = -1;
  3799.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][0] = ac_i;
  3800.     if(ACInfo[playerid][acACAllow][45])
  3801.     {
  3802.         for(ac_i = strlen(inputtext) - 1; ac_i >= 0; --ac_i)
  3803.         {
  3804.             if(inputtext[ac_i] == '%') strdel(inputtext, ac_i, ac_i + 1);
  3805.         }
  3806.     }
  3807.     #if defined ac_OnDialogResponse
  3808.         return ac_OnDialogResponse(playerid, dialogid, response, listitem, inputtext);
  3809.     #else
  3810.         return 0;
  3811.     #endif
  3812. }
  3813.  
  3814. #if defined _ALS_OnDialogResponse
  3815.     #undef OnDialogResponse
  3816. #else
  3817.     #define _ALS_OnDialogResponse
  3818. #endif
  3819. #define OnDialogResponse ac_OnDialogResponse
  3820. #if defined ac_OnDialogResponse
  3821.     forward ac_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
  3822. #endif
  3823.  
  3824. public OnEnterExitModShop(playerid, enterexit, interiorid)
  3825. {
  3826.     if(ACInfo[playerid][acKicked] > 0) return 0;
  3827.     #if !AC_USE_TUNING_GARAGES
  3828.         if(ACInfo[playerid][acACAllow][23]) ac_KickWithCode(playerid, "", 0, 23, 1);
  3829.     #else
  3830.         if(ACInfo[playerid][acACAllow][23] &&
  3831.         (!(0 <= enterexit <= 1) || !(0 <= interiorid <= 3))) ac_KickWithCode(playerid, "", 0, 23, 7);
  3832.     #endif
  3833.     new ac_i = GetTickCount();
  3834.     if(ACInfo[playerid][acACAllow][49])
  3835.     {
  3836.         if(ac_i < ACInfo[playerid][acCall][1] + ac_Mtfc[1][0]) ac_FloodDetect(playerid, 1);
  3837.         else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  3838.         else ACInfo[playerid][acFloodCount][1] = ACInfo[playerid][acFloodCount][27] = 0;
  3839.     }
  3840.     ACInfo[playerid][acModShop] = !!enterexit;
  3841.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][1] = ac_i;
  3842.     ACInfo[playerid][acSetPosTick] = ACInfo[playerid][acGtc][19] = ac_i + 3250;
  3843.     new ac_vehid = ACInfo[playerid][acVeh];
  3844.     if(ACInfo[playerid][acKicked] < 1)
  3845.     {
  3846.         ac_i = interiorid % 256;
  3847.         ACVehInfo[ac_vehid][acInt] = ac_i;
  3848.         #if defined foreach
  3849.             foreach(new ac_j : Player)
  3850.             {
  3851.                 if(ACInfo[ac_j][acVeh] == ac_vehid) ACInfo[ac_j][acInt] = ac_i;
  3852.             }
  3853.         #else
  3854.             #if defined GetPlayerPoolSize
  3855.                 for(new ac_j = GetPlayerPoolSize(); ac_j >= 0; --ac_j)
  3856.             #else
  3857.                 for(new ac_j = MAX_PLAYERS - 1; ac_j >= 0; --ac_j)
  3858.             #endif
  3859.             {
  3860.                 if(IsPlayerInVehicle(ac_j, ac_vehid)) ACInfo[ac_j][acInt] = ac_i;
  3861.             }
  3862.         #endif
  3863.     }
  3864.     else
  3865.     {
  3866.         #if defined foreach
  3867.             foreach(new ac_j : Player)
  3868.             {
  3869.                 if(ACInfo[ac_j][acVeh] == ac_vehid)
  3870.                 {
  3871.                     if(ACInfo[ac_j][acUnFrozen]) ACInfo[ac_j][acIntRet] = 2;
  3872.                     else ACInfo[ac_j][acIntRet] = 1;
  3873.                 }
  3874.             }
  3875.         #else
  3876.             #if defined GetPlayerPoolSize
  3877.                 for(new ac_j = GetPlayerPoolSize(); ac_j >= 0; --ac_j)
  3878.             #else
  3879.                 for(new ac_j = MAX_PLAYERS - 1; ac_j >= 0; --ac_j)
  3880.             #endif
  3881.             {
  3882.                 if(IsPlayerInVehicle(ac_j, ac_vehid))
  3883.                 {
  3884.                     if(ACInfo[ac_j][acUnFrozen]) ACInfo[ac_j][acIntRet] = 2;
  3885.                     else ACInfo[ac_j][acIntRet] = 1;
  3886.                 }
  3887.             }
  3888.         #endif
  3889.     }
  3890.     #if defined ac_OnEnterExitModShop
  3891.         return ac_OnEnterExitModShop(playerid, enterexit, interiorid);
  3892.     #else
  3893.         return 1;
  3894.     #endif
  3895. }
  3896.  
  3897. #if defined _ALS_OnEnterExitModShop
  3898.     #undef OnEnterExitModShop
  3899. #else
  3900.     #define _ALS_OnEnterExitModShop
  3901. #endif
  3902. #define OnEnterExitModShop ac_OnEnterExitModShop
  3903. #if defined ac_OnEnterExitModShop
  3904.     forward ac_OnEnterExitModShop(playerid, enterexit, interiorid);
  3905. #endif
  3906.  
  3907. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  3908. {
  3909.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] > 0) return 0;
  3910.     if(ACInfo[playerid][acIntRet] > 0)
  3911.     {
  3912.         SetPlayerInterior(playerid, ACInfo[playerid][acInt]);
  3913.         if(ACInfo[playerid][acIntRet] == 2) TogglePlayerControllable(playerid, 1);
  3914.         ACInfo[playerid][acIntRet] = 0;
  3915.     }
  3916.     else if(newinteriorid != ACInfo[playerid][acSet][0])
  3917.     {
  3918.         if(ACInfo[playerid][acSet][0] == -1)
  3919.         {
  3920.             new ac_vehid = GetPlayerVehicleID(playerid);
  3921.             if(ac_vehid > 0)
  3922.             {
  3923.                 if(ACInfo[playerid][acACAllow][3] && newinteriorid != ACInfo[playerid][acInt])
  3924.                 {
  3925.                     #if defined DEBUG
  3926.                         printf("[Nex-AC debug] AC interior: %d, acInt (last): %d, newinteriorid: %d, oldinteriorid: %d, veh: %d",
  3927.                         ACInfo[playerid][acSet][0], ACInfo[playerid][acInt], newinteriorid, oldinteriorid, ac_vehid);
  3928.                     #endif
  3929.                     ac_KickWithCode(playerid, "", 0, 3, 1);
  3930.                 }
  3931.             }
  3932.             else if(ACInfo[playerid][acIntEnterExits]) ACInfo[playerid][acSetPosTick] = GetTickCount() + 3250;
  3933.             else if(ACInfo[playerid][acACAllow][2] && newinteriorid != ACInfo[playerid][acInt])
  3934.             {
  3935.                 #if defined DEBUG
  3936.                     printf("[Nex-AC debug] AC interior: %d, acInt (last): %d, newinteriorid: %d, oldinteriorid: %d",
  3937.                     ACInfo[playerid][acSet][0], ACInfo[playerid][acInt], newinteriorid, oldinteriorid);
  3938.                 #endif
  3939.                 ac_KickWithCode(playerid, "", 0, 2, 1);
  3940.             }
  3941.         }
  3942.     }
  3943.     else ACInfo[playerid][acSet][0] = -1;
  3944.     if(ACInfo[playerid][acKicked] < 1) ACInfo[playerid][acInt] = newinteriorid % 256;
  3945.     #if defined ac_OnPlayerInteriorChange
  3946.         return ac_OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
  3947.     #else
  3948.         return 1;
  3949.     #endif
  3950. }
  3951.  
  3952. #if defined _ALS_OnPlayerInteriorChange
  3953.     #undef OnPlayerInteriorChange
  3954. #else
  3955.     #define _ALS_OnPlayerInteriorChange
  3956. #endif
  3957. #define OnPlayerInteriorChange ac_OnPlayerInteriorChange
  3958. #if defined ac_OnPlayerInteriorChange
  3959.     forward ac_OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
  3960. #endif
  3961.  
  3962. public OnRconLoginAttempt(ip[], password[], success)
  3963. {
  3964.     static ac_ipTables[MAX_PLAYERS][2], ac_ipIndex;
  3965.     new ac_i, ac_currentIp = ac_IpToInt(ip);
  3966.     for(; ac_i < ac_ipIndex && ac_i < sizeof ac_ipTables; ++ac_i)
  3967.     {
  3968.         if(ac_ipTables[ac_i][0] == ac_currentIp)
  3969.         {
  3970.             if(success) ac_ipTables[ac_i][1] = 0;
  3971.             else if(ac_ACAllow[42])
  3972.             {
  3973.                 if(++ac_ipTables[ac_i][1] > AC_MAX_RCON_LOGIN_ATTEMPT)
  3974.                 {
  3975.                     #if defined DEBUG
  3976.                         printf(DEBUG_CODE_4, ip, password);
  3977.                     #endif
  3978.                     ac_ipTables[ac_i][1] = 0;
  3979.                     ac_KickWithCode(INVALID_PLAYER_ID, ip, 1, 42, 1);
  3980.                 }
  3981.                 #if defined OnCheatWarning
  3982.                     else OnCheatWarning(INVALID_PLAYER_ID, ip, 1, 42, 1, ac_ipTables[ac_i][1]);
  3983.                 #endif
  3984.             }
  3985.             ac_i = -1;
  3986.             break;
  3987.         }
  3988.     }
  3989.     if(ac_i != -1 && !success)
  3990.     {
  3991.         ac_ipTables[ac_ipIndex][0] = ac_currentIp;
  3992.         if(ac_ACAllow[42])
  3993.         {
  3994.             if(++ac_ipTables[ac_ipIndex][1] > AC_MAX_RCON_LOGIN_ATTEMPT)
  3995.             {
  3996.                 #undef AC_MAX_RCON_LOGIN_ATTEMPT
  3997.                 #if defined DEBUG
  3998.                     printf(DEBUG_CODE_4, ip, password, ac_ipTables[ac_ipIndex][1]);
  3999.                 #endif
  4000.                 ac_ipTables[ac_ipIndex][1] = 0;
  4001.                 ac_KickWithCode(INVALID_PLAYER_ID, ip, 1, 42, 2);
  4002.             }
  4003.             #if defined OnCheatWarning
  4004.                 else OnCheatWarning(INVALID_PLAYER_ID, ip, 1, 42, 2, ac_ipTables[ac_ipIndex][1]);
  4005.             #endif
  4006.         }
  4007.         if(++ac_ipIndex >= sizeof ac_ipTables) ac_ipIndex = 0;
  4008.         ac_ipTables[ac_ipIndex][1] = 0;
  4009.     }
  4010.     #if defined ac_OnRconLoginAttempt
  4011.         return ac_OnRconLoginAttempt(ip, password, success);
  4012.     #else
  4013.         return 1;
  4014.     #endif
  4015. }
  4016.  
  4017. #if defined _ALS_OnRconLoginAttempt
  4018.     #undef OnRconLoginAttempt
  4019. #else
  4020.     #define _ALS_OnRconLoginAttempt
  4021. #endif
  4022. #define OnRconLoginAttempt ac_OnRconLoginAttempt
  4023. #if defined ac_OnRconLoginAttempt
  4024.     forward ac_OnRconLoginAttempt(ip[], password[], success);
  4025. #endif
  4026.  
  4027. public OnPlayerUpdate(playerid)
  4028. {
  4029.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] > 0) return 0;
  4030.     new ac_gtc = GetTickCount(), ac_gpp;
  4031.     #if AC_USE_NPC
  4032.         if(!IsPlayerNPC(playerid))
  4033.         {
  4034.     #endif
  4035.         new ac_w, ac_sa = GetPlayerState(playerid);
  4036.         if(ac_sa != PLAYER_STATE_SPECTATING && (ac_w = GetPlayerWeapon(playerid)) != -1)
  4037.         {
  4038.             ac_gpp = GetPlayerPing(playerid);
  4039.             new ac_a = GetPlayerAmmo(playerid), ac_s = ac_wSlot[ac_w];
  4040.             if(ACInfo[playerid][acSet][3] > 0)
  4041.             {
  4042.                 if(ACInfo[playerid][acSet][3] == ac_w)
  4043.                 {
  4044.                     ACInfo[playerid][acSet][3] = ACInfo[playerid][acSetWeapon][ac_s] = -1;
  4045.                     ACInfo[playerid][acWeapon][ac_s] = ac_w;
  4046.                 }
  4047.                 else if(ACInfo[playerid][acGiveAmmo][ac_wSlot[ACInfo[playerid][acSet][3]]] == 0 ||
  4048.                 ac_wSlot[ACInfo[playerid][acSet][3]] != ac_s && ac_gtc > ACInfo[playerid][acGtc][2] + ac_gpp) ACInfo[playerid][acSet][3] = -1;
  4049.                 else if(!(PLAYER_STATE_DRIVER <= ac_sa <= PLAYER_STATE_PASSENGER) && ac_gtc > ACInfo[playerid][acGtc][2] + ac_gpp)
  4050.                 {
  4051.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][0])
  4052.                     {
  4053.                         if(++ACInfo[playerid][acNOPCount][0] > AC_MAX_NOP_WARNINGS)
  4054.                         {
  4055.                             #if defined DEBUG
  4056.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerArmedWeapon");
  4057.                                 printf("[Nex-AC debug] AC weapon: %d, weaponid: %d", ACInfo[playerid][acSet][3], ac_w);
  4058.                             #endif
  4059.                             #if defined OnCheatDetected
  4060.                                 ac_KickWithCode(playerid, "", 0, 52, 1);
  4061.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4062.                                 ACInfo[playerid][acSetWeapon][ac_s] = ACInfo[playerid][acSet][3] = -1;
  4063.                             #else
  4064.                                 return ac_KickWithCode(playerid, "", 0, 52, 1);
  4065.                             #endif
  4066.                         }
  4067.                         #if defined OnNOPWarning
  4068.                             else OnNOPWarning(playerid, 1, ACInfo[playerid][acNOPCount][0]);
  4069.                         #endif
  4070.                     }
  4071.                     else if(++ACInfo[playerid][acNOPCount][0] > AC_MAX_NOP_WARNINGS)
  4072.                     {
  4073.                         ACInfo[playerid][acSetWeapon][ac_s] =
  4074.                         ACInfo[playerid][acSet][3] = -1;
  4075.                     }
  4076.                 }
  4077.             }
  4078.             if(ACInfo[playerid][acGiveAmmo][ac_s] != -65535)
  4079.             {
  4080.                 if(ACInfo[playerid][acGiveAmmo][ac_s] == ac_a ||
  4081.                 ACInfo[playerid][acGiveAmmo][ac_s] > ac_a && !(ac_a < 0 <= ACInfo[playerid][acGiveAmmo][ac_s]) &&
  4082.                 ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_s] + ac_gpp)
  4083.                 {
  4084.                     ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  4085.                     ACInfo[playerid][acAmmo][ac_s] = ac_a;
  4086.                 }
  4087.                 else if(ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_s] + ac_gpp)
  4088.                 {
  4089.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][1])
  4090.                     {
  4091.                         if(++ACInfo[playerid][acNOPCount][1] > AC_MAX_NOP_WARNINGS)
  4092.                         {
  4093.                             #if defined DEBUG
  4094.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerAmmo");
  4095.                                 printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  4096.                                 ACInfo[playerid][acGiveAmmo][ac_s], ac_a, ac_w);
  4097.                             #endif
  4098.                             #if defined OnCheatDetected
  4099.                                 ac_KickWithCode(playerid, "", 0, 52, 2);
  4100.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4101.                                 ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  4102.                             #else
  4103.                                 return ac_KickWithCode(playerid, "", 0, 52, 2);
  4104.                             #endif
  4105.                         }
  4106.                         #if defined OnNOPWarning
  4107.                             else OnNOPWarning(playerid, 2, ACInfo[playerid][acNOPCount][1]);
  4108.                         #endif
  4109.                     }
  4110.                     else if(++ACInfo[playerid][acNOPCount][1] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  4111.                 }
  4112.             }
  4113.             #if AC_USE_AMMUNATIONS || AC_USE_TUNING_GARAGES
  4114.                 new ac_money = orig_GetPlayerMoney(playerid);
  4115.             #endif
  4116.             #if AC_USE_AMMUNATIONS
  4117.                 if(ACInfo[playerid][acSet][10] != -1)
  4118.                 {
  4119.                     if(ac_money < ACInfo[playerid][acMoney] &&
  4120.                     ACInfo[playerid][acSet][10] <= ACInfo[playerid][acMoney] - ac_money) ACInfo[playerid][acSet][10] = -1;
  4121.                     else if(ac_gtc > ACInfo[playerid][acGtc][15] + ac_gpp)
  4122.                     {
  4123.                         if(ACInfo[playerid][acACAllow][15])
  4124.                         {
  4125.                             if(++ACInfo[playerid][acCheatCount][10] > AC_MAX_NOP_WARNINGS)
  4126.                             {
  4127.                                 #if defined DEBUG
  4128.                                     printf("[Nex-AC debug] Money: %d, old money: %d, price: %d",
  4129.                                     ac_money, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][10]);
  4130.                                 #endif
  4131.                                 #if defined OnCheatDetected
  4132.                                     ac_KickWithCode(playerid, "", 0, 15, 3);
  4133.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4134.                                     ACInfo[playerid][acSet][10] = -1;
  4135.                                 #else
  4136.                                     return ac_KickWithCode(playerid, "", 0, 15, 3);
  4137.                                 #endif
  4138.                             }
  4139.                             #if defined OnCheatWarning
  4140.                                 else OnCheatWarning(playerid, "", 0, 15, 3, ACInfo[playerid][acCheatCount][10]);
  4141.                             #endif
  4142.                         }
  4143.                         else if(++ACInfo[playerid][acCheatCount][10] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][10] = -1;
  4144.                     }
  4145.                 }
  4146.             #endif
  4147.             new ac_i = GetPlayerInterior(playerid), Float:ac_pX, Float:ac_pY, Float:ac_pZ, Float:ac_tmp;
  4148.             GetPlayerPos(playerid, ac_pX, ac_pY, ac_pZ);
  4149.             if(ACInfo[playerid][acLastWeapon] != ac_w)
  4150.             {
  4151.                 if(ACInfo[playerid][acWeapon][ac_s] != ac_w && ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp)
  4152.                 {
  4153.                     #if AC_USE_PICKUP_WEAPONS
  4154.                         #if defined Streamer_GetDistanceToItem\
  4155.                             && defined Streamer_GetIntData
  4156.                         if(ACInfo[playerid][acLastPickup] > MAX_PICKUPS) Streamer_GetDistanceToItem(ac_pX, ac_pY, ac_pZ, STREAMER_TYPE_PICKUP, ACInfo[playerid][acLastPickup] - MAX_PICKUPS, ac_tmp);
  4157.                         if(0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS && ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
  4158.                         ac_a <= (3 <= ac_s <= 5 ? (ACInfo[playerid][acAmmo][ac_s] + ac_pAmmo[ac_w]) : ac_pAmmo[ac_w]) &&
  4159.                         IsPlayerInRangeOfPoint(playerid, 15.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
  4160.                         ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]) ||
  4161.                         ACInfo[playerid][acLastPickup] > MAX_PICKUPS &&
  4162.                         Streamer_GetIntData(STREAMER_TYPE_PICKUP, ACInfo[playerid][acLastPickup] - MAX_PICKUPS, E_STREAMER_EXTRA_ID) == ac_w + 100 &&
  4163.                         ac_a <= (3 <= ac_s <= 5 ? (ACInfo[playerid][acAmmo][ac_s] + ac_pAmmo[ac_w]) : ac_pAmmo[ac_w]) && ac_tmp <= 15.0)
  4164.                         #else
  4165.                         if(0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS && ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
  4166.                         ac_a <= (3 <= ac_s <= 5 ? (ACInfo[playerid][acAmmo][ac_s] + ac_pAmmo[ac_w]) : ac_pAmmo[ac_w]) &&
  4167.                         IsPlayerInRangeOfPoint(playerid, 15.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
  4168.                         ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]))
  4169.                         #endif
  4170.                         {
  4171.                             ACInfo[playerid][acWeapon][ac_s] = ac_w;
  4172.                             ACInfo[playerid][acAmmo][ac_s] = ac_a;
  4173.                         }
  4174.                         else
  4175.                         {
  4176.                     #endif
  4177.                         #if AC_USE_AMMUNATIONS
  4178.                             if(22 <= ac_w <= 32 && ac_InAmmuNation(playerid, ac_i))
  4179.                             {
  4180.                                 ACInfo[playerid][acCheatCount][10] = 0;
  4181.                                 if(ACInfo[playerid][acSet][10] != -1) ACInfo[playerid][acSet][10] += ac_AmmuNationInfo[ac_w - 22][0];
  4182.                                 else ACInfo[playerid][acSet][10] = ac_AmmuNationInfo[ac_w - 22][0];
  4183.                                 if(3 <= ac_s <= 5) ACInfo[playerid][acAmmo][ac_s] += ac_AmmuNationInfo[ac_w - 22][1];
  4184.                                 else ACInfo[playerid][acAmmo][ac_s] = ac_AmmuNationInfo[ac_w - 22][1];
  4185.                                 ACInfo[playerid][acWeapon][ac_s] = ac_w;
  4186.                                 ACInfo[playerid][acGtc][15] = ac_gtc + 2650;
  4187.                             }
  4188.                             else
  4189.                             {
  4190.                         #endif
  4191.                             if(ac_w == 40 || ac_w == 46 && ACInfo[playerid][acVeh] > 0 && ACInfo[playerid][acParachute] > 0)
  4192.                             {
  4193.                                 ACInfo[playerid][acWeapon][ac_s] = ac_w;
  4194.                                 ACInfo[playerid][acAmmo][ac_s] = ac_a;
  4195.                                 ACInfo[playerid][acParachute] = 0;
  4196.                             }
  4197.                             else if(ACInfo[playerid][acACAllow][15] && ACInfo[playerid][acSetWeapon][ac_s] == -1)
  4198.                             {
  4199.                                 #if defined DEBUG
  4200.                                     printf("[Nex-AC debug] AC weaponid: %d, AC ammo: %d, weaponid: %d, ammo: %d",
  4201.                                     ACInfo[playerid][acWeapon][ac_s], ACInfo[playerid][acAmmo][ac_s], ac_w, ac_a);
  4202.                                 #endif
  4203.                                 #if defined OnCheatDetected
  4204.                                     ac_KickWithCode(playerid, "", 0, 15, 1);
  4205.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4206.                                     ACInfo[playerid][acWeapon][ac_s] = ac_w;
  4207.                                     ACInfo[playerid][acAmmo][ac_s] = ac_a;
  4208.                                 #else
  4209.                                     return ac_KickWithCode(playerid, "", 0, 15, 1);
  4210.                                 #endif
  4211.                             }
  4212.                         #if AC_USE_AMMUNATIONS
  4213.                             }
  4214.                         #endif
  4215.                     #if AC_USE_PICKUP_WEAPONS
  4216.                         }
  4217.                     #endif
  4218.                 }
  4219.             }
  4220.             else if(ACInfo[playerid][acAmmo][ac_s] != ac_a && ac_sa != PLAYER_STATE_DRIVER &&
  4221.             7 <= ac_s <= 9 && ac_w != 38 && ACInfo[playerid][acGiveAmmo][ac_s] == -65535 &&
  4222.             ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp)
  4223.             {
  4224.                 if(ACInfo[playerid][acACAllow][16] &&
  4225.                 (ACInfo[playerid][acAmmo][ac_s] == 0 || ac_a > ACInfo[playerid][acAmmo][ac_s] ||
  4226.                 ac_a < 0 < ACInfo[playerid][acAmmo][ac_s]))
  4227.                 {
  4228.                     #if defined DEBUG
  4229.                         printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  4230.                         ACInfo[playerid][acAmmo][ac_s], ac_a, ac_w);
  4231.                     #endif
  4232.                     #if defined OnCheatDetected
  4233.                         ac_KickWithCode(playerid, "", 0, 16, 1);
  4234.                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4235.                     #else
  4236.                         return ac_KickWithCode(playerid, "", 0, 16, 1);
  4237.                     #endif
  4238.                 }
  4239.                 ACInfo[playerid][acAmmo][ac_s] = ac_a;
  4240.             }
  4241.             GetPlayerHealth(playerid, ac_tmp);
  4242.             new ac_health = floatround(ac_tmp, floatround_tozero);
  4243.             if(ACInfo[playerid][acSet][1] != -1)
  4244.             {
  4245.                 if(ACInfo[playerid][acSet][1] > 255)
  4246.                 {
  4247.                     ac_health += 256 * (((ACInfo[playerid][acSet][1] - (ACInfo[playerid][acSet][1] % 256)) / 256) - 1);
  4248.                     if(ACInfo[playerid][acSet][1] > ac_health + 255) ac_health += 256;
  4249.                 }
  4250.                 if(ACInfo[playerid][acSet][1] == ac_health || ACInfo[playerid][acDmgRes] ||
  4251.                 ACInfo[playerid][acSet][1] > ac_health && ac_gtc > ACInfo[playerid][acGtc][3] + ac_gpp)
  4252.                 {
  4253.                     ACInfo[playerid][acSet][1] = -1;
  4254.                     ACInfo[playerid][acDmgRes] = 0;
  4255.                 }
  4256.                 else if(ac_gtc > ACInfo[playerid][acGtc][3] + ac_gpp)
  4257.                 {
  4258.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][3])
  4259.                     {
  4260.                         if(++ACInfo[playerid][acNOPCount][3] > AC_MAX_NOP_WARNINGS)
  4261.                         {
  4262.                             #if defined DEBUG
  4263.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerHealth");
  4264.                                 printf("[Nex-AC debug] AC health: %d, health: %d", ACInfo[playerid][acSet][1], ac_health);
  4265.                             #endif
  4266.                             #if defined OnCheatDetected
  4267.                                 ac_KickWithCode(playerid, "", 0, 52, 3);
  4268.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4269.                                 ACInfo[playerid][acSet][1] = -1;
  4270.                             #else
  4271.                                 return ac_KickWithCode(playerid, "", 0, 52, 3);
  4272.                             #endif
  4273.                         }
  4274.                         #if defined OnNOPWarning
  4275.                             else OnNOPWarning(playerid, 3, ACInfo[playerid][acNOPCount][3]);
  4276.                         #endif
  4277.                     }
  4278.                     else if(++ACInfo[playerid][acNOPCount][3] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][1] = -1;
  4279.                 }
  4280.             }
  4281.             else if(ACInfo[playerid][acACAllow][12])
  4282.             {
  4283.                 if(ACInfo[playerid][acHealth] > 255)
  4284.                 {
  4285.                     ac_health += 256 * (((ACInfo[playerid][acHealth] - (ACInfo[playerid][acHealth] % 256)) / 256) - 1);
  4286.                     if(ACInfo[playerid][acHealth] > ac_health + 255) ac_health += 256;
  4287.                 }
  4288.                 if(ac_health > ACInfo[playerid][acHealth])
  4289.                 {
  4290.                     #if AC_USE_RESTAURANTS
  4291.                         if(ac_health > ACInfo[playerid][acHealth] + 70 || !ac_InRestaurant(playerid, ac_i))
  4292.                         {
  4293.                     #endif
  4294.                         #if AC_USE_VENDING_MACHINES
  4295.                             if(ac_health > ACInfo[playerid][acHealth] + 35 || !ac_NearVendingMachine(playerid, ac_i))
  4296.                             {
  4297.                         #endif
  4298.                             #if defined DEBUG
  4299.                                 printf("[Nex-AC debug] AC health: %d, health: %d", ACInfo[playerid][acHealth], ac_health);
  4300.                             #endif
  4301.                             #if defined OnCheatDetected
  4302.                                 ac_KickWithCode(playerid, "", 0, 12);
  4303.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4304.                             #else
  4305.                                 return ac_KickWithCode(playerid, "", 0, 12);
  4306.                             #endif
  4307.                         #if AC_USE_VENDING_MACHINES
  4308.                             }
  4309.                         #endif
  4310.                     #if AC_USE_RESTAURANTS
  4311.                         }
  4312.                     #endif
  4313.                 }
  4314.             }
  4315.             GetPlayerArmour(playerid, ac_tmp);
  4316.             new ac_armour = floatround(ac_tmp, floatround_tozero);
  4317.             if(ACInfo[playerid][acSet][2] != -1)
  4318.             {
  4319.                 if(ACInfo[playerid][acSet][2] > 255)
  4320.                 {
  4321.                     ac_armour += 256 * (((ACInfo[playerid][acSet][2] - (ACInfo[playerid][acSet][2] % 256)) / 256) - 1);
  4322.                     if(ACInfo[playerid][acSet][2] > ac_armour + 255) ac_armour += 256;
  4323.                 }
  4324.                 if(ACInfo[playerid][acSet][2] == ac_armour || ACInfo[playerid][acDmgRes] ||
  4325.                 ACInfo[playerid][acSet][2] > ac_armour && ac_gtc > ACInfo[playerid][acGtc][5] + ac_gpp)
  4326.                 {
  4327.                     ACInfo[playerid][acSet][2] = -1;
  4328.                     ACInfo[playerid][acDmgRes] = 0;
  4329.                 }
  4330.                 else if(ac_gtc > ACInfo[playerid][acGtc][5] + ac_gpp)
  4331.                 {
  4332.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][5])
  4333.                     {
  4334.                         if(++ACInfo[playerid][acNOPCount][5] > AC_MAX_NOP_WARNINGS)
  4335.                         {
  4336.                             #if defined DEBUG
  4337.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerArmour");
  4338.                                 printf("[Nex-AC debug] AC armour: %d, armour: %d", ACInfo[playerid][acSet][2], ac_armour);
  4339.                             #endif
  4340.                             #if defined OnCheatDetected
  4341.                                 ac_KickWithCode(playerid, "", 0, 52, 4);
  4342.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4343.                                 ACInfo[playerid][acSet][2] = -1;
  4344.                             #else
  4345.                                 return ac_KickWithCode(playerid, "", 0, 52, 4);
  4346.                             #endif
  4347.                         }
  4348.                         #if defined OnNOPWarning
  4349.                             else OnNOPWarning(playerid, 4, ACInfo[playerid][acNOPCount][5]);
  4350.                         #endif
  4351.                     }
  4352.                     else if(++ACInfo[playerid][acNOPCount][5] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][2] = -1;
  4353.                 }
  4354.             }
  4355.             else if(ACInfo[playerid][acACAllow][13])
  4356.             {
  4357.                 if(ACInfo[playerid][acArmour] > 255)
  4358.                 {
  4359.                     ac_armour += 256 * (((ACInfo[playerid][acArmour] - (ACInfo[playerid][acArmour] % 256)) / 256) - 1);
  4360.                     if(ACInfo[playerid][acArmour] > ac_armour + 255) ac_armour += 256;
  4361.                 }
  4362.                 if(ac_armour > ACInfo[playerid][acArmour])
  4363.                 {
  4364.                     #if AC_USE_AMMUNATIONS
  4365.                         if(ac_armour == 100 && ac_InAmmuNation(playerid, ac_i))
  4366.                         {
  4367.                             ACInfo[playerid][acCheatCount][10] = 0;
  4368.                             if(ACInfo[playerid][acSet][10] != -1) ACInfo[playerid][acSet][10] += 200;
  4369.                             else ACInfo[playerid][acSet][10] = 200;
  4370.                             ACInfo[playerid][acGtc][15] = ac_gtc + 2650;
  4371.                         }
  4372.                         else
  4373.                         {
  4374.                     #endif
  4375.                         #if defined DEBUG
  4376.                             printf("[Nex-AC debug] AC armour: %d, armour: %d", ACInfo[playerid][acArmour], ac_armour);
  4377.                         #endif
  4378.                         #if defined OnCheatDetected
  4379.                             ac_KickWithCode(playerid, "", 0, 13);
  4380.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4381.                         #else
  4382.                             return ac_KickWithCode(playerid, "", 0, 13);
  4383.                         #endif
  4384.                     #if AC_USE_AMMUNATIONS
  4385.                         }
  4386.                     #endif
  4387.                 }
  4388.             }
  4389.             if(ac_health < ACInfo[playerid][acHealth] || ac_armour < ACInfo[playerid][acArmour])
  4390.             {
  4391.                 ACInfo[playerid][acVehDmgRes] = false;
  4392.                 ACInfo[playerid][acCheatCount][9] = ACInfo[playerid][acDmgRes] = 0;
  4393.             }
  4394.             else if(ACInfo[playerid][acACAllow][19] &&
  4395.             ACInfo[playerid][acDmgRes] && ac_gtc > ACInfo[playerid][acGtc][14] + ac_gpp)
  4396.             {
  4397.                 ACInfo[playerid][acDmgRes] = 0;
  4398.                 ACInfo[playerid][acVehDmgRes] = false;
  4399.                 if(++ACInfo[playerid][acCheatCount][9] > AC_MAX_GODMODE_WARNINGS)
  4400.                 {
  4401.                     #undef AC_MAX_GODMODE_WARNINGS
  4402.                     #if defined DEBUG
  4403.                         printf("[Nex-AC debug] AC health: %d, health: %d, AC armour: %d, armour: %d",
  4404.                         ACInfo[playerid][acHealth], ac_health, ACInfo[playerid][acArmour], ac_armour);
  4405.                     #endif
  4406.                     #if defined OnCheatDetected
  4407.                         ac_KickWithCode(playerid, "", 0, 19);
  4408.                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4409.                         ACInfo[playerid][acCheatCount][9] = 0;
  4410.                     #else
  4411.                         return ac_KickWithCode(playerid, "", 0, 19);
  4412.                     #endif
  4413.                 }
  4414.                 #if defined OnCheatWarning
  4415.                     else OnCheatWarning(playerid, "", 0, 19, 0, ACInfo[playerid][acCheatCount][9]);
  4416.                 #endif
  4417.             }
  4418.             #if AC_USE_TUNING_GARAGES
  4419.             if(ACInfo[playerid][acSet][12] != -1)
  4420.             {
  4421.                 if(ac_money < ACInfo[playerid][acMoney] &&
  4422.                 ACInfo[playerid][acSet][12] <= ACInfo[playerid][acMoney] - ac_money) ACInfo[playerid][acSet][12] = -1;
  4423.                 else if(ac_gtc > ACInfo[playerid][acGtc][17] + ac_gpp)
  4424.                 {
  4425.                     if(ACInfo[playerid][acACAllow][23])
  4426.                     {
  4427.                         if(++ACInfo[playerid][acCheatCount][12] > AC_MAX_NOP_WARNINGS)
  4428.                         {
  4429.                             #if defined DEBUG
  4430.                                 printf("[Nex-AC debug] Money: %d, old money: %d, component price: %d",
  4431.                                 ac_money, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][12]);
  4432.                             #endif
  4433.                             #if defined OnCheatDetected
  4434.                                 ac_KickWithCode(playerid, "", 0, 23, 3);
  4435.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4436.                                 ACInfo[playerid][acSet][12] = -1;
  4437.                             #else
  4438.                                 return ac_KickWithCode(playerid, "", 0, 23, 3);
  4439.                             #endif
  4440.                         }
  4441.                         #if defined OnCheatWarning
  4442.                             else OnCheatWarning(playerid, "", 0, 23, 3, ACInfo[playerid][acCheatCount][12]);
  4443.                         #endif
  4444.                     }
  4445.                     else if(++ACInfo[playerid][acCheatCount][12] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][12] = -1;
  4446.                 }
  4447.             }
  4448.             #endif
  4449.             if(ACInfo[playerid][acSet][0] != -1 && ac_gtc > ACInfo[playerid][acGtc][0] + ac_gpp)
  4450.             {
  4451.                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][2] && ac_i != ACInfo[playerid][acSet][0])
  4452.                 {
  4453.                     if(++ACInfo[playerid][acNOPCount][2] > AC_MAX_NOP_WARNINGS)
  4454.                     {
  4455.                         #if defined DEBUG
  4456.                             printf(DEBUG_CODE_5, playerid, "SetPlayerInterior");
  4457.                             printf("[Nex-AC debug] AC interior: %d, interiorid: %d", ACInfo[playerid][acSet][0], ac_i);
  4458.                         #endif
  4459.                         #if defined OnCheatDetected
  4460.                             ac_KickWithCode(playerid, "", 0, 52, 5);
  4461.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4462.                             ACInfo[playerid][acSet][0] = -1;
  4463.                         #else
  4464.                             return ac_KickWithCode(playerid, "", 0, 52, 5);
  4465.                         #endif
  4466.                     }
  4467.                     #if defined OnNOPWarning
  4468.                         else OnNOPWarning(playerid, 5, ACInfo[playerid][acNOPCount][2]);
  4469.                     #endif
  4470.                 }
  4471.                 else if(++ACInfo[playerid][acNOPCount][2] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][0] = -1;
  4472.             }
  4473.             if(ACInfo[playerid][acSet][6] != -1 && ac_gtc > ACInfo[playerid][acGtc][12] + ac_gpp)
  4474.             {
  4475.                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][8])
  4476.                 {
  4477.                     if(++ACInfo[playerid][acNOPCount][8] > AC_MAX_NOP_WARNINGS)
  4478.                     {
  4479.                         #if defined DEBUG
  4480.                             printf(DEBUG_CODE_5, playerid, "TogglePlayerSpectating");
  4481.                         #endif
  4482.                         #if defined OnCheatDetected
  4483.                             ac_KickWithCode(playerid, "", 0, 52, 6);
  4484.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4485.                             ACInfo[playerid][acSet][6] = -1;
  4486.                         #else
  4487.                             return ac_KickWithCode(playerid, "", 0, 52, 6);
  4488.                         #endif
  4489.                     }
  4490.                     #if defined OnNOPWarning
  4491.                         else OnNOPWarning(playerid, 6, ACInfo[playerid][acNOPCount][8]);
  4492.                     #endif
  4493.                 }
  4494.                 else if(++ACInfo[playerid][acNOPCount][8] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][6] = -1;
  4495.             }
  4496.             if(ACInfo[playerid][acSet][7] != -1 && ac_gtc > ACInfo[playerid][acGtc][13] + ac_gpp)
  4497.             {
  4498.                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][9])
  4499.                 {
  4500.                     if(++ACInfo[playerid][acNOPCount][9] > AC_MAX_NOP_WARNINGS)
  4501.                     {
  4502.                         #if defined DEBUG
  4503.                             printf(DEBUG_CODE_5, playerid, "SpawnPlayer");
  4504.                             printf("[Nex-AC debug] acSet[7]: %d", ACInfo[playerid][acSet][7]);
  4505.                         #endif
  4506.                         #if defined OnCheatDetected
  4507.                             ac_KickWithCode(playerid, "", 0, 52, 7);
  4508.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4509.                             ACInfo[playerid][acSet][7] = -1;
  4510.                         #else
  4511.                             return ac_KickWithCode(playerid, "", 0, 52, 7);
  4512.                         #endif
  4513.                     }
  4514.                     #if defined OnNOPWarning
  4515.                         else OnNOPWarning(playerid, 7, ACInfo[playerid][acNOPCount][9]);
  4516.                     #endif
  4517.                 }
  4518.                 else if(++ACInfo[playerid][acNOPCount][9] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][7] = -1;
  4519.             }
  4520.             new ac_vehid = GetPlayerVehicleID(playerid);
  4521.             if(ACInfo[playerid][acSet][11] != -1 && ac_vehid > 0 && ac_gtc > ACInfo[playerid][acGtc][8] + ac_gpp)
  4522.             {
  4523.                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][11])
  4524.                 {
  4525.                     new Float:ac_vX, Float:ac_vY, Float:ac_vZ;
  4526.                     GetVehicleVelocity(ac_vehid, ac_vX, ac_vY, ac_vZ);
  4527.                     if(ac_GetSpeed(ac_vX, ac_vY, ac_vZ) <= 30)
  4528.                     {
  4529.                         #if defined DEBUG
  4530.                             printf(DEBUG_CODE_5, playerid, "RemovePlayerFromVehicle");
  4531.                             printf("[Nex-AC debug] Veh model: %d, veh: %d", GetVehicleModel(ac_vehid), ac_vehid);
  4532.                         #endif
  4533.                         #if defined OnCheatDetected
  4534.                             ac_KickWithCode(playerid, "", 0, 52, 8);
  4535.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4536.                             ACInfo[playerid][acSet][11] = -1;
  4537.                         #else
  4538.                             return ac_KickWithCode(playerid, "", 0, 52, 8);
  4539.                         #endif
  4540.                     }
  4541.                 }
  4542.                 else ACInfo[playerid][acSet][11] = -1;
  4543.             }
  4544.             ac_s = GetPlayerVehicleSeat(playerid);
  4545.             if(ACInfo[playerid][acSet][9] != -1)
  4546.             {
  4547.                 if(ACInfo[playerid][acSet][9] == ac_vehid &&
  4548.                 (ACInfo[playerid][acSet][5] == ac_s || ACInfo[playerid][acSet][5] == -1))
  4549.                 {
  4550.                     if(ACInfo[playerid][acVeh] > 0)
  4551.                     {
  4552.                         if(ac_IsAnAircraft(GetVehicleModel(ACInfo[playerid][acVeh]))) ACInfo[playerid][acParachute] = 2;
  4553.                         if(ACVehInfo[ACInfo[playerid][acVeh]][acDriver] == playerid) ACVehInfo[ACInfo[playerid][acVeh]][acDriver] = INVALID_PLAYER_ID;
  4554.                     }
  4555.                     if(ac_s == 0)
  4556.                     {
  4557.                         ACVehInfo[ac_vehid][acDriver] = playerid;
  4558.                         GetVehicleZAngle(ac_vehid, ACVehInfo[ac_vehid][acZAngle]);
  4559.                         ACInfo[playerid][acGtc][9] = ac_gtc + 1650;
  4560.                         ACInfo[playerid][acSetVehHealth] = -1.0;
  4561.                         ACInfo[playerid][acLastPosX] = ac_pX;
  4562.                         ACInfo[playerid][acLastPosY] = ac_pY;
  4563.                     }
  4564.                     ACInfo[playerid][acEnterVeh] =
  4565.                     ACInfo[playerid][acCheatCount][11] = 0;
  4566.                     ACInfo[playerid][acVehDmgRes] = false;
  4567.                     ACInfo[playerid][acEnterSeat] =
  4568.                     ACInfo[playerid][acSet][11] =
  4569.                     ACInfo[playerid][acSet][9] =
  4570.                     ACInfo[playerid][acSet][8] = -1;
  4571.                     ACInfo[playerid][acSeat] = ac_s;
  4572.                 }
  4573.                 else if(ac_gtc > ACInfo[playerid][acGtc][1] + ac_gpp)
  4574.                 {
  4575.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][7] &&
  4576.                     ACInfo[playerid][acSet][5] != -1 && ACVehInfo[ACInfo[playerid][acSet][9]][acSpawned])
  4577.                     {
  4578.                         if(++ACInfo[playerid][acNOPCount][7] > AC_MAX_NOP_WARNINGS)
  4579.                         {
  4580.                             #if defined DEBUG
  4581.                                 printf(DEBUG_CODE_5, playerid, "PutPlayerInVehicle");
  4582.                                 printf("[Nex-AC debug] AC veh: %d, veh: %d, AC seat: %d, seatid: %d",
  4583.                                 ACInfo[playerid][acSet][9], ac_vehid, ACInfo[playerid][acSet][5], ac_s);
  4584.                             #endif
  4585.                             #if defined OnCheatDetected
  4586.                                 ac_KickWithCode(playerid, "", 0, 52, 9);
  4587.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4588.                                 ACInfo[playerid][acSet][9] = -1;
  4589.                             #else
  4590.                                 return ac_KickWithCode(playerid, "", 0, 52, 9);
  4591.                             #endif
  4592.                         }
  4593.                         #if defined OnNOPWarning
  4594.                             else OnNOPWarning(playerid, 9, ACInfo[playerid][acNOPCount][7]);
  4595.                         #endif
  4596.                     }
  4597.                     else if(++ACInfo[playerid][acNOPCount][7] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][9] = -1;
  4598.                 }
  4599.             }
  4600.             else
  4601.             {
  4602.                 new Float:ac_dist_set = 25000.0;
  4603.                 if(ACInfo[playerid][acSet][8] != -1)
  4604.                 {
  4605.                     ac_dist_set = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acSetPosX], ACInfo[playerid][acSetPosY], (ACInfo[playerid][acTpToZ] ? ac_pZ : ACInfo[playerid][acSetPosZ]));
  4606.                     if(ac_dist_set < 15.0)
  4607.                     {
  4608.                         ACInfo[playerid][acSet][8] = -1;
  4609.                         ACInfo[playerid][acGtc][11] = 0;
  4610.                         ACInfo[playerid][acTpToZ] = false;
  4611.                         ACInfo[playerid][acLastPosX] = ac_pX;
  4612.                         ACInfo[playerid][acLastPosY] = ac_pY;
  4613.                         ACInfo[playerid][acPosX] = ac_pX;
  4614.                         ACInfo[playerid][acPosY] = ac_pY;
  4615.                         ACInfo[playerid][acPosZ] = ac_pZ;
  4616.                     }
  4617.                     else if(ac_gtc > ACInfo[playerid][acGtc][11] + ac_gpp)
  4618.                     {
  4619.                         if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][10])
  4620.                         {
  4621.                             if(++ACInfo[playerid][acNOPCount][10] > AC_MAX_NOP_WARNINGS)
  4622.                             {
  4623.                                 #if defined DEBUG
  4624.                                     printf(DEBUG_CODE_5, playerid, "SetPlayerPos");
  4625.                                     printf("[Nex-AC debug] Dist: %f, acSet[8]: %d", ac_dist_set, ACInfo[playerid][acSet][8]);
  4626.                                 #endif
  4627.                                 #if defined OnCheatDetected
  4628.                                     ac_KickWithCode(playerid, "", 0, 52, 10);
  4629.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4630.                                     ACInfo[playerid][acTpToZ] = false;
  4631.                                     ACInfo[playerid][acSet][8] = -1;
  4632.                                 #else
  4633.                                     return ac_KickWithCode(playerid, "", 0, 52, 10);
  4634.                                 #endif
  4635.                             }
  4636.                             #if defined OnNOPWarning
  4637.                                 else OnNOPWarning(playerid, 10, ACInfo[playerid][acNOPCount][10]);
  4638.                             #endif
  4639.                         }
  4640.                         else if(++ACInfo[playerid][acNOPCount][10] > AC_MAX_NOP_WARNINGS)
  4641.                         {
  4642.                             ACInfo[playerid][acTpToZ] = false;
  4643.                             ACInfo[playerid][acSet][8] = -1;
  4644.                         }
  4645.                     }
  4646.                 }
  4647.                 new Float:ac_vX, Float:ac_vY, Float:ac_vZ, ac_specact = GetPlayerSpecialAction(playerid),
  4648.                 Float:ac_dist = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  4649.                 if(ac_vehid > 0)
  4650.                 {
  4651.                     if(ACInfo[playerid][acVeh] > 0)
  4652.                     {
  4653.                         if(ACInfo[playerid][acVeh] != ac_vehid)
  4654.                         {
  4655.                             if(ACInfo[playerid][acACAllow][4])
  4656.                             {
  4657.                                 #if defined DEBUG
  4658.                                     printf("[Nex-AC debug] AC veh: %d, veh: %d", ACInfo[playerid][acVeh], ac_vehid);
  4659.                                 #endif
  4660.                                 #if defined OnCheatDetected
  4661.                                     ac_KickWithCode(playerid, "", 0, 4, 2);
  4662.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4663.                                 #else
  4664.                                     return ac_KickWithCode(playerid, "", 0, 4, 2);
  4665.                                 #endif
  4666.                             }
  4667.                         }
  4668.                         else if(ACInfo[playerid][acACAllow][50] && ACInfo[playerid][acSeat] != ac_s)
  4669.                         {
  4670.                             #if defined DEBUG
  4671.                                 printf("[Nex-AC debug] AC seat: %d, seatid: %d, veh: %d", ACInfo[playerid][acSeat], ac_s, ac_vehid);
  4672.                             #endif
  4673.                             #if defined OnCheatDetected
  4674.                                 ac_KickWithCode(playerid, "", 0, 50);
  4675.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4676.                             #else
  4677.                                 return ac_KickWithCode(playerid, "", 0, 50);
  4678.                             #endif
  4679.                         }
  4680.                     }
  4681.                     if(ac_sa == PLAYER_STATE_DRIVER)
  4682.                     {
  4683.                         if(ACInfo[playerid][acACAllow][32] && ACVehInfo[ac_vehid][acDriver] != playerid &&
  4684.                         ACVehInfo[ac_vehid][acDriver] != INVALID_PLAYER_ID)
  4685.                         {
  4686.                             #if defined DEBUG
  4687.                                 printf("[Nex-AC debug] AC driver: %d, driver: %d, veh: %d",
  4688.                                 ACVehInfo[ac_vehid][acDriver], playerid, ac_vehid);
  4689.                             #endif
  4690.                             #if defined OnCheatDetected
  4691.                                 ac_KickWithCode(playerid, "", 0, 32);
  4692.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4693.                             #else
  4694.                                 return SetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  4695.                             #endif
  4696.                         }
  4697.                         new Float:ac_vHealth;
  4698.                         GetVehicleHealth(ac_vehid, ac_vHealth);
  4699.                         if(ACInfo[playerid][acSetVehHealth] != -1.0)
  4700.                         {
  4701.                             if(ACInfo[playerid][acSetVehHealth] == ac_vHealth ||
  4702.                             ACInfo[playerid][acSetVehHealth] > ac_vHealth && ac_gtc > ACInfo[playerid][acGtc][4] + ac_gpp)
  4703.                             {
  4704.                                 ACInfo[playerid][acSetVehHealth] = -1.0;
  4705.                                 ACInfo[playerid][acVehDmgRes] = false;
  4706.                             }
  4707.                             else if(ac_gtc > ACInfo[playerid][acGtc][4] + ac_gpp)
  4708.                             {
  4709.                                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][4])
  4710.                                 {
  4711.                                     if(++ACInfo[playerid][acNOPCount][4] > AC_MAX_NOP_WARNINGS)
  4712.                                     {
  4713.                                         #if defined DEBUG
  4714.                                             printf(DEBUG_CODE_5, playerid, "SetVehicleHealth");
  4715.                                             printf("[Nex-AC debug] AC veh health: %f, veh health: %f, veh: %d",
  4716.                                             ACInfo[playerid][acSetVehHealth], ac_vHealth, ac_vehid);
  4717.                                         #endif
  4718.                                         #if defined OnCheatDetected
  4719.                                             ac_KickWithCode(playerid, "", 0, 52, 11);
  4720.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4721.                                             ACInfo[playerid][acSetVehHealth] = -1.0;
  4722.                                         #else
  4723.                                             return ac_KickWithCode(playerid, "", 0, 52, 11);
  4724.                                         #endif
  4725.                                     }
  4726.                                     #if defined OnNOPWarning
  4727.                                         else OnNOPWarning(playerid, 11, ACInfo[playerid][acNOPCount][4]);
  4728.                                     #endif
  4729.                                 }
  4730.                                 else if(++ACInfo[playerid][acNOPCount][4] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSetVehHealth] = -1.0;
  4731.                             }
  4732.                         }
  4733.                         else if(ACInfo[playerid][acACAllow][11] &&
  4734.                         (ac_vHealth != ac_vHealth || ac_vHealth > ACVehInfo[ac_vehid][acHealth] &&
  4735.                         !ACInfo[playerid][acModShop] && ac_vHealth))
  4736.                         {
  4737.                             #if AC_USE_PAYNSPRAY
  4738.                                 if(!ac_InPayNSpray(playerid, ac_i))
  4739.                                 {
  4740.                             #endif
  4741.                                 #if defined DEBUG
  4742.                                     printf("[Nex-AC debug] AC veh health: %f, veh health: %f, veh: %d, playerid: %d",
  4743.                                     ACVehInfo[ac_vehid][acHealth], ac_vHealth, ac_vehid, playerid);
  4744.                                 #endif
  4745.                                 #if defined OnCheatDetected
  4746.                                     ac_KickWithCode(playerid, "", 0, 11);
  4747.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4748.                                 #endif
  4749.                                 SetVehicleHealth(ac_vehid, ACVehInfo[ac_vehid][acHealth]);
  4750.                             #if AC_USE_PAYNSPRAY
  4751.                                 }
  4752.                             #endif
  4753.                         }
  4754.                         if(ACInfo[playerid][acVehDmgRes])
  4755.                         {
  4756.                             if(ac_vHealth < ACVehInfo[ac_vehid][acHealth])
  4757.                             {
  4758.                                 ACInfo[playerid][acVehDmgRes] = false;
  4759.                                 ACInfo[playerid][acCheatCount][11] = ACInfo[playerid][acDmgRes] = 0;
  4760.                             }
  4761.                             else if(ACInfo[playerid][acACAllow][20] && ac_gtc > ACInfo[playerid][acGtc][16] + ac_gpp)
  4762.                             {
  4763.                                 ACInfo[playerid][acDmgRes] = 0;
  4764.                                 ACInfo[playerid][acVehDmgRes] = false;
  4765.                                 if(++ACInfo[playerid][acCheatCount][11] > AC_MAX_GODMODE_VEH_WARNINGS)
  4766.                                 {
  4767.                                     #undef AC_MAX_GODMODE_VEH_WARNINGS
  4768.                                     #if defined DEBUG
  4769.                                         printf("[Nex-AC debug] AC veh health: %f, veh health: %f, veh: %d",
  4770.                                         ACVehInfo[ac_vehid][acHealth], ac_vHealth, ac_vehid);
  4771.                                     #endif
  4772.                                     #if defined OnCheatDetected
  4773.                                         ac_KickWithCode(playerid, "", 0, 20);
  4774.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4775.                                         ACInfo[playerid][acCheatCount][11] = 0;
  4776.                                     #else
  4777.                                         return ac_KickWithCode(playerid, "", 0, 20);
  4778.                                     #endif
  4779.                                 }
  4780.                                 #if defined OnCheatWarning
  4781.                                     else OnCheatWarning(playerid, "", 0, 20, 0, ACInfo[playerid][acCheatCount][11]);
  4782.                                 #endif
  4783.                             }
  4784.                         }
  4785.                         GetVehicleVelocity(ac_vehid, ac_vX, ac_vY, ac_vZ);
  4786.                         new Float:ac_zAngle, ac_vsp = ac_GetSpeed(ac_vX, ac_vY, ac_vZ);
  4787.                         GetVehicleZAngle(ac_vehid, ac_zAngle);
  4788.                         if(ac_dist > 0.8)
  4789.                         {
  4790.                             if(ac_dist >= 80.0 && ac_dist > ACVehInfo[ac_vehid][acPosDiff] + ((ac_dist / 2.6) * 1.8) &&
  4791.                             ac_dist_set >= 80.0 && ac_dist_set > ACVehInfo[ac_vehid][acPosDiff] + ((ac_dist_set / 2.6) * 1.8))
  4792.                             {
  4793.                                 #if defined VectorSize
  4794.                                 if(ACInfo[playerid][acACAllow][3] && ac_gtc > ACInfo[playerid][acGtc][19] + ac_gpp &&
  4795.                                 (ACInfo[playerid][acPosZ] > -95.0 || ac_pZ - ACInfo[playerid][acPosZ] < 40.0 ||
  4796.                                 VectorSize(ac_pX - ACInfo[playerid][acPosX], ac_pY - ACInfo[playerid][acPosY], 0.0) >= 180.0 ||
  4797.                                 ++ACInfo[playerid][acCheatCount][21] > AC_MAX_TELEPORT_GLITCH_WARNINGS))
  4798.                                 #else
  4799.                                 if(ACInfo[playerid][acACAllow][3] && ac_gtc > ACInfo[playerid][acGtc][19] + ac_gpp &&
  4800.                                 (ACInfo[playerid][acPosZ] > -95.0 || ac_pZ - ACInfo[playerid][acPosZ] < 40.0 ||
  4801.                                 floatsqroot(floatpower(ac_pX - ACInfo[playerid][acPosX], 2.0) + floatpower(ac_pY - ACInfo[playerid][acPosY], 2.0)) >= 180.0 ||
  4802.                                 ++ACInfo[playerid][acCheatCount][21] > AC_MAX_TELEPORT_GLITCH_WARNINGS))
  4803.                                 #endif
  4804.                                 {
  4805.                                     #if defined DEBUG
  4806.                                         printf("[Nex-AC debug] Dist: %f, dist set: %f, old pos diff: %f, speed: %d, veh: %d",
  4807.                                         ac_dist, ac_dist_set, ACVehInfo[ac_vehid][acPosDiff], ac_vsp, ac_vehid);
  4808.                                     #endif
  4809.                                     #if defined OnCheatDetected
  4810.                                         ac_KickWithCode(playerid, "", 0, 3, 2);
  4811.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4812.                                         ACInfo[playerid][acCheatCount][21] = 0;
  4813.                                     #else
  4814.                                         return ac_KickWithCode(playerid, "", 0, 3, 2);
  4815.                                     #endif
  4816.                                 }
  4817.                                 else
  4818.                                 {
  4819.                                     ACInfo[playerid][acLastPosX] = ac_pX;
  4820.                                     ACInfo[playerid][acLastPosY] = ac_pY;
  4821.                                 }
  4822.                             }
  4823.                             else if(ac_vsp < 12 && ac_gtc > ACInfo[playerid][acGtc][11] + ac_gpp)
  4824.                             {
  4825.                                 if(ac_dist >= 40.0 && ac_dist_set >= 40.0)
  4826.                                 {
  4827.                                     if(ACInfo[playerid][acACAllow][3])
  4828.                                     {
  4829.                                         #if defined DEBUG
  4830.                                             printf("[Nex-AC debug] Speed: %d, dist: %f, dist set: %f", ac_vsp, ac_dist, ac_dist_set);
  4831.                                         #endif
  4832.                                         #if defined OnCheatDetected
  4833.                                             ac_KickWithCode(playerid, "", 0, 3, 4);
  4834.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4835.                                         #else
  4836.                                             return ac_KickWithCode(playerid, "", 0, 3, 4);
  4837.                                         #endif
  4838.                                     }
  4839.                                 }
  4840.                                 else if(ACInfo[playerid][acACAllow][1])
  4841.                                 {
  4842.                                     if(++ACInfo[playerid][acCheatCount][2] > AC_MAX_AIR_VEH_WARNINGS)
  4843.                                     {
  4844.                                         #undef AC_MAX_AIR_VEH_WARNINGS
  4845.                                         #if defined DEBUG
  4846.                                             printf("[Nex-AC debug] Speed: %d, dist: %f, veh: %d", ac_vsp, ac_dist, ac_vehid);
  4847.                                         #endif
  4848.                                         #if defined OnCheatDetected
  4849.                                             ac_KickWithCode(playerid, "", 0, 1);
  4850.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4851.                                             ACInfo[playerid][acCheatCount][2] = 0;
  4852.                                         #else
  4853.                                             return ac_KickWithCode(playerid, "", 0, 1);
  4854.                                         #endif
  4855.                                     }
  4856.                                     #if defined OnCheatWarning
  4857.                                         else OnCheatWarning(playerid, "", 0, 1, 0, ACInfo[playerid][acCheatCount][2]);
  4858.                                     #endif
  4859.                                 }
  4860.                             }
  4861.                         }
  4862.                         if(ac_gtc > ACInfo[playerid][acGtc][9] + ac_gpp)
  4863.                         {
  4864.                             ac_i = GetVehicleModel(ac_vehid);
  4865.                             new ac_spDiff = ac_vsp - ac_GetSpeed(ACVehInfo[ac_vehid][acVelX], ACVehInfo[ac_vehid][acVelY], ACVehInfo[ac_vehid][acVelZ]);
  4866.                             if(ACInfo[playerid][acACAllow][10])
  4867.                             {
  4868.                                 if(ac_spDiff > 230)
  4869.                                 {
  4870.                                     #if defined DEBUG
  4871.                                         printf("[Nex-AC debug] Speed: %d, old speed: %d, veh model: %d",
  4872.                                         ac_vsp, ac_vsp - ac_spDiff, ac_i);
  4873.                                     #endif
  4874.                                     #if defined OnCheatDetected
  4875.                                         ac_KickWithCode(playerid, "", 0, 10, 3);
  4876.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4877.                                     #else
  4878.                                         return ac_KickWithCode(playerid, "", 0, 10, 3);
  4879.                                     #endif
  4880.                                 }
  4881.                                 else if(ac_spDiff >= 20 &&
  4882.                                 ACVehInfo[ac_vehid][acSpeedDiff] <= ac_spDiff && ACVehInfo[ac_vehid][acHealth] <= ac_vHealth &&
  4883.                                 !((ac_i == 432 || ac_i == 449 || ac_IsATrainLoco(ac_i)) && ac_spDiff < 65 ||
  4884.                                 ac_IsABmx(ac_i) && floatabs(ac_vX) <= 0.3 && floatabs(ac_vY) <= 0.3 && floatabs(ac_vZ) <= 0.3 ||
  4885.                                 ac_i != 449 && !ac_IsATrainLoco(ac_i) && !ac_IsABmx(ac_i) && ACVehInfo[ac_vehid][acHealth] < 250.0))
  4886.                                 {
  4887.                                     ACInfo[playerid][acCheatCount][16] += (1 * AC_SPEEDHACK_VEH_RESET_DELAY);
  4888.                                     if(ACInfo[playerid][acCheatCount][16] > AC_MAX_SPEEDHACK_VEH_WARNINGS)
  4889.                                     {
  4890.                                         #if defined DEBUG
  4891.                                             printf("[Nex-AC debug] Speed: %d, old speed: %d, veh model: %d",
  4892.                                             ac_vsp, ac_vsp - ac_spDiff, ac_i);
  4893.                                         #endif
  4894.                                         #if defined OnCheatDetected
  4895.                                             ac_KickWithCode(playerid, "", 0, 10, 1);
  4896.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4897.                                             ACInfo[playerid][acCheatCount][16] = 0;
  4898.                                         #else
  4899.                                             return ac_KickWithCode(playerid, "", 0, 10, 1);
  4900.                                         #endif
  4901.                                     }
  4902.                                     #if defined OnCheatWarning
  4903.                                         else OnCheatWarning(playerid, "", 0, 10, 1, floatround(ACInfo[playerid][acCheatCount][16] / AC_SPEEDHACK_VEH_RESET_DELAY));
  4904.                                     #endif
  4905.                                 }
  4906.                             }
  4907.                             if(ACInfo[playerid][acACAllow][25] &&
  4908.                             ac_vsp > 15 && ac_abs(ac_spDiff) < 25 &&
  4909.                             floatround(floatabs(ac_zAngle - ACVehInfo[ac_vehid][acZAngle])) == 180 &&
  4910.                             (ac_vX < 0.0) != (ACVehInfo[ac_vehid][acVelX] < 0.0) &&
  4911.                             (ac_vY < 0.0) != (ACVehInfo[ac_vehid][acVelY] < 0.0) &&
  4912.                             (ac_vZ < 0.0) != (ACVehInfo[ac_vehid][acVelZ] < 0.0))
  4913.                             {
  4914.                                 #undef ac_abs
  4915.                                 #if defined DEBUG
  4916.                                     printf("[Nex-AC debug] Speed: %d, speed diff: %d, z angle: %f, old z angle: %f, veh: %d",
  4917.                                     ac_vsp, ac_spDiff, ac_zAngle, ACVehInfo[ac_vehid][acZAngle], ac_vehid);
  4918.                                 #endif
  4919.                                 #if defined OnCheatDetected
  4920.                                     ac_KickWithCode(playerid, "", 0, 25);
  4921.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4922.                                 #else
  4923.                                     return ac_KickWithCode(playerid, "", 0, 25);
  4924.                                 #endif
  4925.                             }
  4926.                             if(ac_IsAnAircraft(ac_i))
  4927.                             {
  4928.                                 if(ACInfo[playerid][acACAllow][10] && (ac_vsp = ac_GetSpeed(ac_vX, ac_vY)) > 270)
  4929.                                 {
  4930.                                     #if defined DEBUG
  4931.                                         printf("[Nex-AC debug] Speed (x, y): %d, veh model: %d", ac_vsp, ac_i);
  4932.                                     #endif
  4933.                                     #if defined OnCheatDetected
  4934.                                         ac_KickWithCode(playerid, "", 0, 10, 2);
  4935.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4936.                                     #else
  4937.                                         return ac_KickWithCode(playerid, "", 0, 10, 2);
  4938.                                     #endif
  4939.                                 }
  4940.                             }
  4941.                             else if(ACInfo[playerid][acACAllow][8])
  4942.                             {
  4943.                                 ac_tmp = ac_pZ - ACInfo[playerid][acPosZ];
  4944.                                 if(ac_vZ >= 0.1 && ac_vZ > ACVehInfo[ac_vehid][acVelZ] &&
  4945.                                 floatabs(ACInfo[playerid][acPosX] - ac_pX) < ac_tmp / 2.0 &&
  4946.                                 floatabs(ACInfo[playerid][acPosY] - ac_pY) < ac_tmp / 2.0)
  4947.                                 {
  4948.                                     if(++ACInfo[playerid][acCheatCount][3] > (ac_IsABmx(ac_i) ? AC_MAX_FLYHACK_BIKE_WARNINGS : AC_MAX_FLYHACK_VEH_WARNINGS))
  4949.                                     {
  4950.                                         #undef AC_MAX_FLYHACK_BIKE_WARNINGS
  4951.                                         #if defined DEBUG
  4952.                                             printf("[Nex-AC debug] Vel z: %f, old vel z: %f, pos diff x, y, z: %f, %f, %f, veh: %d",
  4953.                                             ac_vZ, ACVehInfo[ac_vehid][acVelZ], ACInfo[playerid][acPosX] - ac_pX, ACInfo[playerid][acPosY] - ac_pY, ac_tmp, ac_vehid);
  4954.                                         #endif
  4955.                                         #if defined OnCheatDetected
  4956.                                             ac_KickWithCode(playerid, "", 0, 8, 1);
  4957.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4958.                                             ACInfo[playerid][acCheatCount][3] = 0;
  4959.                                         #else
  4960.                                             return ac_KickWithCode(playerid, "", 0, 8, 1);
  4961.                                         #endif
  4962.                                     }
  4963.                                     #if defined OnCheatWarning
  4964.                                         else OnCheatWarning(playerid, "", 0, 8, 1, ACInfo[playerid][acCheatCount][3]);
  4965.                                     #endif
  4966.                                 }
  4967.                                 else ACInfo[playerid][acCheatCount][3] = 0;
  4968.                             }
  4969.                             ACVehInfo[ac_vehid][acSpeedDiff] = ac_spDiff;
  4970.                         }
  4971.                         ACVehInfo[ac_vehid][acPosX] = ac_pX;
  4972.                         ACVehInfo[ac_vehid][acPosY] = ac_pY;
  4973.                         ACVehInfo[ac_vehid][acPosZ] = ac_pZ;
  4974.                         ACVehInfo[ac_vehid][acVelX] = ac_vX;
  4975.                         ACVehInfo[ac_vehid][acVelY] = ac_vY;
  4976.                         ACVehInfo[ac_vehid][acVelZ] = ac_vZ;
  4977.                         ACVehInfo[ac_vehid][acPosDiff] = ac_dist;
  4978.                         if(ACInfo[playerid][acSetVehHealth] == -1.0) ACVehInfo[ac_vehid][acHealth] = ac_vHealth;
  4979.                         ACVehInfo[ac_vehid][acZAngle] = ac_zAngle;
  4980.                     }
  4981.                     ACInfo[playerid][acSeat] = ac_s;
  4982.                 }
  4983.                 else
  4984.                 {
  4985.                     GetPlayerVelocity(playerid, ac_vX, ac_vY, ac_vZ);
  4986.                     ac_s = ac_GetSpeed(ac_vX, ac_vY, ac_vZ);
  4987.                     if(ACInfo[playerid][acAnim] != (ac_sa = GetPlayerAnimationIndex(playerid)))
  4988.                     {
  4989.                         if(ac_sa == -1)
  4990.                         {
  4991.                             if(ACInfo[playerid][acACAllow][24])
  4992.                             {
  4993.                                 #if defined OnCheatDetected
  4994.                                     ac_KickWithCode(playerid, "", 0, 24);
  4995.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4996.                                 #else
  4997.                                     return ac_KickWithCode(playerid, "", 0, 24);
  4998.                                 #endif
  4999.                             }
  5000.                         }
  5001.                         else if(ACInfo[playerid][acACAllow][30] && !ac_PedAnims)
  5002.                         {
  5003.                             ac_i = GetPlayerSkin(playerid);
  5004.                             if(ac_sa == 1231 && ac_w != 46 && 1 <= ac_i <= 311 && ac_i != 74)
  5005.                             {
  5006.                                 if(++ACInfo[playerid][acCheatCount][19] > AC_MAX_CJ_RUN_WARNINGS)
  5007.                                 {
  5008.                                     #undef AC_MAX_CJ_RUN_WARNINGS
  5009.                                     #if defined DEBUG
  5010.                                         printf("[Nex-AC debug] Skin: %d, old anim: %d, weapo