SHARE
TWEET

Nex-AC

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