SHARE
TWEET

Nex-AC

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