SHARE
TWEET

Nex-AC

a guest Jan 28th, 2020 247 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Nex-AC by Nexius v1.9.51 (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.51"
  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[13],
  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][8] = 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][6] != -1)
  1333.     {
  1334.         if(!toggle)
  1335.         {
  1336.             if(ACInfo[playerid][acDead]) ACInfo[playerid][acSet][7] = 4;
  1337.             else
  1338.             {
  1339.                 ACInfo[playerid][acSet][3] =
  1340.                 ACInfo[playerid][acSet][4] =
  1341.                 ACInfo[playerid][acSet][6] =
  1342.                 ACInfo[playerid][acSet][8] =
  1343.                 ACInfo[playerid][acSet][9] =
  1344.                 ACInfo[playerid][acNextSpecAct] = -1;
  1345.                 for(new ac_i = 12; ac_i >= 0; --ac_i)
  1346.                 {
  1347.                     ACInfo[playerid][acSetWeapon][ac_i] = -1;
  1348.                     ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  1349.                 }
  1350.                 ACInfo[playerid][acForceClass] =
  1351.                 ACInfo[playerid][acUnFrozen] = true;
  1352.                 ACInfo[playerid][acTpToZ] = false;
  1353.                 ACInfo[playerid][acSet][7] = 1;
  1354.                 #if defined FreezeSyncPacket
  1355.                     FreezeSyncPacket(playerid, E_ALL_SYNC, false);
  1356.                 #endif
  1357.             }
  1358.             ACInfo[playerid][acSpawnRes]++;
  1359.             ACInfo[playerid][acSpec] = false;
  1360.             ACInfo[playerid][acSpawnTick] = ACInfo[playerid][acNOPCount][9] = 0;
  1361.             ACInfo[playerid][acGtc][13] = GetTickCount() + 2650;
  1362.         }
  1363.     }
  1364.     else if(toggle)
  1365.     {
  1366.         ACInfo[playerid][acSet][6] = 1;
  1367.         ACInfo[playerid][acNOPCount][8] = 0;
  1368.         ACInfo[playerid][acGtc][12] = GetTickCount() + 2650;
  1369.     }
  1370.     return 1;
  1371. }
  1372.  
  1373. ac_fpublic ac_SpawnPlayer(playerid)
  1374. {
  1375.     if(!SpawnPlayer(playerid)) return 0;
  1376.     if(ACInfo[playerid][acDead]) ACInfo[playerid][acSet][7] = 5;
  1377.     else
  1378.     {
  1379.         ACInfo[playerid][acSet][3] =
  1380.         ACInfo[playerid][acSet][4] =
  1381.         ACInfo[playerid][acSet][8] =
  1382.         ACInfo[playerid][acSet][9] =
  1383.         ACInfo[playerid][acNextSpecAct] = -1;
  1384.         for(new ac_i = 12; ac_i >= 0; --ac_i)
  1385.         {
  1386.             ACInfo[playerid][acSetWeapon][ac_i] = -1;
  1387.             ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  1388.         }
  1389.         ACInfo[playerid][acTpToZ] = false;
  1390.         ACInfo[playerid][acUnFrozen] = true;
  1391.         ACInfo[playerid][acSet][7] = 2;
  1392.         #if defined FreezeSyncPacket
  1393.             FreezeSyncPacket(playerid, E_ALL_SYNC, false);
  1394.         #endif
  1395.     }
  1396.     ACInfo[playerid][acSpawnRes]++;
  1397.     ACInfo[playerid][acSpawnTick] = ACInfo[playerid][acNOPCount][9] = 0;
  1398.     ACInfo[playerid][acGtc][13] = GetTickCount() + 2650;
  1399.     return 1;
  1400. }
  1401.  
  1402. ac_fpublic ac_SetPlayerHealth(playerid, Float:ac_health)
  1403. {
  1404.     if(!SetPlayerHealth(playerid, ac_health)) return 0;
  1405.     if(ac_health < 0.0) ac_health = 0.0;
  1406.     ACInfo[playerid][acNOPCount][3] = 0;
  1407.     ACInfo[playerid][acSet][1] = floatround(ac_health, floatround_tozero);
  1408.     ACInfo[playerid][acGtc][3] = GetTickCount() + 2650;
  1409.     return 1;
  1410. }
  1411.  
  1412. ac_fpublic ac_SetPlayerArmour(playerid, Float:ac_armour)
  1413. {
  1414.     if(!SetPlayerArmour(playerid, ac_armour)) return 0;
  1415.     if(ac_armour < 0.0) ac_armour = 0.0;
  1416.     ACInfo[playerid][acNOPCount][5] = 0;
  1417.     ACInfo[playerid][acSet][2] = floatround(ac_armour, floatround_tozero);
  1418.     ACInfo[playerid][acGtc][5] = GetTickCount() + 2650;
  1419.     return 1;
  1420. }
  1421.  
  1422. ac_fpublic ac_GivePlayerWeapon(playerid, weaponid, ac_ammo)
  1423. {
  1424.     if(ac_IsValidWeapon(weaponid))
  1425.     {
  1426.         new ac_s = ac_wSlot[weaponid];
  1427.         ACInfo[playerid][acNOPCount][0] = ACInfo[playerid][acNOPCount][1] = 0;
  1428.         if(16 <= weaponid <= 18 || 22 <= weaponid <= 43)
  1429.         {
  1430.             if(3 <= ac_s <= 5 || (ACInfo[playerid][acSetWeapon][ac_s] == -1
  1431.             ? ACInfo[playerid][acWeapon][ac_s] : ACInfo[playerid][acSetWeapon][ac_s]) == weaponid)
  1432.             {
  1433.                 new ac_tmp;
  1434.                 if(ACInfo[playerid][acGiveAmmo][ac_s] == -65535) ac_tmp = ACInfo[playerid][acAmmo][ac_s] + ac_ammo;
  1435.                 else ac_tmp = ACInfo[playerid][acGiveAmmo][ac_s] + ac_ammo;
  1436.                 if(ac_tmp < -32768)
  1437.                 {
  1438.                     ac_ammo -= ac_tmp + 32768;
  1439.                     ac_tmp = -32768;
  1440.                 }
  1441.                 else if(ac_tmp > 32767)
  1442.                 {
  1443.                     ac_ammo -= ac_tmp - 32767;
  1444.                     ac_tmp = 32767;
  1445.                 }
  1446.                 ACInfo[playerid][acGiveAmmo][ac_s] = ac_tmp;
  1447.             }
  1448.             else
  1449.             {
  1450.                 if(ac_ammo < -32768) ac_ammo = -32768;
  1451.                 else if(ac_ammo > 32767) ac_ammo = 32767;
  1452.                 ACInfo[playerid][acGiveAmmo][ac_s] = ac_ammo;
  1453.             }
  1454.             ACInfo[playerid][acCheatCount][14] = ACInfo[playerid][acReloadTick] = 0;
  1455.         }
  1456.         else ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  1457.         ACInfo[playerid][acSetWeapon][ac_s] = ACInfo[playerid][acSet][3] = weaponid;
  1458.         ACInfo[playerid][acGtcGiveAmmo][ac_s] =
  1459.         ACInfo[playerid][acGtcSetWeapon][ac_s] =
  1460.         ACInfo[playerid][acGtc][2] = GetTickCount() + 2850;
  1461.     }
  1462.     return GivePlayerWeapon(playerid, weaponid, ac_ammo);
  1463. }
  1464.  
  1465. ac_fpublic ac_SetPlayerAmmo(playerid, weaponid, ac_ammo)
  1466. {
  1467.     if(ac_ammo < -32768) ac_ammo = -32768;
  1468.     else if(ac_ammo > 32767) ac_ammo = 32767;
  1469.     if(16 <= weaponid <= 43)
  1470.     {
  1471.         new ac_s = ac_wSlot[weaponid];
  1472.         if(ACInfo[playerid][acWeapon][ac_s] > 0 || ACInfo[playerid][acSetWeapon][ac_s] > 0)
  1473.         {
  1474.             ACInfo[playerid][acNOPCount][1] = 0;
  1475.             ACInfo[playerid][acGiveAmmo][ac_s] = ac_ammo;
  1476.             ACInfo[playerid][acGtcGiveAmmo][ac_s] = GetTickCount() + 2850;
  1477.         }
  1478.     }
  1479.     return SetPlayerAmmo(playerid, weaponid, ac_ammo);
  1480. }
  1481.  
  1482. ac_fpublic ac_SetPlayerArmedWeapon(playerid, weaponid)
  1483. {
  1484.     if(!SetPlayerArmedWeapon(playerid, weaponid)) return 0;
  1485.     if(ac_IsValidWeapon(weaponid))
  1486.     {
  1487.         new ac_s = ac_wSlot[weaponid];
  1488.         if((weaponid == ACInfo[playerid][acWeapon][ac_s] || weaponid == ACInfo[playerid][acSetWeapon][ac_s]) &&
  1489.         (ACInfo[playerid][acAmmo][ac_s] != 0 || ACInfo[playerid][acGiveAmmo][ac_s] != 0))
  1490.         {
  1491.             ACInfo[playerid][acNOPCount][0] = 0;
  1492.             ACInfo[playerid][acSet][3] = weaponid;
  1493.             ACInfo[playerid][acGtc][2] = GetTickCount() + 2850;
  1494.         }
  1495.     }
  1496.     return 1;
  1497. }
  1498.  
  1499. ac_fpublic ac_ResetPlayerWeapons(playerid)
  1500. {
  1501.     if(!ResetPlayerWeapons(playerid)) return 0;
  1502.     for(new ac_i = 12; ac_i >= 0; --ac_i)
  1503.     {
  1504.         ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acAmmo][ac_i] = 0;
  1505.         ACInfo[playerid][acSetWeapon][ac_i] = -1;
  1506.         ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  1507.     }
  1508.     ACInfo[playerid][acSet][3] = -1;
  1509.     ACInfo[playerid][acGtc][7] = GetTickCount() + 2850;
  1510.     return 1;
  1511. }
  1512.  
  1513. ac_fpublic ac_GivePlayerMoney(playerid, ac_money)
  1514. {
  1515.     if(!GivePlayerMoney(playerid, ac_money)) return 0;
  1516.     ACInfo[playerid][acNOPCount][11] = AC_MAX_MONEY_WARNINGS;
  1517.     ACInfo[playerid][acMoney] += ac_money;
  1518.     #undef AC_MAX_MONEY_WARNINGS
  1519.     return 1;
  1520. }
  1521.  
  1522. ac_fpublic ac_ResetPlayerMoney(playerid)
  1523. {
  1524.     if(!ResetPlayerMoney(playerid)) return 0;
  1525.     ACInfo[playerid][acNOPCount][11] = 0;
  1526.     ACInfo[playerid][acMoney] = 0;
  1527.     return 1;
  1528. }
  1529.  
  1530. ac_fpublic ac_GetPlayerMoney(playerid) return ACInfo[playerid][acMoney];
  1531.  
  1532. ac_fpublic ac_SetPlayerSpecialAction(playerid, ac_actionid)
  1533. {
  1534.     if(!SetPlayerSpecialAction(playerid, ac_actionid)) return 0;
  1535.     if(ac_actionid == SPECIAL_ACTION_USEJETPACK || 24 <= ac_actionid <= 25 ||
  1536.     (ac_actionid == SPECIAL_ACTION_USECELLPHONE || ac_actionid == 68 || SPECIAL_ACTION_DANCE1 <= ac_actionid <= SPECIAL_ACTION_DANCE4) && ACInfo[playerid][acVeh] == 0 ||
  1537.     ac_actionid == SPECIAL_ACTION_STOPUSECELLPHONE && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_USECELLPHONE ||
  1538.     (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 ||
  1539.     ac_actionid == SPECIAL_ACTION_NONE && ACInfo[playerid][acSpecAct] != SPECIAL_ACTION_DUCK &&
  1540.     ACInfo[playerid][acSpecAct] != SPECIAL_ACTION_ENTER_VEHICLE && ACInfo[playerid][acSpecAct] != SPECIAL_ACTION_HANDSUP)
  1541.     {
  1542.         ACInfo[playerid][acNOPCount][6] = 0;
  1543.         if((ac_actionid == 68 || SPECIAL_ACTION_HANDSUP <= ac_actionid <= SPECIAL_ACTION_USECELLPHONE || SPECIAL_ACTION_DRINK_BEER <= ac_actionid <= 25) &&
  1544.         SPECIAL_ACTION_DANCE1 <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_DANCE4 ||
  1545.         SPECIAL_ACTION_DRINK_BEER <= ac_actionid <= 25 && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_DUCK ||
  1546.         (ac_actionid == SPECIAL_ACTION_NONE || 24 <= ac_actionid <= 25) && ACInfo[playerid][acVeh] ||
  1547.         24 <= ac_actionid <= 25 && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_ENTER_VEHICLE) ACInfo[playerid][acNextSpecAct] = ac_actionid;
  1548.         else
  1549.         {
  1550.             if(ac_actionid == SPECIAL_ACTION_STOPUSECELLPHONE) ac_actionid = SPECIAL_ACTION_NONE;
  1551.             else if(ac_actionid == SPECIAL_ACTION_USEJETPACK || ac_actionid == SPECIAL_ACTION_HANDSUP ||
  1552.             ac_actionid == 68 || SPECIAL_ACTION_DANCE1 <= ac_actionid <= SPECIAL_ACTION_DANCE4 ||
  1553.             SPECIAL_ACTION_DRINK_BEER <= ac_actionid <= SPECIAL_ACTION_DRINK_SPRUNK) ACInfo[playerid][acNextSpecAct] = ACInfo[playerid][acSpecAct];
  1554.             else ACInfo[playerid][acNextSpecAct] = -1;
  1555.             ACInfo[playerid][acSet][4] = ac_actionid;
  1556.             ACInfo[playerid][acGtc][6] = GetTickCount() + 3250;
  1557.         }
  1558.     }
  1559.     return 1;
  1560. }
  1561.  
  1562. ac_fpublic ac_SetPlayerInterior(playerid, interiorid)
  1563. {
  1564.     if(!SetPlayerInterior(playerid, interiorid)) return 0;
  1565.     ACInfo[playerid][acNOPCount][2] = 0;
  1566.     ACInfo[playerid][acSet][0] = interiorid % 256;
  1567.     ACInfo[playerid][acGtc][0] = GetTickCount() + 3250;
  1568.     return 1;
  1569. }
  1570.  
  1571. ac_fpublic ac_SetPlayerPos(playerid, Float:ac_x, Float:ac_y, Float:ac_z)
  1572. {
  1573.     if(!SetPlayerPos(playerid, ac_x, ac_y, ac_z)) return 0;
  1574.     ACInfo[playerid][acSet][8] = 1;
  1575.     ACInfo[playerid][acNOPCount][10] = 0;
  1576.     ACInfo[playerid][acSetPosX] = ac_x;
  1577.     ACInfo[playerid][acSetPosY] = ac_y;
  1578.     ACInfo[playerid][acSetPosZ] = ac_z;
  1579.     ACInfo[playerid][acSetPosTick] =
  1580.     ACInfo[playerid][acGtc][11] = GetTickCount() + 3850;
  1581.     return 1;
  1582. }
  1583.  
  1584. ac_fpublic ac_SetPlayerPosFindZ(playerid, Float:ac_x, Float:ac_y, Float:ac_z)
  1585. {
  1586.     if(!SetPlayerPosFindZ(playerid, ac_x, ac_y, ac_z)) return 0;
  1587.     ACInfo[playerid][acSet][8] = 2;
  1588.     ACInfo[playerid][acTpToZ] = true;
  1589.     ACInfo[playerid][acNOPCount][10] = 0;
  1590.     ACInfo[playerid][acSetPosX] = ac_x;
  1591.     ACInfo[playerid][acSetPosY] = ac_y;
  1592.     ACInfo[playerid][acSetPosTick] =
  1593.     ACInfo[playerid][acGtc][11] = GetTickCount() + 3850;
  1594.     return 1;
  1595. }
  1596.  
  1597. ac_fpublic ac_SetPlayerVelocity(playerid, Float:ac_X, Float:ac_Y, Float:ac_Z)
  1598. {
  1599.     if(!SetPlayerVelocity(playerid, ac_X, ac_Y, ac_Z)) return 0;
  1600.     ACInfo[playerid][acSpeed] = ac_GetSpeed(ac_X, ac_Y, ac_Z);
  1601.     ACInfo[playerid][acGtc][10] = GetTickCount() + 1650;
  1602.     return 1;
  1603. }
  1604.  
  1605. ac_fpublic ac_PutPlayerInVehicle(playerid, vehicleid, ac_seatid)
  1606. {
  1607.     if(!PutPlayerInVehicle(playerid, vehicleid, ac_seatid)) return 0;
  1608.     if(!(SPECIAL_ACTION_DANCE1 <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_DANCE4) &&
  1609.     !(SPECIAL_ACTION_DRINK_BEER <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_DRINK_SPRUNK) &&
  1610.     GetPlayerVirtualWorld(playerid) == GetVehicleVirtualWorld(vehicleid))
  1611.     {
  1612.         new ac_modelid = GetVehicleModel(vehicleid);
  1613.         ACInfo[playerid][acNOPCount][7] = 0;
  1614.         ACInfo[playerid][acSet][9] = vehicleid;
  1615.         if(ac_IsABus(ac_modelid) || ac_IsVehicleSeatOccupied(vehicleid, ac_seatid) ||
  1616.         ac_seatid > ac_GetMaxPassengers(ac_modelid)) ACInfo[playerid][acSet][5] = -1;
  1617.         else ACInfo[playerid][acSet][5] = ac_seatid;
  1618.         ACInfo[playerid][acGtc][1] = GetTickCount() + 2650;
  1619.     }
  1620.     return 1;
  1621. }
  1622.  
  1623. ac_fpublic ac_RemovePlayerFromVehicle(playerid)
  1624. {
  1625.     if(!RemovePlayerFromVehicle(playerid)) return 0;
  1626.     ACInfo[playerid][acSet][11] = 1;
  1627.     ACInfo[playerid][acGtc][8] = GetTickCount() + 4650;
  1628.     return 1;
  1629. }
  1630.  
  1631. ac_fpublic ac_SetVehiclePos(vehicleid, Float:ac_x, Float:ac_y, Float:ac_z)
  1632. {
  1633.     if(!SetVehiclePos(vehicleid, ac_x, ac_y, ac_z)) return 0;
  1634.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1635.     if(ac_driver != INVALID_PLAYER_ID)
  1636.     {
  1637.         ACInfo[ac_driver][acSet][8] = 3;
  1638.         ACInfo[ac_driver][acNOPCount][10] = 0;
  1639.         ACInfo[ac_driver][acSetPosX] = ac_x;
  1640.         ACInfo[ac_driver][acSetPosY] = ac_y;
  1641.         ACInfo[ac_driver][acSetPosZ] = ac_z;
  1642.         ACInfo[ac_driver][acSetPosTick] =
  1643.         ACInfo[ac_driver][acGtc][11] = GetTickCount() + 3850;
  1644.     }
  1645.     else
  1646.     {
  1647.         ACVehInfo[vehicleid][acPosX] = ac_x;
  1648.         ACVehInfo[vehicleid][acPosY] = ac_y;
  1649.         ACVehInfo[vehicleid][acPosZ] = ac_z;
  1650.     }
  1651.     return 1;
  1652. }
  1653.  
  1654. ac_fpublic ac_SetVehicleVelocity(vehicleid, Float:ac_X, Float:ac_Y, Float:ac_Z)
  1655. {
  1656.     if(!SetVehicleVelocity(vehicleid, ac_X, ac_Y, ac_Z)) return 0;
  1657.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1658.     if(ac_driver != INVALID_PLAYER_ID)
  1659.     {
  1660.         ACVehInfo[vehicleid][acVelX] = ac_X;
  1661.         ACVehInfo[vehicleid][acVelY] = ac_Y;
  1662.         ACVehInfo[vehicleid][acVelZ] = ac_Z;
  1663.         ACVehInfo[vehicleid][acSpeed] = ac_GetSpeed(ac_X, ac_Y, ac_Z);
  1664.         ACInfo[ac_driver][acGtc][9] = GetTickCount() + 1650;
  1665.     }
  1666.     return 1;
  1667. }
  1668.  
  1669. ac_fpublic ac_SetVehicleAngularVelocity(vehicleid, Float:ac_X, Float:ac_Y, Float:ac_Z)
  1670. {
  1671.     if(!SetVehicleAngularVelocity(vehicleid, ac_X, ac_Y, ac_Z)) return 0;
  1672.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1673.     if(ac_driver != INVALID_PLAYER_ID)
  1674.     {
  1675.         ACVehInfo[vehicleid][acVelX] = ac_X;
  1676.         ACVehInfo[vehicleid][acVelY] = ac_Y;
  1677.         ACVehInfo[vehicleid][acVelZ] = ac_Z;
  1678.         ACVehInfo[vehicleid][acSpeed] = ac_GetSpeed(ac_X, ac_Y, ac_Z);
  1679.         ACInfo[ac_driver][acGtc][9] = GetTickCount() + 1650;
  1680.     }
  1681.     return 1;
  1682. }
  1683.  
  1684. ac_fpublic ac_LinkVehicleToInterior(vehicleid, interiorid)
  1685. {
  1686.     if(!LinkVehicleToInterior(vehicleid, interiorid)) return 0;
  1687.     ACVehInfo[vehicleid][acInt] = interiorid % 256;
  1688.     return 1;
  1689. }
  1690.  
  1691. ac_fpublic ac_ChangeVehiclePaintjob(vehicleid, paintjobid)
  1692. {
  1693.     ACVehInfo[vehicleid][acPaintJob] = paintjobid;
  1694.     return ChangeVehiclePaintjob(vehicleid, paintjobid);
  1695. }
  1696.  
  1697. ac_fpublic ac_SetVehicleHealth(vehicleid, Float:ac_health)
  1698. {
  1699.     if(!SetVehicleHealth(vehicleid, ac_health)) return 0;
  1700.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1701.     if(ac_driver != INVALID_PLAYER_ID)
  1702.     {
  1703.         ACInfo[ac_driver][acNOPCount][4] = 0;
  1704.         ACInfo[ac_driver][acSetVehHealth] = ac_health;
  1705.         ACInfo[ac_driver][acGtc][4] = GetTickCount() + 2650;
  1706.     }
  1707.     else ACVehInfo[vehicleid][acHealth] = ac_health;
  1708.     return 1;
  1709. }
  1710.  
  1711. ac_fpublic ac_RepairVehicle(vehicleid)
  1712. {
  1713.     if(!RepairVehicle(vehicleid)) return 0;
  1714.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1715.     if(ac_driver != INVALID_PLAYER_ID)
  1716.     {
  1717.         ACInfo[ac_driver][acNOPCount][4] = 0;
  1718.         ACInfo[ac_driver][acSetVehHealth] = 1000.0;
  1719.         ACInfo[ac_driver][acGtc][4] = GetTickCount() + 2650;
  1720.     }
  1721.     else ACVehInfo[vehicleid][acHealth] = 1000.0;
  1722.     ACVehInfo[vehicleid][acPanels] =
  1723.     ACVehInfo[vehicleid][acDoors] =
  1724.     ACVehInfo[vehicleid][acTires] = 0;
  1725.     return 1;
  1726. }
  1727.  
  1728. ac_fpublic ac_UpdateVehicleDamageStatus(vehicleid, ac_panels, ac_doors, ac_lights, ac_tires)
  1729. {
  1730.     if(!UpdateVehicleDamageStatus(vehicleid, ac_panels, ac_doors, ac_lights, ac_tires)) return 0;
  1731.     ACVehInfo[vehicleid][acPanels] = ac_panels;
  1732.     ACVehInfo[vehicleid][acDoors] = ac_doors;
  1733.     ACVehInfo[vehicleid][acTires] = ac_tires;
  1734.     return 1;
  1735. }
  1736.  
  1737. ac_fpublic ac_SetVehicleToRespawn(vehicleid)
  1738. {
  1739.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1740.     if(ac_driver != INVALID_PLAYER_ID) ACInfo[ac_driver][acGtc][9] = GetTickCount() + 1650;
  1741.     return SetVehicleToRespawn(vehicleid);
  1742. }
  1743.  
  1744. ac_fpublic ac_EnableAntiCheat(code, enable)
  1745. {
  1746.     if(!(0 <= code < sizeof ac_ACAllow)) return 0;
  1747.     if(code == 42)
  1748.     {
  1749.         if(enable)
  1750.         {
  1751.             if(!ac_ACAllow[code])
  1752.             {
  1753.                 #if !AC_USE_QUERY
  1754.                     #if defined GetConsoleVarAsBool
  1755.                         ac_QueryEnable = !!GetConsoleVarAsBool("query");
  1756.                     #else
  1757.                         ac_QueryEnable = !!GetServerVarAsBool("query");
  1758.                     #endif
  1759.                 #endif
  1760.                 #if defined GetConsoleVarAsBool
  1761.                     ac_RconEnable = !!GetConsoleVarAsBool("rcon");
  1762.                 #else
  1763.                     ac_RconEnable = !!GetServerVarAsBool("rcon");
  1764.                 #endif
  1765.             }
  1766.             #if !AC_USE_QUERY
  1767.                 SendRconCommand("query 0");
  1768.             #endif
  1769.             SendRconCommand("rcon 0");
  1770.         }
  1771.         else
  1772.         {
  1773.             static ac_strtmp[9];
  1774.             #if !AC_USE_QUERY
  1775.                 format(ac_strtmp, sizeof ac_strtmp, "query %b", ac_QueryEnable);
  1776.                 SendRconCommand(ac_strtmp);
  1777.             #endif
  1778.             format(ac_strtmp, sizeof ac_strtmp, "rcon %b", ac_RconEnable);
  1779.             SendRconCommand(ac_strtmp);
  1780.         }
  1781.     }
  1782.     ac_ACAllow[code] = !!enable;
  1783.     if(enable)
  1784.     {
  1785.         #if defined foreach
  1786.             foreach(new ac_i : Player)
  1787.             {
  1788.         #else
  1789.             #if defined GetPlayerPoolSize
  1790.                 for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1791.             #else
  1792.                 for(new ac_i = MAX_PLAYERS - 1; ac_i >= 0; --ac_i)
  1793.             #endif
  1794.             {
  1795.                 if(!IsPlayerConnected(ac_i)) continue;
  1796.         #endif
  1797.             ACInfo[ac_i][acACAllow][code] = ac_ACAllow[code];
  1798.             switch(code)
  1799.             {
  1800.                 case 7: ACInfo[ac_i][acCheatCount][15] = 0;
  1801.                 case 9: ACInfo[ac_i][acCheatCount][17] = 0;
  1802.                 case 10: ACInfo[ac_i][acCheatCount][16] = ACInfo[ac_i][acCheatCount][20] = 0;
  1803.                 #if AC_USE_AMMUNATIONS
  1804.                     case 15: ACInfo[ac_i][acCheatCount][10] = 0;
  1805.                 #endif
  1806.                 case 17: ACInfo[ac_i][acCheatCount][7] = 0;
  1807.                 case 19: ACInfo[ac_i][acCheatCount][9] = 0;
  1808.                 case 20: ACInfo[ac_i][acCheatCount][11] = 0;
  1809.                 #if AC_USE_TUNING_GARAGES
  1810.                     case 23: ACInfo[ac_i][acCheatCount][12] = 0;
  1811.                 #endif
  1812.                 case 26: ACInfo[ac_i][acCheatCount][14] = ACInfo[ac_i][acCheatCount][8] = 0;
  1813.                 case 29: ACInfo[ac_i][acCheatCount][13] = ACInfo[ac_i][acCheatCount][6] = 0;
  1814.                 case 30: ACInfo[ac_i][acCheatCount][19] = 0;
  1815.                 case 31: ACInfo[ac_i][acCheatCount][4] = 0;
  1816.                 case 34: ACInfo[ac_i][acCheatCount][5] = 0;
  1817.                 case 38: ACInfo[ac_i][acCheatCount][0] = 0;
  1818.                 case 47: ACInfo[ac_i][acCheatCount][18] = 0;
  1819.             }
  1820.         }
  1821.     }
  1822.     else
  1823.     {
  1824.         #if defined foreach
  1825.             foreach(new ac_i : Player) ACInfo[ac_i][acACAllow][code] = ac_ACAllow[code];
  1826.         #else
  1827.             #if defined GetPlayerPoolSize
  1828.                 for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1829.             #else
  1830.                 for(new ac_i = MAX_PLAYERS - 1; ac_i >= 0; --ac_i)
  1831.             #endif
  1832.             {
  1833.                 if(IsPlayerConnected(ac_i)) ACInfo[ac_i][acACAllow][code] = ac_ACAllow[code];
  1834.             }
  1835.         #endif
  1836.     }
  1837.     #if AC_USE_CONFIG_FILES && AUTOSAVE_SETTINGS_IN_CONFIG
  1838.         static ac_strtmp[10];
  1839.         new ac_string[415], File:ac_cfgFile;
  1840.         if((ac_cfgFile = fopen(AC_CONFIG_FILE, io_write)))
  1841.         {
  1842.             for(new ac_i; ac_i < sizeof ac_ACAllow; ++ac_i)
  1843.             {
  1844.                 format(ac_strtmp, sizeof ac_strtmp, "%d //%d\r\n", ac_ACAllow[ac_i], ac_i);
  1845.                 strcat(ac_string, ac_strtmp);
  1846.             }
  1847.             fwrite(ac_cfgFile, ac_string);
  1848.             fclose(ac_cfgFile);
  1849.         }
  1850.     #endif
  1851.     return 1;
  1852. }
  1853.  
  1854. ac_fpublic ac_EnableAntiNOP(nopcode, enable)
  1855. {
  1856.     if(!(0 <= nopcode < sizeof ac_NOPAllow)) return 0;
  1857.     ac_NOPAllow[nopcode] = !!enable;
  1858.     #if defined foreach
  1859.         foreach(new ac_i : Player) ACInfo[ac_i][acNOPAllow][nopcode] = ac_NOPAllow[nopcode];
  1860.     #else
  1861.         #if defined GetPlayerPoolSize
  1862.             for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1863.         #else
  1864.             for(new ac_i = MAX_PLAYERS - 1; ac_i >= 0; --ac_i)
  1865.         #endif
  1866.         {
  1867.             if(IsPlayerConnected(ac_i)) ACInfo[ac_i][acNOPAllow][nopcode] = ac_NOPAllow[nopcode];
  1868.         }
  1869.     #endif
  1870.     #if AC_USE_CONFIG_FILES && AUTOSAVE_SETTINGS_IN_CONFIG
  1871.         static ac_strtmp[10];
  1872.         new ac_string[87], File:ac_cfgFile;
  1873.         if((ac_cfgFile = fopen(AC_NOP_CONFIG_FILE, io_write)))
  1874.         {
  1875.             for(new ac_i; ac_i < sizeof ac_NOPAllow; ++ac_i)
  1876.             {
  1877.                 format(ac_strtmp, sizeof ac_strtmp, "%d //%d\r\n", ac_NOPAllow[ac_i], ac_i);
  1878.                 strcat(ac_string, ac_strtmp);
  1879.             }
  1880.             fwrite(ac_cfgFile, ac_string);
  1881.             fclose(ac_cfgFile);
  1882.         }
  1883.     #endif
  1884.     #undef AUTOSAVE_SETTINGS_IN_CONFIG
  1885.     return 1;
  1886. }
  1887.  
  1888. ac_fpublic ac_EnableAntiCheatForPlayer(playerid, code, enable)
  1889. {
  1890.     if(!(0 <= code < sizeof ac_ACAllow)) return -1;
  1891.     ACInfo[playerid][acACAllow][code] = !!enable;
  1892.     if(enable)
  1893.     {
  1894.         switch(code)
  1895.         {
  1896.             case 7: ACInfo[playerid][acCheatCount][15] = 0;
  1897.             case 9: ACInfo[playerid][acCheatCount][17] = 0;
  1898.             case 10: ACInfo[playerid][acCheatCount][16] = ACInfo[playerid][acCheatCount][20] = 0;
  1899.             #if AC_USE_AMMUNATIONS
  1900.                 case 15: ACInfo[playerid][acCheatCount][10] = 0;
  1901.             #endif
  1902.             case 17: ACInfo[playerid][acCheatCount][7] = 0;
  1903.             case 19: ACInfo[playerid][acCheatCount][9] = 0;
  1904.             case 20: ACInfo[playerid][acCheatCount][11] = 0;
  1905.             #if AC_USE_TUNING_GARAGES
  1906.                 case 23: ACInfo[playerid][acCheatCount][12] = 0;
  1907.             #endif
  1908.             case 26: ACInfo[playerid][acCheatCount][14] = ACInfo[playerid][acCheatCount][8] = 0;
  1909.             case 29: ACInfo[playerid][acCheatCount][13] = ACInfo[playerid][acCheatCount][6] = 0;
  1910.             case 30: ACInfo[playerid][acCheatCount][19] = 0;
  1911.             case 31: ACInfo[playerid][acCheatCount][4] = 0;
  1912.             case 34: ACInfo[playerid][acCheatCount][5] = 0;
  1913.             case 38: ACInfo[playerid][acCheatCount][0] = 0;
  1914.             case 47: ACInfo[playerid][acCheatCount][18] = 0;
  1915.         }
  1916.     }
  1917.     return 1;
  1918. }
  1919.  
  1920. ac_fpublic ac_EnableAntiNOPForPlayer(playerid, nopcode, enable)
  1921. {
  1922.     if(!(0 <= nopcode < sizeof ac_NOPAllow)) return -1;
  1923.     ACInfo[playerid][acNOPAllow][nopcode] = !!enable;
  1924.     return 1;
  1925. }
  1926.  
  1927. ac_fpublic ac_IsAntiCheatEnabled(code)
  1928. {
  1929.     if(!(0 <= code < sizeof ac_ACAllow)) return 0;
  1930.     return ac_ACAllow[code];
  1931. }
  1932.  
  1933. ac_fpublic ac_IsAntiNOPEnabled(nopcode)
  1934. {
  1935.     if(!(0 <= nopcode < sizeof ac_NOPAllow)) return 0;
  1936.     return ac_NOPAllow[nopcode];
  1937. }
  1938.  
  1939. ac_fpublic ac_IsAntiCheatEnabledForPlayer(playerid, code)
  1940. {
  1941.     if(!(0 <= code < sizeof ac_ACAllow)) return 0;
  1942.     return ACInfo[playerid][acACAllow][code];
  1943. }
  1944.  
  1945. ac_fpublic ac_IsAntiNOPEnabledForPlayer(playerid, nopcode)
  1946. {
  1947.     if(!(0 <= nopcode < sizeof ac_NOPAllow)) return 0;
  1948.     return ACInfo[playerid][acNOPAllow][nopcode];
  1949. }
  1950.  
  1951. ac_fpublic ac_AntiCheatGetSpeed(playerid) return ACInfo[playerid][acSpeed];
  1952.  
  1953. ac_fpublic ac_AntiCheatGetAnimationIndex(playerid) return ACInfo[playerid][acAnim];
  1954.  
  1955. ac_fpublic ac_AntiCheatGetDialog(playerid) return ACInfo[playerid][acDialog];
  1956.  
  1957. ac_fpublic ac_AntiCheatGetInterior(playerid) return ACInfo[playerid][acInt];
  1958.  
  1959. ac_fpublic ac_AntiCheatGetEnterVehicle(playerid) return ACInfo[playerid][acEnterVeh];
  1960.  
  1961. ac_fpublic ac_AntiCheatGetEnterVehicleSeat(playerid) return ACInfo[playerid][acEnterSeat];
  1962.  
  1963. ac_fpublic ac_AntiCheatGetVehicleID(playerid) return ACInfo[playerid][acVeh];
  1964.  
  1965. ac_fpublic ac_AntiCheatGetVehicleSeat(playerid) return ACInfo[playerid][acSeat];
  1966.  
  1967. ac_fpublic ac_AntiCheatGetWeapon(playerid) return ACInfo[playerid][acLastWeapon];
  1968.  
  1969. ac_fpublic ac_AntiCheatGetWeaponInSlot(playerid, slot) return ACInfo[playerid][acWeapon][slot];
  1970.  
  1971. ac_fpublic ac_AntiCheatGetAmmoInSlot(playerid, slot) return ACInfo[playerid][acAmmo][slot];
  1972.  
  1973. ac_fpublic ac_AntiCheatGetSpecialAction(playerid) return ACInfo[playerid][acSpecAct];
  1974.  
  1975. ac_fpublic ac_AntiCheatGetLastSpecialActio(playerid) return ACInfo[playerid][acLastSpecAct];
  1976.  
  1977. ac_fpublic ac_AntiCheatGetLastShotWeapon(playerid) return ACInfo[playerid][acLastShot];
  1978.  
  1979. ac_fpublic ac_AntiCheatGetLastPickup(playerid) return ACInfo[playerid][acLastPickup];
  1980.  
  1981. ac_fpublic ac_AntiCheatGetLastUpdateTime(playerid) return ACInfo[playerid][acUpdateTick];
  1982.  
  1983. ac_fpublic ac_AntiCheatGetLastReloadTime(playerid) return ACInfo[playerid][acReloadTick];
  1984.  
  1985. ac_fpublic ac_AntiCheatGetLastEnteredVehTi(playerid) return ACInfo[playerid][acEnterVehTick];
  1986.  
  1987. ac_fpublic ac_AntiCheatGetLastShotTime(playerid) return ACInfo[playerid][acShotTick];
  1988.  
  1989. ac_fpublic ac_AntiCheatGetLastSpawnTime(playerid) return ACInfo[playerid][acSpawnTick];
  1990.  
  1991. ac_fpublic ac_AntiCheatIntEnterExitsIsEnab(playerid) return ACInfo[playerid][acIntEnterExits];
  1992.  
  1993. ac_fpublic ac_AntiCheatStuntBonusIsEnabled(playerid) return ACInfo[playerid][acStuntBonus];
  1994.  
  1995. ac_fpublic ac_AntiCheatIsInModShop(playerid) return ACInfo[playerid][acModShop];
  1996.  
  1997. ac_fpublic ac_AntiCheatIsInSpectate(playerid) return ACInfo[playerid][acSpec];
  1998.  
  1999. ac_fpublic ac_AntiCheatIsFrozen(playerid) return !ACInfo[playerid][acUnFrozen];
  2000.  
  2001. ac_fpublic ac_AntiCheatIsDead(playerid) return ACInfo[playerid][acDead];
  2002.  
  2003. ac_fpublic ac_AntiCheatIsConnected(playerid) return ACInfo[playerid][acOnline];
  2004.  
  2005. ac_fpublic ac_AntiCheatKickWithDesync(playerid, code)
  2006. {
  2007.     if(ACInfo[playerid][acKicked] > 0) return -1;
  2008.     new ac_gpp = GetPlayerPing(playerid) + 150;
  2009.     ACInfo[playerid][acKickTimerID] = SetTimerEx("ac_KickTimer", (ac_gpp > AC_MAX_PING ? AC_MAX_PING : ac_gpp), false, "i", playerid);
  2010.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  2011.     {
  2012.         if(code == 4) ACInfo[playerid][acKickVeh] = GetPlayerVehicleID(playerid);
  2013.         ACInfo[playerid][acKicked] = 2;
  2014.     }
  2015.     else ACInfo[playerid][acKicked] = 1;
  2016.     return 1;
  2017. }
  2018.  
  2019. ac_fpublic ac_AntiCheatIsKickedWithDesync(playerid) return ACInfo[playerid][acKicked];
  2020.  
  2021. ac_fpublic ac_AntiCheatGetVehicleDriver(vehicleid) return ACVehInfo[vehicleid][acDriver];
  2022.  
  2023. ac_fpublic ac_AntiCheatGetVehicleInterior(vehicleid) return ACVehInfo[vehicleid][acInt];
  2024.  
  2025. ac_fpublic ac_AntiCheatGetVehiclePaintjob(vehicleid) return ACVehInfo[vehicleid][acPaintJob];
  2026.  
  2027. ac_fpublic ac_AntiCheatGetVehicleSpeed(vehicleid) return ACVehInfo[vehicleid][acSpeed];
  2028.  
  2029. ac_fpublic ac_AntiCheatIsVehicleSpawned(vehicleid) return ACVehInfo[vehicleid][acSpawned];
  2030.  
  2031. ac_fpublic ac_AntiCheatGetNextDialog(playerid) return ACInfo[playerid][acNextDialog];
  2032.  
  2033. #endif
  2034.  
  2035. stock acc_AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2)
  2036. {
  2037.     new ac_vehicleid = AddStaticVehicle(modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2);
  2038.     if(ac_vehicleid != INVALID_VEHICLE_ID)
  2039.     {
  2040.         #if defined FILTERSCRIPT
  2041.             CallRemoteFunction("ac_AddStaticVehicle", "iffff", ac_vehicleid, spawn_x, spawn_y, spawn_z, z_angle);
  2042.         #else
  2043.             ac_AddStaticVehicle(ac_vehicleid, spawn_x, spawn_y, spawn_z, z_angle);
  2044.         #endif
  2045.     }
  2046.     return ac_vehicleid;
  2047. }
  2048.  
  2049. #if defined _ALS_AddStaticVehicle
  2050.     #undef AddStaticVehicle
  2051. #else
  2052.     #define _ALS_AddStaticVehicle
  2053. #endif
  2054. #define AddStaticVehicle acc_AddStaticVehicle
  2055.  
  2056. #if defined OnVehicleSirenStateChange
  2057.     stock acc_AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay, addsiren = 0)
  2058.     {
  2059.         new ac_vehicleid = AddStaticVehicleEx(modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2, respawn_delay, addsiren);
  2060. #else
  2061.     stock acc_AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay)
  2062.     {
  2063.         new ac_vehicleid = AddStaticVehicleEx(modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2, respawn_delay);
  2064. #endif
  2065.     if(ac_vehicleid != INVALID_VEHICLE_ID)
  2066.     {
  2067.         #if defined FILTERSCRIPT
  2068.             CallRemoteFunction("ac_AddStaticVehicle", "iffff", ac_vehicleid, spawn_x, spawn_y, spawn_z, z_angle);
  2069.         #else
  2070.             ac_AddStaticVehicle(ac_vehicleid, spawn_x, spawn_y, spawn_z, z_angle);
  2071.         #endif
  2072.     }
  2073.     return ac_vehicleid;
  2074. }
  2075.  
  2076. #if defined _ALS_AddStaticVehicleEx
  2077.     #undef AddStaticVehicleEx
  2078. #else
  2079.     #define _ALS_AddStaticVehicleEx
  2080. #endif
  2081. #define AddStaticVehicleEx acc_AddStaticVehicleEx
  2082.  
  2083. #if defined OnVehicleSirenStateChange
  2084.     stock acc_CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, addsiren = 0)
  2085.     {
  2086.         new ac_vehicleid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay, addsiren);
  2087. #else
  2088.     stock acc_CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay)
  2089.     {
  2090.         new ac_vehicleid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay);
  2091. #endif
  2092.     if(ac_vehicleid != INVALID_VEHICLE_ID && ac_vehicleid > 0)
  2093.     {
  2094.         #if defined FILTERSCRIPT
  2095.             CallRemoteFunction("ac_CreateVehicle", "iiffff", ac_vehicleid, vehicletype, x, y, z, rotation);
  2096.         #else
  2097.             ac_CreateVehicle(ac_vehicleid, vehicletype, x, y, z, rotation);
  2098.         #endif
  2099.     }
  2100.     return ac_vehicleid;
  2101. }
  2102.  
  2103. #if defined _ALS_CreateVehicle
  2104.     #undef CreateVehicle
  2105. #else
  2106.     #define _ALS_CreateVehicle
  2107. #endif
  2108. #define CreateVehicle acc_CreateVehicle
  2109.  
  2110. 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)
  2111. {
  2112.     new ac_classid = AddPlayerClass(modelid, spawn_x, spawn_y, spawn_z, z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2113.     #if defined FILTERSCRIPT
  2114.         CallRemoteFunction("ac_AddPlayerClass", "ifffiiiiii", ac_classid, spawn_x, spawn_y, spawn_z, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2115.     #else
  2116.         ac_AddPlayerClass(ac_classid, spawn_x, spawn_y, spawn_z, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2117.     #endif
  2118.     return ac_classid;
  2119. }
  2120.  
  2121. #if defined _ALS_AddPlayerClass
  2122.     #undef AddPlayerClass
  2123. #else
  2124.     #define _ALS_AddPlayerClass
  2125. #endif
  2126. #define AddPlayerClass acc_AddPlayerClass
  2127.  
  2128. 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)
  2129. {
  2130.     new ac_classid = AddPlayerClassEx(teamid, modelid, spawn_x, spawn_y, spawn_z, z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2131.     #if defined FILTERSCRIPT
  2132.         CallRemoteFunction("ac_AddPlayerClass", "ifffiiiiii", ac_classid, spawn_x, spawn_y, spawn_z, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2133.     #else
  2134.         ac_AddPlayerClass(ac_classid, spawn_x, spawn_y, spawn_z, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2135.     #endif
  2136.     return ac_classid;
  2137. }
  2138.  
  2139. #if defined _ALS_AddPlayerClassEx
  2140.     #undef AddPlayerClassEx
  2141. #else
  2142.     #define _ALS_AddPlayerClassEx
  2143. #endif
  2144. #define AddPlayerClassEx acc_AddPlayerClassEx
  2145.  
  2146. stock orig_SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
  2147.     return SetSpawnInfo(playerid, team, skin, x, y, z, rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2148.  
  2149. stock acc_SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
  2150. {
  2151.     #if defined FILTERSCRIPT
  2152.         return CallRemoteFunction("ac_SetSpawnInfo", "iiiffffiiiiii", playerid, team, skin, x, y, z, rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2153.     #else
  2154.         return ac_SetSpawnInfo(playerid, team, skin, x, y, z, rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  2155.     #endif
  2156. }
  2157.  
  2158. #if defined _ALS_SetSpawnInfo
  2159.     #undef SetSpawnInfo
  2160. #else
  2161.     #define _ALS_SetSpawnInfo
  2162. #endif
  2163. #define SetSpawnInfo acc_SetSpawnInfo
  2164.  
  2165. stock acc_AddStaticPickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0)
  2166. {
  2167.     new ac_pickupid = CreatePickup(model, type, X, Y, Z, virtualworld);
  2168.     if(ac_pickupid != -1)
  2169.     {
  2170.         #if defined FILTERSCRIPT
  2171.             return CallRemoteFunction("ac_AddStaticPickup", "iiifff", ac_pickupid, model, type, X, Y, Z);
  2172.         #else
  2173.             return ac_AddStaticPickup(ac_pickupid, model, type, X, Y, Z);
  2174.         #endif
  2175.     }
  2176.     return 0;
  2177. }
  2178.  
  2179. #if defined _ALS_AddStaticPickup
  2180.     #undef AddStaticPickup
  2181. #else
  2182.     #define _ALS_AddStaticPickup
  2183. #endif
  2184. #define AddStaticPickup acc_AddStaticPickup
  2185.  
  2186. stock acc_CreatePickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0)
  2187. {
  2188.     new ac_pickupid = CreatePickup(model, type, X, Y, Z, virtualworld);
  2189.     if(ac_pickupid != -1)
  2190.     {
  2191.         #if defined FILTERSCRIPT
  2192.             CallRemoteFunction("ac_CreatePickup", "iiifff", ac_pickupid, model, type, X, Y, Z);
  2193.         #else
  2194.             ac_CreatePickup(ac_pickupid, model, type, X, Y, Z);
  2195.         #endif
  2196.     }
  2197.     return ac_pickupid;
  2198. }
  2199.  
  2200. #if defined _ALS_CreatePickup
  2201.     #undef CreatePickup
  2202. #else
  2203.     #define _ALS_CreatePickup
  2204. #endif
  2205. #define CreatePickup acc_CreatePickup
  2206.  
  2207. #if defined CreateDynamicPickup
  2208.     #if defined STREAMER_ENABLE_TAGS
  2209.         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)
  2210.         {
  2211.             new STREAMER_TAG_PICKUP:ac_pickupid = CreateDynamicPickup(modelid, type, x, y, z, worldid, interiorid, playerid, streamdistance, areaid, priority);
  2212.     #else
  2213.         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)
  2214.         {
  2215.             new ac_pickupid = CreateDynamicPickup(modelid, type, x, y, z, worldid, interiorid, playerid, streamdistance, areaid, priority);
  2216.     #endif
  2217.         if(_:ac_pickupid > 0)
  2218.         {
  2219.             #if defined FILTERSCRIPT
  2220.                 CallRemoteFunction("ac_CreateDynamicPickup", "iii", ac_pickupid, modelid, type);
  2221.             #else
  2222.                 #if AC_USE_PICKUP_WEAPONS\
  2223.                     && defined Streamer_SetIntData
  2224.                     ac_CreateDynamicPickup(ac_pickupid, modelid, type);
  2225.                 #endif
  2226.             #endif
  2227.         }
  2228.         return ac_pickupid;
  2229.     }
  2230.  
  2231.     #if defined _ALS_CreateDynamicPickup
  2232.         #undef CreateDynamicPickup
  2233.     #else
  2234.         #define _ALS_CreateDynamicPickup
  2235.     #endif
  2236.     #define CreateDynamicPickup acc_CreateDynamicPickup
  2237. #endif
  2238.  
  2239. #if defined CreateDynamicPickupEx
  2240.     #if defined STREAMER_ENABLE_TAGS
  2241.         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)
  2242.         {
  2243.             new STREAMER_TAG_PICKUP:ac_pickupid = CreateDynamicPickupEx(modelid, type, x, y, z, streamdistance, worlds, interiors, players, areas, priority, maxworlds, maxinteriors, maxplayers, maxareas);
  2244.     #else
  2245.             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)
  2246.         {
  2247.             new ac_pickupid = CreateDynamicPickupEx(modelid, type, x, y, z, streamdistance, worlds, interiors, players, areas, priority, maxworlds, maxinteriors, maxplayers, maxareas);
  2248.     #endif
  2249.         if(_:ac_pickupid > 0)
  2250.         {
  2251.             #if defined FILTERSCRIPT
  2252.                 CallRemoteFunction("ac_CreateDynamicPickup", "iii", ac_pickupid, modelid, type);
  2253.             #else
  2254.                 #if AC_USE_PICKUP_WEAPONS\
  2255.                     && defined Streamer_SetIntData
  2256.                     ac_CreateDynamicPickup(ac_pickupid, modelid, type);
  2257.                 #endif
  2258.             #endif
  2259.         }
  2260.         return ac_pickupid;
  2261.     }
  2262.  
  2263.     #if defined _ALS_CreateDynamicPickupEx
  2264.         #undef CreateDynamicPickupEx
  2265.     #else
  2266.         #define _ALS_CreateDynamicPickupEx
  2267.     #endif
  2268.     #define CreateDynamicPickupEx acc_CreateDynamicPickupEx
  2269. #endif
  2270.  
  2271. stock acc_DestroyVehicle(vehicleid)
  2272. {
  2273.     #if defined FILTERSCRIPT
  2274.         return CallRemoteFunction("ac_DestroyVehicle", "i", vehicleid);
  2275.     #else
  2276.         return ac_DestroyVehicle(vehicleid);
  2277.     #endif
  2278. }
  2279.  
  2280. #if defined _ALS_DestroyVehicle
  2281.     #undef DestroyVehicle
  2282. #else
  2283.     #define _ALS_DestroyVehicle
  2284. #endif
  2285. #define DestroyVehicle acc_DestroyVehicle
  2286.  
  2287. stock acc_DestroyPickup(pickup)
  2288. {
  2289.     #if defined FILTERSCRIPT
  2290.         return CallRemoteFunction("ac_DestroyPickup", "i", pickup);
  2291.     #else
  2292.         return ac_DestroyPickup(pickup);
  2293.     #endif
  2294. }
  2295.  
  2296. #if defined _ALS_DestroyPickup
  2297.     #undef DestroyPickup
  2298. #else
  2299.     #define _ALS_DestroyPickup
  2300. #endif
  2301. #define DestroyPickup acc_DestroyPickup
  2302.  
  2303. #if defined DestroyDynamicPickup
  2304.     #if defined STREAMER_ENABLE_TAGS
  2305.         stock acc_DestroyDynamicPickup(STREAMER_TAG_PICKUP:pickupid)
  2306.     #else
  2307.         stock acc_DestroyDynamicPickup(pickupid)
  2308.     #endif
  2309.     {
  2310.         #if defined FILTERSCRIPT
  2311.             return CallRemoteFunction("ac_DestroyDynamicPickup", "i", pickupid);
  2312.         #else
  2313.             return ac_DestroyDynamicPickup(pickupid);
  2314.         #endif
  2315.     }
  2316.  
  2317.     #if defined _ALS_DestroyDynamicPickup
  2318.         #undef DestroyDynamicPickup
  2319.     #else
  2320.         #define _ALS_DestroyDynamicPickup
  2321.     #endif
  2322.     #define DestroyDynamicPickup acc_DestroyDynamicPickup
  2323. #endif
  2324.  
  2325. stock acc_DisableInteriorEnterExits()
  2326. {
  2327.     #if defined FILTERSCRIPT
  2328.         return CallRemoteFunction("ac_DisableInteriorEnterExits", "");
  2329.     #else
  2330.         return ac_DisableInteriorEnterExits();
  2331.     #endif
  2332. }
  2333.  
  2334. #if defined _ALS_DisableInteriorEnterExits
  2335.     #undef DisableInteriorEnterExits
  2336. #else
  2337.     #define _ALS_DisableInteriorEnterExits
  2338. #endif
  2339. #define DisableInteriorEnterExits acc_DisableInteriorEnterExits
  2340.  
  2341. stock acc_UsePlayerPedAnims()
  2342. {
  2343.     #if defined FILTERSCRIPT
  2344.         return CallRemoteFunction("ac_UsePlayerPedAnims", "");
  2345.     #else
  2346.         return ac_UsePlayerPedAnims();
  2347.     #endif
  2348. }
  2349.  
  2350. #if defined _ALS_UsePlayerPedAnims
  2351.     #undef UsePlayerPedAnims
  2352. #else
  2353.     #define _ALS_UsePlayerPedAnims
  2354. #endif
  2355. #define UsePlayerPedAnims acc_UsePlayerPedAnims
  2356.  
  2357. #if defined EnableVehicleFriendlyFire
  2358.     stock acc_EnableVehicleFriendlyFire()
  2359.     {
  2360.         #if defined FILTERSCRIPT
  2361.             return CallRemoteFunction("ac_EnableVehicleFriendlyFire", "");
  2362.         #else
  2363.             return ac_EnableVehicleFriendlyFire();
  2364.         #endif
  2365.     }
  2366.  
  2367.     #if defined _ALS_EnableVehicleFriendlyFire
  2368.         #undef EnableVehicleFriendlyFire
  2369.     #else
  2370.         #define _ALS_EnableVehicleFriendlyFire
  2371.     #endif
  2372.     #define EnableVehicleFriendlyFire acc_EnableVehicleFriendlyFire
  2373. #endif
  2374.  
  2375. stock acc_EnableStuntBonusForAll(enable)
  2376. {
  2377.     #if defined FILTERSCRIPT
  2378.         return CallRemoteFunction("ac_EnableStuntBonusForAll", "i", enable);
  2379.     #else
  2380.         return ac_EnableStuntBonusForAll(enable);
  2381.     #endif
  2382. }
  2383.  
  2384. #if defined _ALS_EnableStuntBonusForAll
  2385.     #undef EnableStuntBonusForAll
  2386. #else
  2387.     #define _ALS_EnableStuntBonusForAll
  2388. #endif
  2389. #define EnableStuntBonusForAll acc_EnableStuntBonusForAll
  2390.  
  2391. stock acc_EnableStuntBonusForPlayer(playerid, enable)
  2392. {
  2393.     #if defined FILTERSCRIPT
  2394.         return CallRemoteFunction("ac_EnableStuntBonusForPlayer", "ii", playerid, enable);
  2395.     #else
  2396.         return ac_EnableStuntBonusForPlayer(playerid, enable);
  2397.     #endif
  2398. }
  2399.  
  2400. #if defined _ALS_EnableStuntBonusForPlayer
  2401.     #undef EnableStuntBonusForPlayer
  2402. #else
  2403.     #define _ALS_EnableStuntBonusForPlayer
  2404. #endif
  2405. #define EnableStuntBonusForPlayer acc_EnableStuntBonusForPlayer
  2406.  
  2407. #if defined _inc_y_dialog || defined _INC_y_dialog
  2408.     stock ac_Dialog_Show(playerid, style, string:title[], string:caption[], string:button1[], string:button2[] = "", dialog = -1)
  2409.     {
  2410.         if(!(0 <= playerid < MAX_PLAYERS))
  2411.         {
  2412.             #if defined FILTERSCRIPT
  2413.                 CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, dialog);
  2414.             #else
  2415.                 ac_ShowPlayerDialog(playerid, dialog);
  2416.             #endif
  2417.         }
  2418.         return Dialog_Show(playerid, style, title, caption, button1, button2, dialog);
  2419.     }
  2420.  
  2421.     #if defined _ALS_Dialog_Show
  2422.         #undef Dialog_Show
  2423.     #else
  2424.         #define _ALS_Dialog_Show
  2425.     #endif
  2426.     #define Dialog_Show ac_Dialog_Show
  2427. #endif
  2428.  
  2429. stock orig_ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]) return ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
  2430.  
  2431. stock acc_ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
  2432. {
  2433.     if(ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2))
  2434.     {
  2435.         #if defined FILTERSCRIPT
  2436.             return CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, dialogid);
  2437.         #else
  2438.             return ac_ShowPlayerDialog(playerid, dialogid);
  2439.         #endif
  2440.     }
  2441.     return 0;
  2442. }
  2443.  
  2444. #if defined _ALS_ShowPlayerDialog
  2445.     #undef ShowPlayerDialog
  2446. #else
  2447.     #define _ALS_ShowPlayerDialog
  2448. #endif
  2449. #define ShowPlayerDialog acc_ShowPlayerDialog
  2450.  
  2451. stock orig_TogglePlayerControllable(playerid, toggle) return TogglePlayerControllable(playerid, toggle);
  2452.  
  2453. stock acc_TogglePlayerControllable(playerid, toggle)
  2454. {
  2455.     #if defined FILTERSCRIPT
  2456.         return CallRemoteFunction("ac_TogglePlayerControllable", "ii", playerid, toggle);
  2457.     #else
  2458.         return ac_TogglePlayerControllable(playerid, toggle);
  2459.     #endif
  2460. }
  2461.  
  2462. #if defined _ALS_TogglePlayerControllable
  2463.     #undef TogglePlayerControllable
  2464. #else
  2465.     #define _ALS_TogglePlayerControllable
  2466. #endif
  2467. #define TogglePlayerControllable acc_TogglePlayerControllable
  2468.  
  2469. stock orig_TogglePlayerSpectating(playerid, toggle) return TogglePlayerSpectating(playerid, toggle);
  2470.  
  2471. stock acc_TogglePlayerSpectating(playerid, toggle)
  2472. {
  2473.     #if defined FILTERSCRIPT
  2474.         return CallRemoteFunction("ac_TogglePlayerSpectating", "ii", playerid, toggle);
  2475.     #else
  2476.         return ac_TogglePlayerSpectating(playerid, toggle);
  2477.     #endif
  2478. }
  2479.  
  2480. #if defined _ALS_TogglePlayerSpectating
  2481.     #undef TogglePlayerSpectating
  2482. #else
  2483.     #define _ALS_TogglePlayerSpectating
  2484. #endif
  2485. #define TogglePlayerSpectating acc_TogglePlayerSpectating
  2486.  
  2487. stock orig_SpawnPlayer(playerid) return SpawnPlayer(playerid);
  2488.  
  2489. stock acc_SpawnPlayer(playerid)
  2490. {
  2491.     #if defined FILTERSCRIPT
  2492.         return CallRemoteFunction("ac_SpawnPlayer", "i", playerid);
  2493.     #else
  2494.         return ac_SpawnPlayer(playerid);
  2495.     #endif
  2496. }
  2497.  
  2498. #if defined _ALS_SpawnPlayer
  2499.     #undef SpawnPlayer
  2500. #else
  2501.     #define _ALS_SpawnPlayer
  2502. #endif
  2503. #define SpawnPlayer acc_SpawnPlayer
  2504.  
  2505. stock orig_SetPlayerHealth(playerid, Float:health) return SetPlayerHealth(playerid, health);
  2506.  
  2507. stock acc_SetPlayerHealth(playerid, Float:health)
  2508. {
  2509.     #if defined FILTERSCRIPT
  2510.         return CallRemoteFunction("ac_SetPlayerHealth", "if", playerid, health);
  2511.     #else
  2512.         return ac_SetPlayerHealth(playerid, health);
  2513.     #endif
  2514. }
  2515.  
  2516. #if defined _ALS_SetPlayerHealth
  2517.     #undef SetPlayerHealth
  2518. #else
  2519.     #define _ALS_SetPlayerHealth
  2520. #endif
  2521. #define SetPlayerHealth acc_SetPlayerHealth
  2522.  
  2523. stock orig_SetPlayerArmour(playerid, Float:armour) return SetPlayerArmour(playerid, armour);
  2524.  
  2525. stock acc_SetPlayerArmour(playerid, Float:armour)
  2526. {
  2527.     #if defined FILTERSCRIPT
  2528.         return CallRemoteFunction("ac_SetPlayerArmour", "if", playerid, armour);
  2529.     #else
  2530.         return ac_SetPlayerArmour(playerid, armour);
  2531.     #endif
  2532. }
  2533.  
  2534. #if defined _ALS_SetPlayerArmour
  2535.     #undef SetPlayerArmour
  2536. #else
  2537.     #define _ALS_SetPlayerArmour
  2538. #endif
  2539. #define SetPlayerArmour acc_SetPlayerArmour
  2540.  
  2541. stock orig_GivePlayerWeapon(playerid, weaponid, ammo) return GivePlayerWeapon(playerid, weaponid, ammo);
  2542.  
  2543. stock acc_GivePlayerWeapon(playerid, weaponid, ammo)
  2544. {
  2545.     if(!(0 <= playerid < MAX_PLAYERS)) return 0;
  2546.     #if defined FILTERSCRIPT
  2547.         return CallRemoteFunction("ac_GivePlayerWeapon", "iid", playerid, weaponid, ammo);
  2548.     #else
  2549.         return ac_GivePlayerWeapon(playerid, weaponid, ammo);
  2550.     #endif
  2551. }
  2552.  
  2553. #if defined _ALS_GivePlayerWeapon
  2554.     #undef GivePlayerWeapon
  2555. #else
  2556.     #define _ALS_GivePlayerWeapon
  2557. #endif
  2558. #define GivePlayerWeapon acc_GivePlayerWeapon
  2559.  
  2560. stock orig_SetPlayerAmmo(playerid, weaponslot, ammo) return SetPlayerAmmo(playerid, weaponslot, ammo);
  2561.  
  2562. stock acc_SetPlayerAmmo(playerid, weaponslot, ammo)
  2563. {
  2564.     if(!(0 <= playerid < MAX_PLAYERS)) return 0;
  2565.     #if defined FILTERSCRIPT
  2566.         return CallRemoteFunction("ac_SetPlayerAmmo", "iid", playerid, weaponslot, ammo);
  2567.     #else
  2568.         return ac_SetPlayerAmmo(playerid, weaponslot, ammo);
  2569.     #endif
  2570. }
  2571.  
  2572. #if defined _ALS_SetPlayerAmmo
  2573.     #undef SetPlayerAmmo
  2574. #else
  2575.     #define _ALS_SetPlayerAmmo
  2576. #endif
  2577. #define SetPlayerAmmo acc_SetPlayerAmmo
  2578.  
  2579. stock orig_SetPlayerArmedWeapon(playerid, weaponid) return SetPlayerArmedWeapon(playerid, weaponid);
  2580.  
  2581. stock acc_SetPlayerArmedWeapon(playerid, weaponid)
  2582. {
  2583.     #if defined FILTERSCRIPT
  2584.         return CallRemoteFunction("ac_SetPlayerArmedWeapon", "ii", playerid, weaponid);
  2585.     #else
  2586.         return ac_SetPlayerArmedWeapon(playerid, weaponid);
  2587.     #endif
  2588. }
  2589.  
  2590. #if defined _ALS_SetPlayerArmedWeapon
  2591.     #undef SetPlayerArmedWeapon
  2592. #else
  2593.     #define _ALS_SetPlayerArmedWeapon
  2594. #endif
  2595. #define SetPlayerArmedWeapon acc_SetPlayerArmedWeapon
  2596.  
  2597. stock orig_ResetPlayerWeapons(playerid) return ResetPlayerWeapons(playerid);
  2598.  
  2599. stock acc_ResetPlayerWeapons(playerid)
  2600. {
  2601.     #if defined FILTERSCRIPT
  2602.         return CallRemoteFunction("ac_ResetPlayerWeapons", "i", playerid);
  2603.     #else
  2604.         return ac_ResetPlayerWeapons(playerid);
  2605.     #endif
  2606. }
  2607.  
  2608. #if defined _ALS_ResetPlayerWeapons
  2609.     #undef ResetPlayerWeapons
  2610. #else
  2611.     #define _ALS_ResetPlayerWeapons
  2612. #endif
  2613. #define ResetPlayerWeapons acc_ResetPlayerWeapons
  2614.  
  2615. stock orig_GivePlayerMoney(playerid, money) return GivePlayerMoney(playerid, money);
  2616.  
  2617. stock acc_GivePlayerMoney(playerid, money)
  2618. {
  2619.     #if defined FILTERSCRIPT
  2620.         return CallRemoteFunction("ac_GivePlayerMoney", "id", playerid, money);
  2621.     #else
  2622.         return ac_GivePlayerMoney(playerid, money);
  2623.     #endif
  2624. }
  2625.  
  2626. #if defined _ALS_GivePlayerMoney
  2627.     #undef GivePlayerMoney
  2628. #else
  2629.     #define _ALS_GivePlayerMoney
  2630. #endif
  2631. #define GivePlayerMoney acc_GivePlayerMoney
  2632.  
  2633. stock orig_ResetPlayerMoney(playerid) return ResetPlayerMoney(playerid);
  2634.  
  2635. stock acc_ResetPlayerMoney(playerid)
  2636. {
  2637.     #if defined FILTERSCRIPT
  2638.         return CallRemoteFunction("ac_ResetPlayerMoney", "i", playerid);
  2639.     #else
  2640.         return ac_ResetPlayerMoney(playerid);
  2641.     #endif
  2642. }
  2643.  
  2644. #if defined _ALS_ResetPlayerMoney
  2645.     #undef ResetPlayerMoney
  2646. #else
  2647.     #define _ALS_ResetPlayerMoney
  2648. #endif
  2649. #define ResetPlayerMoney acc_ResetPlayerMoney
  2650.  
  2651. stock orig_GetPlayerMoney(playerid) return GetPlayerMoney(playerid);
  2652.  
  2653. stock acc_GetPlayerMoney(playerid)
  2654. {
  2655.     if(!IsPlayerConnected(playerid)) return 0;
  2656.     #if defined FILTERSCRIPT
  2657.         return CallRemoteFunction("ac_GetPlayerMoney", "i", playerid);
  2658.     #else
  2659.         return ac_GetPlayerMoney(playerid);
  2660.     #endif
  2661. }
  2662.  
  2663. #if defined _ALS_GetPlayerMoney
  2664.     #undef GetPlayerMoney
  2665. #else
  2666.     #define _ALS_GetPlayerMoney
  2667. #endif
  2668. #define GetPlayerMoney acc_GetPlayerMoney
  2669.  
  2670. stock orig_SetPlayerSpecialAction(playerid, actionid) return SetPlayerSpecialAction(playerid, actionid);
  2671.  
  2672. stock acc_SetPlayerSpecialAction(playerid, actionid)
  2673. {
  2674.     #if defined FILTERSCRIPT
  2675.         return CallRemoteFunction("ac_SetPlayerSpecialAction", "ii", playerid, actionid);
  2676.     #else
  2677.         return ac_SetPlayerSpecialAction(playerid, actionid);
  2678.     #endif
  2679. }
  2680.  
  2681. #if defined _ALS_SetPlayerSpecialAction
  2682.     #undef SetPlayerSpecialAction
  2683. #else
  2684.     #define _ALS_SetPlayerSpecialAction
  2685. #endif
  2686. #define SetPlayerSpecialAction acc_SetPlayerSpecialAction
  2687.  
  2688. stock orig_SetPlayerInterior(playerid, interiorid) return SetPlayerInterior(playerid, interiorid);
  2689.  
  2690. stock acc_SetPlayerInterior(playerid, interiorid)
  2691. {
  2692.     #if defined FILTERSCRIPT
  2693.         return CallRemoteFunction("ac_SetPlayerInterior", "ii", playerid, interiorid);
  2694.     #else
  2695.         return ac_SetPlayerInterior(playerid, interiorid);
  2696.     #endif
  2697. }
  2698.  
  2699. #if defined _ALS_SetPlayerInterior
  2700.     #undef SetPlayerInterior
  2701. #else
  2702.     #define _ALS_SetPlayerInterior
  2703. #endif
  2704. #define SetPlayerInterior acc_SetPlayerInterior
  2705.  
  2706. stock orig_SetPlayerPos(playerid, Float:x, Float:y, Float:z) return SetPlayerPos(playerid, x, y, z);
  2707.  
  2708. stock acc_SetPlayerPos(playerid, Float:x, Float:y, Float:z)
  2709. {
  2710.     #if defined FILTERSCRIPT
  2711.         return CallRemoteFunction("ac_SetPlayerPos", "ifff", playerid, x, y, z);
  2712.     #else
  2713.         return ac_SetPlayerPos(playerid, x, y, z);
  2714.     #endif
  2715. }
  2716.  
  2717. #if defined _ALS_SetPlayerPos
  2718.     #undef SetPlayerPos
  2719. #else
  2720.     #define _ALS_SetPlayerPos
  2721. #endif
  2722. #define SetPlayerPos acc_SetPlayerPos
  2723.  
  2724. stock orig_SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z) return SetPlayerPosFindZ(playerid, x, y, z);
  2725.  
  2726. stock acc_SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z)
  2727. {
  2728.     #if defined FILTERSCRIPT
  2729.         return CallRemoteFunction("ac_SetPlayerPosFindZ", "ifff", playerid, x, y, z);
  2730.     #else
  2731.         return ac_SetPlayerPosFindZ(playerid, x, y, z);
  2732.     #endif
  2733. }
  2734.  
  2735. #if defined _ALS_SetPlayerPosFindZ
  2736.     #undef SetPlayerPosFindZ
  2737. #else
  2738.     #define _ALS_SetPlayerPosFindZ
  2739. #endif
  2740. #define SetPlayerPosFindZ acc_SetPlayerPosFindZ
  2741.  
  2742. stock orig_SetPlayerVelocity(playerid, Float:X, Float:Y, Float:Z) return SetPlayerVelocity(playerid, X, Y, Z);
  2743.  
  2744. stock acc_SetPlayerVelocity(playerid, Float:X, Float:Y, Float:Z)
  2745. {
  2746.     #if defined FILTERSCRIPT
  2747.         return CallRemoteFunction("ac_SetPlayerVelocity", "ifff", playerid, X, Y, Z);
  2748.     #else
  2749.         return ac_SetPlayerVelocity(playerid, X, Y, Z);
  2750.     #endif
  2751. }
  2752.  
  2753. #if defined _ALS_SetPlayerVelocity
  2754.     #undef SetPlayerVelocity
  2755. #else
  2756.     #define _ALS_SetPlayerVelocity
  2757. #endif
  2758. #define SetPlayerVelocity acc_SetPlayerVelocity
  2759.  
  2760. stock orig_PutPlayerInVehicle(playerid, vehicleid, seatid) return PutPlayerInVehicle(playerid, vehicleid, seatid);
  2761.  
  2762. stock acc_PutPlayerInVehicle(playerid, vehicleid, seatid)
  2763. {
  2764.     #if defined FILTERSCRIPT
  2765.         return CallRemoteFunction("ac_PutPlayerInVehicle", "iii", playerid, vehicleid, seatid);
  2766.     #else
  2767.         return ac_PutPlayerInVehicle(playerid, vehicleid, seatid);
  2768.     #endif
  2769. }
  2770.  
  2771. #if defined _ALS_PutPlayerInVehicle
  2772.     #undef PutPlayerInVehicle
  2773. #else
  2774.     #define _ALS_PutPlayerInVehicle
  2775. #endif
  2776. #define PutPlayerInVehicle acc_PutPlayerInVehicle
  2777.  
  2778. stock orig_RemovePlayerFromVehicle(playerid) return RemovePlayerFromVehicle(playerid);
  2779.  
  2780. stock acc_RemovePlayerFromVehicle(playerid)
  2781. {
  2782.     #if defined FILTERSCRIPT
  2783.         return CallRemoteFunction("ac_RemovePlayerFromVehicle", "i", playerid);
  2784.     #else
  2785.         return ac_RemovePlayerFromVehicle(playerid);
  2786.     #endif
  2787. }
  2788.  
  2789. #if defined _ALS_RemovePlayerFromVehicle
  2790.     #undef RemovePlayerFromVehicle
  2791. #else
  2792.     #define _ALS_RemovePlayerFromVehicle
  2793. #endif
  2794. #define RemovePlayerFromVehicle acc_RemovePlayerFromVehicle
  2795.  
  2796. stock orig_SetVehiclePos(vehicleid, Float:x, Float:y, Float:z) return SetVehiclePos(vehicleid, x, y, z);
  2797.  
  2798. stock acc_SetVehiclePos(vehicleid, Float:x, Float:y, Float:z)
  2799. {
  2800.     #if defined FILTERSCRIPT
  2801.         return CallRemoteFunction("ac_SetVehiclePos", "ifff", vehicleid, x, y, z);
  2802.     #else
  2803.         return ac_SetVehiclePos(vehicleid, x, y, z);
  2804.     #endif
  2805. }
  2806.  
  2807. #if defined _ALS_SetVehiclePos
  2808.     #undef SetVehiclePos
  2809. #else
  2810.     #define _ALS_SetVehiclePos
  2811. #endif
  2812. #define SetVehiclePos acc_SetVehiclePos
  2813.  
  2814. stock orig_SetVehicleVelocity(vehicleid, Float:X, Float:Y, Float:Z) return SetVehicleVelocity(vehicleid, X, Y, Z);
  2815.  
  2816. stock acc_SetVehicleVelocity(vehicleid, Float:X, Float:Y, Float:Z)
  2817. {
  2818.     #if defined FILTERSCRIPT
  2819.         return CallRemoteFunction("ac_SetVehicleVelocity", "ifff", vehicleid, X, Y, Z);
  2820.     #else
  2821.         return ac_SetVehicleVelocity(vehicleid, X, Y, Z);
  2822.     #endif
  2823. }
  2824.  
  2825. #if defined _ALS_SetVehicleVelocity
  2826.     #undef SetVehicleVelocity
  2827. #else
  2828.     #define _ALS_SetVehicleVelocity
  2829. #endif
  2830. #define SetVehicleVelocity acc_SetVehicleVelocity
  2831.  
  2832. stock orig_SetVehicleAngularVelocity(vehicleid, Float:X, Float:Y, Float:Z) return SetVehicleAngularVelocity(vehicleid, X, Y, Z);
  2833.  
  2834. stock acc_SetVehicleAngularVelocity(vehicleid, Float:X, Float:Y, Float:Z)
  2835. {
  2836.     #if defined FILTERSCRIPT
  2837.         return CallRemoteFunction("ac_SetVehicleAngularVelocity", "ifff", vehicleid, X, Y, Z);
  2838.     #else
  2839.         return ac_SetVehicleAngularVelocity(vehicleid, X, Y, Z);
  2840.     #endif
  2841. }
  2842.  
  2843. #if defined _ALS_SetVehicleAngularVelocity
  2844.     #undef SetVehicleAngularVelocity
  2845. #else
  2846.     #define _ALS_SetVehicleAngularVelocity
  2847. #endif
  2848. #define SetVehicleAngularVelocity acc_SetVehicleAngularVelocity
  2849.  
  2850. stock orig_LinkVehicleToInterior(vehicleid, interiorid) return LinkVehicleToInterior(vehicleid, interiorid);
  2851.  
  2852. stock acc_LinkVehicleToInterior(vehicleid, interiorid)
  2853. {
  2854.     #if defined FILTERSCRIPT
  2855.         return CallRemoteFunction("ac_LinkVehicleToInterior", "ii", vehicleid, interiorid);
  2856.     #else
  2857.         return ac_LinkVehicleToInterior(vehicleid, interiorid);
  2858.     #endif
  2859. }
  2860.  
  2861. #if defined _ALS_LinkVehicleToInterior
  2862.     #undef LinkVehicleToInterior
  2863. #else
  2864.     #define _ALS_LinkVehicleToInterior
  2865. #endif
  2866. #define LinkVehicleToInterior acc_LinkVehicleToInterior
  2867.  
  2868. stock orig_ChangeVehiclePaintjob(vehicleid, paintjobid) return ChangeVehiclePaintjob(vehicleid, paintjobid);
  2869.  
  2870. stock acc_ChangeVehiclePaintjob(vehicleid, paintjobid)
  2871. {
  2872.     if(GetVehicleModel(vehicleid) <= 0) return 1;
  2873.     #if defined FILTERSCRIPT
  2874.         return CallRemoteFunction("ac_ChangeVehiclePaintjob", "ii", vehicleid, paintjobid);
  2875.     #else
  2876.         return ac_ChangeVehiclePaintjob(vehicleid, paintjobid);
  2877.     #endif
  2878. }
  2879.  
  2880. #if defined _ALS_ChangeVehiclePaintjob
  2881.     #undef ChangeVehiclePaintjob
  2882. #else
  2883.     #define _ALS_ChangeVehiclePaintjob
  2884. #endif
  2885. #define ChangeVehiclePaintjob acc_ChangeVehiclePaintjob
  2886.  
  2887. stock orig_SetVehicleHealth(vehicleid, Float:health) return SetVehicleHealth(vehicleid, health);
  2888.  
  2889. stock acc_SetVehicleHealth(vehicleid, Float:health)
  2890. {
  2891.     if(health < 0.0) health = 0.0;
  2892.     #if defined FILTERSCRIPT
  2893.         return CallRemoteFunction("ac_SetVehicleHealth", "if", vehicleid, health);
  2894.     #else
  2895.         return ac_SetVehicleHealth(vehicleid, health);
  2896.     #endif
  2897. }
  2898.  
  2899. #if defined _ALS_SetVehicleHealth
  2900.     #undef SetVehicleHealth
  2901. #else
  2902.     #define _ALS_SetVehicleHealth
  2903. #endif
  2904. #define SetVehicleHealth acc_SetVehicleHealth
  2905.  
  2906. stock orig_RepairVehicle(vehicleid) return RepairVehicle(vehicleid);
  2907.  
  2908. stock acc_RepairVehicle(vehicleid)
  2909. {
  2910.     #if defined FILTERSCRIPT
  2911.         return CallRemoteFunction("ac_RepairVehicle", "i", vehicleid);
  2912.     #else
  2913.         return ac_RepairVehicle(vehicleid);
  2914.     #endif
  2915. }
  2916.  
  2917. #if defined _ALS_RepairVehicle
  2918.     #undef RepairVehicle
  2919. #else
  2920.     #define _ALS_RepairVehicle
  2921. #endif
  2922. #define RepairVehicle acc_RepairVehicle
  2923.  
  2924. stock orig_UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires) return UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
  2925.  
  2926. stock acc_UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires)
  2927. {
  2928.     #if defined FILTERSCRIPT
  2929.         return CallRemoteFunction("ac_UpdateVehicleDamageStatus", "iiiii", vehicleid, panels, doors, lights, tires);
  2930.     #else
  2931.         return ac_UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
  2932.     #endif
  2933. }
  2934.  
  2935. #if defined _ALS_UpdateVehicleDamageStatus
  2936.     #undef UpdateVehicleDamageStatus
  2937. #else
  2938.     #define _ALS_UpdateVehicleDamageStatus
  2939. #endif
  2940. #define UpdateVehicleDamageStatus acc_UpdateVehicleDamageStatus
  2941.  
  2942. stock orig_SetVehicleToRespawn(vehicleid) return SetVehicleToRespawn(vehicleid);
  2943.  
  2944. stock acc_SetVehicleToRespawn(vehicleid)
  2945. {
  2946.     if(GetVehicleModel(vehicleid) <= 0) return 0;
  2947.     #if defined FILTERSCRIPT
  2948.         return CallRemoteFunction("ac_SetVehicleToRespawn", "i", vehicleid);
  2949.     #else
  2950.         return ac_SetVehicleToRespawn(vehicleid);
  2951.     #endif
  2952. }
  2953.  
  2954. #if defined _ALS_SetVehicleToRespawn
  2955.     #undef SetVehicleToRespawn
  2956. #else
  2957.     #define _ALS_SetVehicleToRespawn
  2958. #endif
  2959. #define SetVehicleToRespawn acc_SetVehicleToRespawn
  2960.  
  2961. stock EnableAntiCheat(code, enable)
  2962. {
  2963.     #if defined FILTERSCRIPT
  2964.         return CallRemoteFunction("ac_EnableAntiCheat", "ii", code, enable);
  2965.     #else
  2966.         return ac_EnableAntiCheat(code, enable);
  2967.     #endif
  2968. }
  2969.  
  2970. stock EnableAntiNOP(nopcode, enable)
  2971. {
  2972.     #if defined FILTERSCRIPT
  2973.         return CallRemoteFunction("ac_EnableAntiNOP", "ii", nopcode, enable);
  2974.     #else
  2975.         return ac_EnableAntiNOP(nopcode, enable);
  2976.     #endif
  2977. }
  2978.  
  2979. stock EnableAntiCheatForPlayer(playerid, code, enable)
  2980. {
  2981.     if(!IsPlayerConnected(playerid)) return 0;
  2982.     #if defined FILTERSCRIPT
  2983.         return CallRemoteFunction("ac_EnableAntiCheatForPlayer", "iii", playerid, code, enable);
  2984.     #else
  2985.         return ac_EnableAntiCheatForPlayer(playerid, code, enable);
  2986.     #endif
  2987. }
  2988.  
  2989. stock EnableAntiNOPForPlayer(playerid, nopcode, enable)
  2990. {
  2991.     if(!IsPlayerConnected(playerid)) return 0;
  2992.     #if defined FILTERSCRIPT
  2993.         return CallRemoteFunction("ac_EnableAntiNOPForPlayer", "iii", playerid, nopcode, enable);
  2994.     #else
  2995.         return ac_EnableAntiNOPForPlayer(playerid, nopcode, enable);
  2996.     #endif
  2997. }
  2998.  
  2999. stock IsAntiCheatEnabled(code)
  3000. {
  3001.     #if defined FILTERSCRIPT
  3002.         return CallRemoteFunction("ac_IsAntiCheatEnabled", "i", code);
  3003.     #else
  3004.         return ac_IsAntiCheatEnabled(code);
  3005.     #endif
  3006. }
  3007.  
  3008. stock IsAntiNOPEnabled(nopcode)
  3009. {
  3010.     #if defined FILTERSCRIPT
  3011.         return CallRemoteFunction("ac_IsAntiNOPEnabled", "i", nopcode);
  3012.     #else
  3013.         return ac_IsAntiNOPEnabled(nopcode);
  3014.     #endif
  3015. }
  3016.  
  3017. stock IsAntiCheatEnabledForPlayer(playerid, code)
  3018. {
  3019.     if(!IsPlayerConnected(playerid)) return 0;
  3020.     #if defined FILTERSCRIPT
  3021.         return CallRemoteFunction("ac_IsAntiCheatEnabledForPlayer", "ii", playerid, code);
  3022.     #else
  3023.         return ac_IsAntiCheatEnabledForPlayer(playerid, code);
  3024.     #endif
  3025. }
  3026.  
  3027. stock IsAntiNOPEnabledForPlayer(playerid, nopcode)
  3028. {
  3029.     if(!IsPlayerConnected(playerid)) return 0;
  3030.     #if defined FILTERSCRIPT
  3031.         return CallRemoteFunction("ac_IsAntiNOPEnabledForPlayer", "ii", playerid, nopcode);
  3032.     #else
  3033.         return ac_IsAntiNOPEnabledForPlayer(playerid, nopcode);
  3034.     #endif
  3035. }
  3036.  
  3037. stock AntiCheatGetSpeed(playerid)
  3038. {
  3039.     if(!IsPlayerConnected(playerid)) return 0;
  3040.     #if defined FILTERSCRIPT
  3041.         return CallRemoteFunction("ac_AntiCheatGetSpeed", "i", playerid);
  3042.     #else
  3043.         return ac_AntiCheatGetSpeed(playerid);
  3044.     #endif
  3045. }
  3046.  
  3047. stock AntiCheatGetAnimationIndex(playerid)
  3048. {
  3049.     if(!IsPlayerConnected(playerid)) return 0;
  3050.     #if defined FILTERSCRIPT
  3051.         return CallRemoteFunction("ac_AntiCheatGetAnimationIndex", "i", playerid);
  3052.     #else
  3053.         return ac_AntiCheatGetAnimationIndex(playerid);
  3054.     #endif
  3055. }
  3056.  
  3057. stock AntiCheatGetDialog(playerid)
  3058. {
  3059.     if(!IsPlayerConnected(playerid)) return -1;
  3060.     #if defined FILTERSCRIPT
  3061.         return CallRemoteFunction("ac_AntiCheatGetDialog", "i", playerid);
  3062.     #else
  3063.         return ac_AntiCheatGetDialog(playerid);
  3064.     #endif
  3065. }
  3066.  
  3067. stock AntiCheatGetInterior(playerid)
  3068. {
  3069.     if(!IsPlayerConnected(playerid)) return 0;
  3070.     #if defined FILTERSCRIPT
  3071.         return CallRemoteFunction("ac_AntiCheatGetInterior", "i", playerid);
  3072.     #else
  3073.         return ac_AntiCheatGetInterior(playerid);
  3074.     #endif
  3075. }
  3076.  
  3077. stock AntiCheatGetEnterVehicle(playerid)
  3078. {
  3079.     if(!IsPlayerConnected(playerid)) return 0;
  3080.     #if defined FILTERSCRIPT
  3081.         return CallRemoteFunction("ac_AntiCheatGetEnterVehicle", "i", playerid);
  3082.     #else
  3083.         return ac_AntiCheatGetEnterVehicle(playerid);
  3084.     #endif
  3085. }
  3086.  
  3087. stock AntiCheatGetEnterVehicleSeat(playerid)
  3088. {
  3089.     if(!IsPlayerConnected(playerid)) return -1;
  3090.     #if defined FILTERSCRIPT
  3091.         return CallRemoteFunction("ac_AntiCheatGetEnterVehicleSeat", "i", playerid);
  3092.     #else
  3093.         return ac_AntiCheatGetEnterVehicleSeat(playerid);
  3094.     #endif
  3095. }
  3096.  
  3097. stock AntiCheatGetVehicleID(playerid)
  3098. {
  3099.     if(!IsPlayerConnected(playerid)) return 0;
  3100.     #if defined FILTERSCRIPT
  3101.         return CallRemoteFunction("ac_AntiCheatGetVehicleID", "i", playerid);
  3102.     #else
  3103.         return ac_AntiCheatGetVehicleID(playerid);
  3104.     #endif
  3105. }
  3106.  
  3107. stock AntiCheatGetVehicleSeat(playerid)
  3108. {
  3109.     if(!IsPlayerConnected(playerid)) return -1;
  3110.     #if defined FILTERSCRIPT
  3111.         return CallRemoteFunction("ac_AntiCheatGetVehicleSeat", "i", playerid);
  3112.     #else
  3113.         return ac_AntiCheatGetVehicleSeat(playerid);
  3114.     #endif
  3115. }
  3116.  
  3117. stock AntiCheatGetWeapon(playerid)
  3118. {
  3119.     if(!IsPlayerConnected(playerid)) return -1;
  3120.     #if defined FILTERSCRIPT
  3121.         return CallRemoteFunction("ac_AntiCheatGetWeapon", "i", playerid);
  3122.     #else
  3123.         return ac_AntiCheatGetWeapon(playerid);
  3124.     #endif
  3125. }
  3126.  
  3127. stock AntiCheatGetWeaponInSlot(playerid, slot)
  3128. {
  3129.     if(!IsPlayerConnected(playerid)) return -1;
  3130.     if(!(0 <= slot <= 12)) return -2;
  3131.     #if defined FILTERSCRIPT
  3132.         return CallRemoteFunction("ac_AntiCheatGetWeaponInSlot", "ii", playerid, slot);
  3133.     #else
  3134.         return ac_AntiCheatGetWeaponInSlot(playerid, slot);
  3135.     #endif
  3136. }
  3137.  
  3138. stock AntiCheatGetAmmoInSlot(playerid, slot)
  3139. {
  3140.     if(!IsPlayerConnected(playerid)) return -1;
  3141.     if(!(0 <= slot <= 12)) return -2;
  3142.     #if defined FILTERSCRIPT
  3143.         return CallRemoteFunction("ac_AntiCheatGetAmmoInSlot", "ii", playerid, slot);
  3144.     #else
  3145.         return ac_AntiCheatGetAmmoInSlot(playerid, slot);
  3146.     #endif
  3147. }
  3148.  
  3149. stock AntiCheatGetSpecialAction(playerid)
  3150. {
  3151.     if(!IsPlayerConnected(playerid)) return 0;
  3152.     #if defined FILTERSCRIPT
  3153.         return CallRemoteFunction("ac_AntiCheatGetSpecialAction", "i", playerid);
  3154.     #else
  3155.         return ac_AntiCheatGetSpecialAction(playerid);
  3156.     #endif
  3157. }
  3158.  
  3159. stock AntiCheatGetLastSpecialAction(playerid)
  3160. {
  3161.     if(!IsPlayerConnected(playerid)) return 0;
  3162.     #if defined FILTERSCRIPT
  3163.         return CallRemoteFunction("ac_AntiCheatGetLastSpecialActio", "i", playerid);
  3164.     #else
  3165.         return ac_AntiCheatGetLastSpecialActio(playerid);
  3166.     #endif
  3167. }
  3168.  
  3169. stock AntiCheatGetLastShotWeapon(playerid)
  3170. {
  3171.     if(!IsPlayerConnected(playerid)) return -1;
  3172.     #if defined FILTERSCRIPT
  3173.         return CallRemoteFunction("ac_AntiCheatGetLastShotWeapon", "i", playerid);
  3174.     #else
  3175.         return ac_AntiCheatGetLastShotWeapon(playerid);
  3176.     #endif
  3177. }
  3178.  
  3179. stock AntiCheatGetLastPickup(playerid)
  3180. {
  3181.     if(!IsPlayerConnected(playerid)) return -1;
  3182.     #if defined FILTERSCRIPT
  3183.         return CallRemoteFunction("ac_AntiCheatGetLastPickup", "i", playerid);
  3184.     #else
  3185.         return ac_AntiCheatGetLastPickup(playerid);
  3186.     #endif
  3187. }
  3188.  
  3189. stock AntiCheatGetLastUpdateTime(playerid)
  3190. {
  3191.     if(!IsPlayerConnected(playerid)) return 0;
  3192.     #if defined FILTERSCRIPT
  3193.         return CallRemoteFunction("ac_AntiCheatGetLastUpdateTime", "i", playerid);
  3194.     #else
  3195.         return ac_AntiCheatGetLastUpdateTime(playerid);
  3196.     #endif
  3197. }
  3198.  
  3199. stock AntiCheatGetLastReloadTime(playerid)
  3200. {
  3201.     if(!IsPlayerConnected(playerid)) return 0;
  3202.     #if defined FILTERSCRIPT
  3203.         return CallRemoteFunction("ac_AntiCheatGetLastReloadTime", "i", playerid);
  3204.     #else
  3205.         return ac_AntiCheatGetLastReloadTime(playerid);
  3206.     #endif
  3207. }
  3208.  
  3209. stock AntiCheatGetLastEnteredVehTime(playerid)
  3210. {
  3211.     if(!IsPlayerConnected(playerid)) return 0;
  3212.     #if defined FILTERSCRIPT
  3213.         return CallRemoteFunction("ac_AntiCheatGetLastEnteredVehTi", "i", playerid);
  3214.     #else
  3215.         return ac_AntiCheatGetLastEnteredVehTi(playerid);
  3216.     #endif
  3217. }
  3218.  
  3219. stock AntiCheatGetLastShotTime(playerid)
  3220. {
  3221.     if(!IsPlayerConnected(playerid)) return 0;
  3222.     #if defined FILTERSCRIPT
  3223.         return CallRemoteFunction("ac_AntiCheatGetLastShotTime", "i", playerid);
  3224.     #else
  3225.         return ac_AntiCheatGetLastShotTime(playerid);
  3226.     #endif
  3227. }
  3228.  
  3229. stock AntiCheatGetLastSpawnTime(playerid)
  3230. {
  3231.     if(!IsPlayerConnected(playerid)) return 0;
  3232.     #if defined FILTERSCRIPT
  3233.         return CallRemoteFunction("ac_AntiCheatGetLastSpawnTime", "i", playerid);
  3234.     #else
  3235.         return ac_AntiCheatGetLastSpawnTime(playerid);
  3236.     #endif
  3237. }
  3238.  
  3239. stock AntiCheatIntEnterExitsIsEnabled(playerid)
  3240. {
  3241.     if(!IsPlayerConnected(playerid)) return 0;
  3242.     #if defined FILTERSCRIPT
  3243.         return CallRemoteFunction("ac_AntiCheatIntEnterExitsIsEnab", "i", playerid);
  3244.     #else
  3245.         return ac_AntiCheatIntEnterExitsIsEnab(playerid);
  3246.     #endif
  3247. }
  3248.  
  3249. stock AntiCheatStuntBonusIsEnabled(playerid)
  3250. {
  3251.     if(!IsPlayerConnected(playerid)) return 0;
  3252.     #if defined FILTERSCRIPT
  3253.         return CallRemoteFunction("ac_AntiCheatStuntBonusIsEnabled", "i", playerid);
  3254.     #else
  3255.         return ac_AntiCheatStuntBonusIsEnabled(playerid);
  3256.     #endif
  3257. }
  3258.  
  3259. stock AntiCheatIsInModShop(playerid)
  3260. {
  3261.     if(!IsPlayerConnected(playerid)) return 0;
  3262.     #if defined FILTERSCRIPT
  3263.         return CallRemoteFunction("ac_AntiCheatIsInModShop", "i", playerid);
  3264.     #else
  3265.         return ac_AntiCheatIsInModShop(playerid);
  3266.     #endif
  3267. }
  3268.  
  3269. stock AntiCheatIsInSpectate(playerid)
  3270. {
  3271.     if(!IsPlayerConnected(playerid)) return 0;
  3272.     #if defined FILTERSCRIPT
  3273.         return CallRemoteFunction("ac_AntiCheatIsInSpectate", "i", playerid);
  3274.     #else
  3275.         return ac_AntiCheatIsInSpectate(playerid);
  3276.     #endif
  3277. }
  3278.  
  3279. stock AntiCheatIsFrozen(playerid)
  3280. {
  3281.     if(!IsPlayerConnected(playerid)) return 0;
  3282.     #if defined FILTERSCRIPT
  3283.         return CallRemoteFunction("ac_AntiCheatIsFrozen", "i", playerid);
  3284.     #else
  3285.         return ac_AntiCheatIsFrozen(playerid);
  3286.     #endif
  3287. }
  3288.  
  3289. stock AntiCheatIsDead(playerid)
  3290. {
  3291.     if(!IsPlayerConnected(playerid)) return 0;
  3292.     #if defined FILTERSCRIPT
  3293.         return CallRemoteFunction("ac_AntiCheatIsDead", "i", playerid);
  3294.     #else
  3295.         return ac_AntiCheatIsDead(playerid);
  3296.     #endif
  3297. }
  3298.  
  3299. stock AntiCheatIsConnected(playerid)
  3300. {
  3301.     if(!IsPlayerConnected(playerid)) return 0;
  3302.     #if defined FILTERSCRIPT
  3303.         return CallRemoteFunction("ac_AntiCheatIsConnected", "i", playerid);
  3304.     #else
  3305.         return ac_AntiCheatIsConnected(playerid);
  3306.     #endif
  3307. }
  3308.  
  3309. stock AntiCheatKickWithDesync(playerid, code)
  3310. {
  3311.     if(!IsPlayerConnected(playerid)) return 0;
  3312.     #if defined FILTERSCRIPT
  3313.         return CallRemoteFunction("ac_AntiCheatKickWithDesync", "ii", playerid, code);
  3314.     #else
  3315.         return ac_AntiCheatKickWithDesync(playerid, code);
  3316.     #endif
  3317. }
  3318.  
  3319. stock AntiCheatIsKickedWithDesync(playerid)
  3320. {
  3321.     if(!IsPlayerConnected(playerid)) return 3;
  3322.     #if defined FILTERSCRIPT
  3323.         return CallRemoteFunction("ac_AntiCheatIsKickedWithDesync", "i", playerid);
  3324.     #else
  3325.         return ac_AntiCheatIsKickedWithDesync(playerid);
  3326.     #endif
  3327. }
  3328.  
  3329. stock AntiCheatGetVehicleDriver(vehicleid)
  3330. {
  3331.     if(GetVehicleModel(vehicleid) <= 0) return INVALID_PLAYER_ID;
  3332.     #if defined FILTERSCRIPT
  3333.         return CallRemoteFunction("ac_AntiCheatGetVehicleDriver", "i", vehicleid);
  3334.     #else
  3335.         return ac_AntiCheatGetVehicleDriver(vehicleid);
  3336.     #endif
  3337. }
  3338.  
  3339. stock AntiCheatGetVehicleInterior(vehicleid)
  3340. {
  3341.     if(GetVehicleModel(vehicleid) <= 0) return 0;
  3342.     #if defined FILTERSCRIPT
  3343.         return CallRemoteFunction("ac_AntiCheatGetVehicleInterior", "i", vehicleid);
  3344.     #else
  3345.         return ac_AntiCheatGetVehicleInterior(vehicleid);
  3346.     #endif
  3347. }
  3348.  
  3349. stock AntiCheatGetVehiclePaintjob(vehicleid)
  3350. {
  3351.     if(GetVehicleModel(vehicleid) <= 0) return 3;
  3352.     #if defined FILTERSCRIPT
  3353.         return CallRemoteFunction("ac_AntiCheatGetVehiclePaintjob", "i", vehicleid);
  3354.     #else
  3355.         return ac_AntiCheatGetVehiclePaintjob(vehicleid);
  3356.     #endif
  3357. }
  3358.  
  3359. stock AntiCheatGetVehicleSpeed(vehicleid)
  3360. {
  3361.     if(GetVehicleModel(vehicleid) <= 0) return 0;
  3362.     #if defined FILTERSCRIPT
  3363.         return CallRemoteFunction("ac_AntiCheatGetVehicleSpeed", "i", vehicleid);
  3364.     #else
  3365.         return ac_AntiCheatGetVehicleSpeed(vehicleid);
  3366.     #endif
  3367. }
  3368.  
  3369. stock AntiCheatIsVehicleSpawned(vehicleid)
  3370. {
  3371.     if(GetVehicleModel(vehicleid) <= 0) return 0;
  3372.     #if defined FILTERSCRIPT
  3373.         return CallRemoteFunction("ac_AntiCheatIsVehicleSpawned", "i", vehicleid);
  3374.     #else
  3375.         return ac_AntiCheatIsVehicleSpawned(vehicleid);
  3376.     #endif
  3377. }
  3378.  
  3379. #if defined FILTERSCRIPT
  3380.  
  3381. static fs_AntiCheatGetNextDialog(playerid)
  3382. {
  3383.     if(!IsPlayerConnected(playerid)) return -1;
  3384.     return CallRemoteFunction("ac_AntiCheatGetNextDialog", "i", playerid);
  3385. }
  3386.  
  3387. static fs_AntiCheatSetDialog(playerid, dialogid)
  3388. {
  3389.     if(!(0 <= playerid < MAX_PLAYERS)) return 0;
  3390.     return CallRemoteFunction("ac_ShowPlayerDialog", "id", playerid, dialogid);
  3391. }
  3392.  
  3393. static fs_AntiCheatSetNextDialog(playerid, dialogid)
  3394. {
  3395.     if(!(0 <= playerid < MAX_PLAYERS)) return 0;
  3396.     return CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, dialogid);
  3397. }
  3398.  
  3399. #else
  3400.  
  3401. public OnGameModeInit()
  3402. {
  3403.     #if AC_USE_CONFIG_FILES
  3404.         if(!ac_LoadCfg()) printf(CFG_OPENING_ERROR, AC_CONFIG_FILE);
  3405.         if(!ac_LoadNOPCfg()) printf(CFG_OPENING_ERROR, AC_NOP_CONFIG_FILE);
  3406.     #endif
  3407.     if(ac_ACAllow[42])
  3408.     {
  3409.         #if !AC_USE_QUERY
  3410.             #if defined GetConsoleVarAsBool
  3411.                 ac_QueryEnable = !!GetConsoleVarAsBool("query");
  3412.             #else
  3413.                 ac_QueryEnable = !!GetServerVarAsBool("query");
  3414.             #endif
  3415.             SendRconCommand("query 0");
  3416.         #endif
  3417.         #undef AC_USE_QUERY
  3418.         #if defined GetConsoleVarAsBool
  3419.             ac_RconEnable = !!GetConsoleVarAsBool("rcon");
  3420.         #else
  3421.             ac_RconEnable = !!GetServerVarAsBool("rcon");
  3422.         #endif
  3423.         SendRconCommand("rcon 0");
  3424.     }
  3425.     #if defined GetConsoleVarAsInt
  3426.         ac_LagCompMode = !!GetConsoleVarAsInt("lagcompmode");
  3427.     #else
  3428.         ac_LagCompMode = !!GetServerVarAsInt("lagcompmode");
  3429.     #endif
  3430.     print(" ");
  3431.     print("--------------------------------------");
  3432.     print(LOADED_MSG_1);
  3433.     printf(LOADED_MSG_2, NEX_AC_VERSION);
  3434.     print(LOADED_MSG_3);
  3435.     print("--------------------------------------\n");
  3436.     #if defined ac_OnGameModeInit
  3437.         new ac_a = ac_OnGameModeInit();
  3438.     #endif
  3439.     static ac_strtmp[10];
  3440.     #if defined GetConsoleVarAsString
  3441.         GetConsoleVarAsString("version", ac_strtmp, sizeof ac_strtmp);
  3442.     #else
  3443.         GetServerVarAsString("version", ac_strtmp, sizeof ac_strtmp);
  3444.     #endif
  3445.     if(strfind(ac_strtmp, AC_SERVER_VERSION) == -1 && strfind(ac_strtmp, AC_SERVER_DL_VERSION) == -1) print(VERSION_WARNING);
  3446.     #undef AC_SERVER_DL_VERSION
  3447.     #undef AC_SERVER_VERSION
  3448.     #if defined ac_OnGameModeInit
  3449.         return ac_a;
  3450.     #else
  3451.         return 1;
  3452.     #endif
  3453. }
  3454.  
  3455. #if defined _ALS_OnGameModeInit
  3456.     #undef OnGameModeInit
  3457. #else
  3458.     #define _ALS_OnGameModeInit
  3459. #endif
  3460. #define OnGameModeInit ac_OnGameModeInit
  3461. #if defined ac_OnGameModeInit
  3462.     forward ac_OnGameModeInit();
  3463. #endif
  3464.  
  3465. #if AC_USE_STATISTICS
  3466.     public OnGameModeExit()
  3467.     {
  3468.         #if defined ac_OnGameModeExit
  3469.             new ac_a = ac_OnGameModeExit();
  3470.         #endif
  3471.         print(" ");
  3472.         print("--------------------------------------");
  3473.         print(STATS_STRING_1);
  3474.         print(STATS_STRING_2);
  3475.         printf(STATS_STRING_3, ac_sInfo[0]);
  3476.         printf(STATS_STRING_4, ac_sInfo[1]);
  3477.         printf(STATS_STRING_5, ac_sInfo[2]);
  3478.         printf(STATS_STRING_6, ac_sInfo[3]);
  3479.         printf(STATS_STRING_7, ac_sInfo[4]);
  3480.         printf(STATS_STRING_8, ac_sInfo[5]);
  3481.         print("--------------------------------------\n");
  3482.         #if defined ac_OnGameModeExit
  3483.             return ac_a;
  3484.         #else
  3485.             return 1;
  3486.         #endif
  3487.     }
  3488.  
  3489.     #if defined _ALS_OnGameModeExit
  3490.         #undef OnGameModeExit
  3491.     #else
  3492.         #define _ALS_OnGameModeExit
  3493.     #endif
  3494.     #define OnGameModeExit ac_OnGameModeExit
  3495.     #if defined ac_OnGameModeExit
  3496.         forward ac_OnGameModeExit();
  3497.     #endif
  3498. #endif
  3499.  
  3500. public OnPlayerConnect(playerid)
  3501. {
  3502.     ACInfo[playerid][acVeh] =
  3503.     ACInfo[playerid][acKicked] =
  3504.     ACInfo[playerid][acKickVeh] = 0;
  3505.     GetPlayerIp(playerid, ACInfo[playerid][acIp], 16);
  3506.     #if AC_USE_NPC
  3507.         if(IsPlayerNPC(playerid))
  3508.         {
  3509.             if(ac_ACAllow[36])
  3510.             {
  3511.                 #if defined GetLocalIP
  3512.                     new bool:ac_rslt;
  3513.                     static ac_strtmp[16];
  3514.                     ac_strtmp = "127.0.0.1";
  3515.                     while(ac_strtmp[0])
  3516.                     {
  3517.                         if(!strcmp(ACInfo[playerid][acIp], ac_strtmp))
  3518.                         {
  3519.                             ac_rslt = true;
  3520.                             break;
  3521.                         }
  3522.                         GetLocalIP(0, ac_strtmp);
  3523.                     }
  3524.                     if(!ac_rslt)
  3525.                     {
  3526.                         #if defined DEBUG
  3527.                             printf("[Nex-AC debug] NPC's IP: '%s'", ACInfo[playerid][acIp]);
  3528.                         #endif
  3529.                         ac_KickWithCode(playerid, "", 0, 36);
  3530.                     }
  3531.                 #else
  3532.                     if(strcmp(ACInfo[playerid][acIp], "127.0.0.1")) ac_KickWithCode(playerid, "", 0, 36);
  3533.                 #endif
  3534.             }
  3535.             ACInfo[playerid][acTimerID] = 0;
  3536.         }
  3537.         else
  3538.         {
  3539.     #else
  3540.         if(ac_ACAllow[36] && IsPlayerNPC(playerid)) ac_KickWithCode(playerid, "", 0, 36);
  3541.     #endif
  3542.         if(ac_ACAllow[48] && ACInfo[playerid][acOnline]) ac_KickWithCode(playerid, "", 0, 48, 1);
  3543.         #if defined GetPlayerVersion
  3544.             if(ac_ACAllow[41])
  3545.             {
  3546.                 static ac_ver[24];
  3547.                 GetPlayerVersion(playerid, ac_ver, sizeof ac_ver);
  3548.                 if(strfind(ac_ver, AC_CLIENT_VERSION) == -1)
  3549.                 {
  3550.                     #if defined DEBUG
  3551.                         printf(DEBUG_CODE_2, playerid, ac_ver);
  3552.                     #endif
  3553.                     ac_KickWithCode(playerid, "", 0, 41);
  3554.                 }
  3555.             }
  3556.         #else
  3557.             #pragma unused DEBUG_CODE_2
  3558.         #endif
  3559.         #undef AC_CLIENT_VERSION
  3560.         new ac_i = AC_MAX_CONNECTS_FROM_IP;
  3561.         if(ac_ACAllow[40])
  3562.         {
  3563.             #if defined foreach
  3564.                 foreach(new ac_j : Player)
  3565.                 {
  3566.                     #if AC_USE_NPC
  3567.                         if(ac_j != playerid && !IsPlayerNPC(ac_j) && !strcmp(ACInfo[playerid][acIp], ACInfo[ac_j][acIp], false))
  3568.                     #else
  3569.                         if(ac_j != playerid && !strcmp(ACInfo[playerid][acIp], ACInfo[ac_j][acIp], false))
  3570.                     #endif
  3571.             #else
  3572.                 #if defined GetPlayerPoolSize
  3573.                     for(new ac_j = GetPlayerPoolSize(); ac_j >= 0; --ac_j)
  3574.                 #else
  3575.                     for(new ac_j = MAX_PLAYERS - 1; ac_j >= 0; --ac_j)
  3576.                 #endif
  3577.                 {
  3578.                     #if AC_USE_NPC
  3579.                         if(ac_j != playerid && IsPlayerConnected(ac_j) && !IsPlayerNPC(ac_j) &&
  3580.                         !strcmp(ACInfo[playerid][acIp], ACInfo[ac_j][acIp], false))
  3581.                     #else
  3582.                         if(ac_j != playerid && IsPlayerConnected(ac_j) &&
  3583.                         !strcmp(ACInfo[playerid][acIp], ACInfo[ac_j][acIp], false))
  3584.                     #endif
  3585.             #endif
  3586.                 {
  3587.                     ac_i--;
  3588.                     if(ac_i < 1)
  3589.                     {
  3590.                         #if defined DEBUG
  3591.                             printf(DEBUG_CODE_3, playerid, AC_MAX_CONNECTS_FROM_IP);
  3592.                         #endif
  3593.                         ac_KickWithCode(playerid, "", 0, 40);
  3594.                         break;
  3595.                     }
  3596.                 }
  3597.             }
  3598.         }
  3599.         ACInfo[playerid][acSpec] =
  3600.         ACInfo[playerid][acForceClass] =
  3601.         ACInfo[playerid][acDeathRes] = false;
  3602.         ACInfo[playerid][acClassRes] =
  3603.         ACInfo[playerid][acDead] = true;
  3604.         ACInfo[playerid][acIntEnterExits] = ac_IntEnterExits;
  3605.         ACInfo[playerid][acStuntBonus] = ac_StuntBonus;
  3606.         ACInfo[playerid][acCheatCount][0] =
  3607.         ACInfo[playerid][acLastWeapon] =
  3608.         ACInfo[playerid][acSpawnRes] =
  3609.         ACInfo[playerid][acMoney] =
  3610.         ACInfo[playerid][acAnim] =
  3611.         ACInfo[playerid][acInt] = 0;
  3612.         ACInfo[playerid][acSet][12] =
  3613.         ACInfo[playerid][acSet][10] =
  3614.         ACInfo[playerid][acSet][0] =
  3615.         ACInfo[playerid][acNextDialog] =
  3616.         ACInfo[playerid][acDialog] = -1;
  3617.         ACInfo[playerid][acDropJpX] =
  3618.         ACInfo[playerid][acDropJpY] =
  3619.         ACInfo[playerid][acDropJpZ] = 25000.0;
  3620.         for(ac_i = 12; ac_i >= 0; --ac_i)
  3621.         {
  3622.             ACInfo[playerid][acSetWeapon][ac_i] = -1;
  3623.             ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  3624.         }
  3625.         for(ac_i = sizeof(ac_Mtfc) - 1; ac_i >= 0; --ac_i) ACInfo[playerid][acFloodCount][ac_i] = 0;
  3626.         memcpy(ACInfo[playerid][acNOPAllow], ac_NOPAllow, 0, sizeof(ac_NOPAllow) * 4, sizeof ac_NOPAllow);
  3627.         memcpy(ACInfo[playerid][acACAllow], ac_ACAllow, 0, sizeof(ac_ACAllow) * 4, sizeof ac_ACAllow);
  3628.         if(ACInfo[playerid][acKicked] < 1)
  3629.         {
  3630.             ACInfo[playerid][acTimerTick] = GetTickCount();
  3631.             ACInfo[playerid][acTimerID] = SetTimerEx("ac_Timer", 1000, false, "i", playerid);
  3632.         }
  3633.     #if AC_USE_NPC
  3634.         }
  3635.     #endif
  3636.     ACInfo[playerid][acOnline] = true;
  3637.     #if defined ac_OnPlayerConnect
  3638.         return ac_OnPlayerConnect(playerid);
  3639.     #else
  3640.         return 1;
  3641.     #endif
  3642. }
  3643.  
  3644. #if defined _ALS_OnPlayerConnect
  3645.     #undef OnPlayerConnect
  3646. #else
  3647.     #define _ALS_OnPlayerConnect
  3648. #endif
  3649. #define OnPlayerConnect ac_OnPlayerConnect
  3650. #if defined ac_OnPlayerConnect
  3651.     forward ac_OnPlayerConnect(playerid);
  3652. #endif
  3653.  
  3654. public OnPlayerDisconnect(playerid, reason)
  3655. {
  3656.     #if AC_USE_NPC
  3657.         if(!IsPlayerNPC(playerid))
  3658.         {
  3659.     #endif
  3660.         KillTimer(ACInfo[playerid][acTimerID]);
  3661.         #if defined BlockIpAddress && AC_MAX_CONNECTS_FROM_IP < 2
  3662.             if(ACInfo[playerid][acACAllow][37])
  3663.             {
  3664.                 #if defined GetConsoleVarAsInt
  3665.                     BlockIpAddress(ACInfo[playerid][acIp], (AC_MIN_TIME_RECONNECT * 1000) - (reason > 0 ? 0 : GetConsoleVarAsInt("playertimeout")));
  3666.                 #else
  3667.                     BlockIpAddress(ACInfo[playerid][acIp], (AC_MIN_TIME_RECONNECT * 1000) - (reason > 0 ? 0 : GetServerVarAsInt("playertimeout")));
  3668.                 #endif
  3669.             }
  3670.         #endif
  3671.         #undef AC_MAX_CONNECTS_FROM_IP
  3672.         #undef AC_MIN_TIME_RECONNECT
  3673.     #if AC_USE_NPC
  3674.         }
  3675.     #endif
  3676.     KillTimer(ACInfo[playerid][acKickTimerID]);
  3677.     new ac_vehid = ACInfo[playerid][acKickVeh];
  3678.     if(ac_vehid > 0)
  3679.     {
  3680.         if(ACVehInfo[ac_vehid][acDriver] == playerid) ACVehInfo[ac_vehid][acDriver] = INVALID_PLAYER_ID;
  3681.         if(ACInfo[playerid][acKicked] == 2)
  3682.         {
  3683.             LinkVehicleToInterior(ac_vehid, ACVehInfo[ac_vehid][acInt]);
  3684.             SetVehicleZAngle(ac_vehid, ACVehInfo[ac_vehid][acZAngle]);
  3685.             SetVehiclePos(ac_vehid, ACVehInfo[ac_vehid][acPosX], ACVehInfo[ac_vehid][acPosY], ACVehInfo[ac_vehid][acPosZ]);
  3686.             SetVehicleHealth(ac_vehid, ACVehInfo[ac_vehid][acHealth]);
  3687.             ChangeVehiclePaintjob(ac_vehid, ACVehInfo[ac_vehid][acPaintJob]);
  3688.         }
  3689.     }
  3690.     if((ac_vehid = ACInfo[playerid][acVeh]) > 0)
  3691.     {
  3692.         if(ACVehInfo[ac_vehid][acDriver] == playerid) ACVehInfo[ac_vehid][acDriver] = INVALID_PLAYER_ID;
  3693.         if(ACInfo[playerid][acKicked] == 2)
  3694.         {
  3695.             LinkVehicleToInterior(ac_vehid, ACVehInfo[ac_vehid][acInt]);
  3696.             SetVehicleZAngle(ac_vehid, ACVehInfo[ac_vehid][acZAngle]);
  3697.             SetVehiclePos(ac_vehid, ACVehInfo[ac_vehid][acPosX], ACVehInfo[ac_vehid][acPosY], ACVehInfo[ac_vehid][acPosZ]);
  3698.             SetVehicleHealth(ac_vehid, ACVehInfo[ac_vehid][acHealth]);
  3699.             ChangeVehiclePaintjob(ac_vehid, ACVehInfo[ac_vehid][acPaintJob]);
  3700.         }
  3701.     }
  3702.     ACInfo[playerid][acOnline] = false;
  3703.     if(ACInfo[playerid][acKicked] < 1) ACInfo[playerid][acKicked] = 3;
  3704.     #if defined ac_OnPlayerDisconnect
  3705.         return ac_OnPlayerDisconnect(playerid, reason);
  3706.     #else
  3707.         return 1;
  3708.     #endif
  3709. }
  3710.  
  3711. #if defined _ALS_OnPlayerDisconnect
  3712.     #undef OnPlayerDisconnect
  3713. #else
  3714.     #define _ALS_OnPlayerDisconnect
  3715. #endif
  3716. #define OnPlayerDisconnect ac_OnPlayerDisconnect
  3717. #if defined ac_OnPlayerDisconnect
  3718.     forward ac_OnPlayerDisconnect(playerid, reason);
  3719. #endif
  3720.  
  3721. public OnPlayerSpawn(playerid)
  3722. {
  3723.     if(ACInfo[playerid][acKicked] > 0) return 0;
  3724.     new ac_i, bool:ac_ur;
  3725.     #if AC_USE_NPC
  3726.         if(!IsPlayerNPC(playerid))
  3727.         {
  3728.     #endif
  3729.         new ac_gtc = GetTickCount();
  3730.         if(ACInfo[playerid][acSpec] && ACInfo[playerid][acSet][7] < 2)
  3731.         {
  3732.             ACInfo[playerid][acSet][3] =
  3733.             ACInfo[playerid][acSet][4] =
  3734.             ACInfo[playerid][acSet][8] =
  3735.             ACInfo[playerid][acSet][9] = -1;
  3736.             ACInfo[playerid][acSpec] = false;
  3737.         }
  3738.         else
  3739.         {
  3740.             if(ACInfo[playerid][acACAllow][27] &&
  3741.             (ACInfo[playerid][acSpawnRes] < 1 || ac_gtc < ACInfo[playerid][acSpawnTick] + 1000))
  3742.             {
  3743.                 #if defined DEBUG
  3744.                     printf("[Nex-AC debug] Spawn res: %d, respawn time: %d",
  3745.                     ACInfo[playerid][acSpawnRes], ac_gtc - ACInfo[playerid][acSpawnTick]);
  3746.                 #endif
  3747.                 ac_KickWithCode(playerid, "", 0, 27);
  3748.                 #if defined OnCheatDetected
  3749.                     ACInfo[playerid][acSpawnRes] = 1;
  3750.                 #endif
  3751.             }
  3752.             if(ACInfo[playerid][acSpawnRes] > 0) ACInfo[playerid][acSpawnRes]--;
  3753.             if(!(1 <= ACInfo[playerid][acSet][7] <= 2))
  3754.             {
  3755.                 for(ac_i = 12; ac_i >= 0; --ac_i) ACInfo[playerid][acSet][ac_i] = -1;
  3756.                 ac_ur = true;
  3757.             }
  3758.         }
  3759.         if(!(1 <= ACInfo[playerid][acSet][7] <= 2))
  3760.         {
  3761.             for(ac_i = 12; ac_i >= 0; --ac_i)
  3762.             {
  3763.                 ACInfo[playerid][acSetWeapon][ac_i] = -1;
  3764.                 ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  3765.             }
  3766.             ACInfo[playerid][acNextSpecAct] = -1;
  3767.             ACInfo[playerid][acUnFrozen] = true;
  3768.             ACInfo[playerid][acTpToZ] = false;
  3769.             #if defined FreezeSyncPacket
  3770.                 FreezeSyncPacket(playerid, E_ALL_SYNC, false);
  3771.             #endif
  3772.         }
  3773.         for(ac_i = 12; ac_i >= 0; --ac_i)
  3774.         {
  3775.             ACInfo[playerid][acWeapon][ac_i] =
  3776.             ACInfo[playerid][acAmmo][ac_i] = 0;
  3777.         }
  3778.         ACInfo[playerid][acModShop] =
  3779.         ACInfo[playerid][acForceClass] =
  3780.         ACInfo[playerid][acClassRes] =
  3781.         ACInfo[playerid][acDead] = false;
  3782.         ACInfo[playerid][acLastPickup] =
  3783.         ACInfo[playerid][acEnterSeat] =
  3784.         ACInfo[playerid][acSet][7] =
  3785.         ACInfo[playerid][acSeat] = -1;
  3786.         ACInfo[playerid][acCheatCount][5] =
  3787.         ACInfo[playerid][acCheatCount][6] =
  3788.         ACInfo[playerid][acCheatCount][7] =
  3789.         ACInfo[playerid][acCheatCount][8] =
  3790.         ACInfo[playerid][acCheatCount][9] =
  3791.         ACInfo[playerid][acCheatCount][13] =
  3792.         ACInfo[playerid][acCheatCount][14] =
  3793.         ACInfo[playerid][acCheatCount][16] =
  3794.         ACInfo[playerid][acCheatCount][18] =
  3795.         ACInfo[playerid][acCheatCount][20] =
  3796.         ACInfo[playerid][acLastSpecAct] =
  3797.         ACInfo[playerid][acLastWeapon] =
  3798.         ACInfo[playerid][acParachute] =
  3799.         ACInfo[playerid][acEnterVeh] =
  3800.         ACInfo[playerid][acLastShot] =
  3801.         ACInfo[playerid][acKickVeh] =
  3802.         ACInfo[playerid][acSpecAct] =
  3803.         ACInfo[playerid][acDmgRes] =
  3804.         ACInfo[playerid][acIntRet] =
  3805.         ACInfo[playerid][acSpeed] =
  3806.         ACInfo[playerid][acVeh] = 0;
  3807.         ACInfo[playerid][acSetPosTick] = ac_gtc + 2650;
  3808.         ACInfo[playerid][acGtc][7] = ac_gtc + 1650;
  3809.         if(ac_IsValidWeapon(ACInfo[playerid][acSpawnWeapon1]))
  3810.         {
  3811.             ac_i = ac_wSlot[ACInfo[playerid][acSpawnWeapon1]];
  3812.             ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acSpawnWeapon1];
  3813.             ACInfo[playerid][acAmmo][ac_i] = ACInfo[playerid][acSpawnAmmo1];
  3814.         }
  3815.         if(ac_IsValidWeapon(ACInfo[playerid][acSpawnWeapon2]))
  3816.         {
  3817.             ac_i = ac_wSlot[ACInfo[playerid][acSpawnWeapon2]];
  3818.             ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acSpawnWeapon2];
  3819.             ACInfo[playerid][acAmmo][ac_i] = ACInfo[playerid][acSpawnAmmo2];
  3820.         }
  3821.         if(ac_IsValidWeapon(ACInfo[playerid][acSpawnWeapon3]))
  3822.         {
  3823.             ac_i = ac_wSlot[ACInfo[playerid][acSpawnWeapon3]];
  3824.             ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acSpawnWeapon3];
  3825.             ACInfo[playerid][acAmmo][ac_i] = ACInfo[playerid][acSpawnAmmo3];
  3826.         }
  3827.     #if AC_USE_NPC
  3828.         }
  3829.     #endif
  3830.     #if defined ac_OnPlayerSpawn
  3831.         ac_i = ac_OnPlayerSpawn(playerid);
  3832.     #endif
  3833.     if(ac_ur)
  3834.     {
  3835.         if(ACInfo[playerid][acSet][0] == -1) SetPlayerInterior(playerid, 0);
  3836.         if(ACInfo[playerid][acSet][1] == -1) SetPlayerHealth(playerid, 100.0);
  3837.         if(ACInfo[playerid][acSet][2] == -1) SetPlayerArmour(playerid, 0.0);
  3838.     }
  3839.     #if defined ac_OnPlayerSpawn
  3840.         return ac_i;
  3841.     #else
  3842.         return 1;
  3843.     #endif
  3844. }
  3845.  
  3846. #if defined _ALS_OnPlayerSpawn
  3847.     #undef OnPlayerSpawn
  3848. #else
  3849.     #define _ALS_OnPlayerSpawn
  3850. #endif
  3851. #define OnPlayerSpawn ac_OnPlayerSpawn
  3852. #if defined ac_OnPlayerSpawn
  3853.     forward ac_OnPlayerSpawn(playerid);
  3854. #endif
  3855.  
  3856. public OnPlayerDeath(playerid, killerid, reason)
  3857. {
  3858.     if(ACInfo[playerid][acKicked] > 0) return 0;
  3859.     if(ACInfo[playerid][acACAllow][28] &&
  3860.     (ACInfo[playerid][acDead] || !ACInfo[playerid][acDeathRes] &&
  3861.     (reason != WEAPON_COLLISION && reason != 255 || killerid != INVALID_PLAYER_ID)))
  3862.     {
  3863.         #if defined DEBUG
  3864.             printf("[Nex-AC debug] Is dead: %d, death res: %d, killerid: %d, reason: %d",
  3865.             ACInfo[playerid][acDead], ACInfo[playerid][acDeathRes], killerid, reason);
  3866.         #endif
  3867.         ac_KickWithCode(playerid, "", 0, 28);
  3868.     }
  3869.     ACInfo[playerid][acDead] = true;
  3870.     ACInfo[playerid][acDeathRes] = false;
  3871.     if(ACInfo[playerid][acSpawnRes] < 1) ACInfo[playerid][acSpawnTick] = GetTickCount();
  3872.     ACInfo[playerid][acSpawnRes] = 1;
  3873.     #if defined ac_OnPlayerDeath
  3874.         return ac_OnPlayerDeath(playerid, killerid, reason);
  3875.     #else
  3876.         return 1;
  3877.     #endif
  3878. }
  3879.  
  3880. #if defined _ALS_OnPlayerDeath
  3881.     #undef OnPlayerDeath
  3882. #else
  3883.     #define _ALS_OnPlayerDeath
  3884. #endif
  3885. #define OnPlayerDeath ac_OnPlayerDeath
  3886. #if defined ac_OnPlayerDeath
  3887.     forward ac_OnPlayerDeath(playerid, killerid, reason);
  3888. #endif
  3889.  
  3890. #if defined OnPlayerWeaponShot
  3891.     public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
  3892. #else
  3893.     public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
  3894. #endif
  3895. {
  3896.     if(ACInfo[playerid][acKicked] > 0) return 1;
  3897.     #if defined OnPlayerWeaponShot
  3898.         if(ACInfo[playerid][acACAllow][47] &&
  3899.         (amount < 0.0 || issuerid != INVALID_PLAYER_ID && !(0 <= issuerid < MAX_PLAYERS) || !(3 <= bodypart <= 9) || !ac_IsValidDamageReason(weaponid)))
  3900.         {
  3901.             #if defined DEBUG
  3902.                 printf("[Nex-AC debug] Issuerid: %d, amount: %f, weaponid: %d, bodypart: %d", issuerid, amount, weaponid, bodypart);
  3903.             #endif
  3904.             ac_KickWithCode(playerid, "", 0, 47, 4);
  3905.             return 1;
  3906.         }
  3907.     #else
  3908.         if(ACInfo[playerid][acACAllow][47] &&
  3909.         (amount < 0.0 || issuerid != INVALID_PLAYER_ID && !(0 <= issuerid < MAX_PLAYERS) || !ac_IsValidDamageReason(weaponid)))
  3910.         {
  3911.             #if defined DEBUG
  3912.                 printf("[Nex-AC debug] Issuerid: %d, amount: %f, weaponid: %d", issuerid, amount, weaponid);
  3913.             #endif
  3914.             ac_KickWithCode(playerid, "", 0, 47, 4);
  3915.             return 1;
  3916.         }
  3917.     #endif
  3918.     #if defined IsPlayerDying
  3919.         if(!IsPlayerDying(playerid)) ACInfo[playerid][acDeathRes] = true;
  3920.     #else
  3921.         if(!ACInfo[playerid][acDead]) ACInfo[playerid][acDeathRes] = true;
  3922.     #endif
  3923.     #if defined ac_OnPlayerTakeDamage
  3924.         #if defined OnPlayerWeaponShot
  3925.             return ac_OnPlayerTakeDamage(playerid, issuerid, amount, weaponid, bodypart);
  3926.         #else
  3927.             return ac_OnPlayerTakeDamage(playerid, issuerid, amount, weaponid);
  3928.         #endif
  3929.     #else
  3930.         return 0;
  3931.     #endif
  3932. }
  3933.  
  3934. #if defined _ALS_OnPlayerTakeDamage
  3935.     #undef OnPlayerTakeDamage
  3936. #else
  3937.     #define _ALS_OnPlayerTakeDamage
  3938. #endif
  3939. #define OnPlayerTakeDamage ac_OnPlayerTakeDamage
  3940. #if defined ac_OnPlayerTakeDamage
  3941.     #if defined OnPlayerWeaponShot
  3942.         forward ac_OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart);
  3943.     #else
  3944.         forward ac_OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid);
  3945.     #endif
  3946. #endif
  3947.  
  3948. #if defined OnPlayerWeaponShot
  3949.     public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
  3950. #else
  3951.     public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
  3952. #endif
  3953. {
  3954.     if(ACInfo[playerid][acKicked] > 0) return 1;
  3955.     #if defined OnPlayerWeaponShot
  3956.         if(ACInfo[playerid][acACAllow][47])
  3957.         {
  3958.             if(amount < 0.0 || !(0 <= damagedid < MAX_PLAYERS) || !(3 <= bodypart <= 9) || !ac_IsValidWeapon(weaponid))
  3959.             {
  3960.                 #if defined DEBUG
  3961.                     printf("[Nex-AC debug] Damagedid: %d, amount: %f, weaponid: %d, bodypart: %d",
  3962.                     damagedid, amount, weaponid, bodypart);
  3963.                 #endif
  3964.                 ac_KickWithCode(playerid, "", 0, 47, 3);
  3965.                 return 1;
  3966.             }
  3967.             new ac_s = ac_wSlot[weaponid];
  3968.             #if defined IsPlayerDying
  3969.                 if(!IsPlayerDying(playerid) && ACInfo[playerid][acWeapon][ac_s] != weaponid &&
  3970.                 ACInfo[playerid][acSetWeapon][ac_s] != weaponid && weaponid != WEAPON_FLAMETHROWER)
  3971.             #else
  3972.                 if(!ACInfo[playerid][acDead] && ACInfo[playerid][acWeapon][ac_s] != weaponid &&
  3973.                 ACInfo[playerid][acSetWeapon][ac_s] != weaponid && weaponid != WEAPON_FLAMETHROWER)
  3974.             #endif
  3975.             {
  3976.                 #if defined DEBUG
  3977.                     printf("[Nex-AC debug] Damagedid: %d, amount: %f, AC weapon: %d, weaponid: %d, bodypart: %d",
  3978.                     damagedid, amount, ACInfo[playerid][acWeapon][ac_s], weaponid, bodypart);
  3979.                 #endif
  3980.                 ac_KickWithCode(playerid, "", 0, 47, 5);
  3981.                 return 1;
  3982.             }
  3983.         }
  3984.     #else
  3985.         if(ACInfo[playerid][acACAllow][47])
  3986.         {
  3987.             if(amount < 0.0 || !(0 <= damagedid < MAX_PLAYERS) || !ac_IsValidWeapon(weaponid))
  3988.             {
  3989.                 #if defined DEBUG
  3990.                     printf("[Nex-AC debug] Damagedid: %d, amount: %f, weaponid: %d", damagedid, amount, weaponid);
  3991.                 #endif
  3992.                 ac_KickWithCode(playerid, "", 0, 47, 3);
  3993.                 return 1;
  3994.             }
  3995.             new ac_s = ac_wSlot[weaponid];
  3996.             #if defined IsPlayerDying
  3997.                 if(!IsPlayerDying(playerid) && ACInfo[playerid][acWeapon][ac_s] != weaponid &&
  3998.                 ACInfo[playerid][acSetWeapon][ac_s] != weaponid && weaponid != WEAPON_FLAMETHROWER)
  3999.             #else
  4000.                 if(!ACInfo[playerid][acDead] && ACInfo[playerid][acWeapon][ac_s] != weaponid &&
  4001.                 ACInfo[playerid][acSetWeapon][ac_s] != weaponid && weaponid != WEAPON_FLAMETHROWER)
  4002.             #endif
  4003.             {
  4004.                 #if defined DEBUG
  4005.                     printf("[Nex-AC debug] Damagedid: %d, amount: %f, AC weapon: %d, weaponid: %d",
  4006.                     damagedid, amount, ACInfo[playerid][acWeapon][ac_s], weaponid);
  4007.                 #endif
  4008.                 ac_KickWithCode(playerid, "", 0, 47, 5);
  4009.                 return 1;
  4010.             }
  4011.         }
  4012.     #endif
  4013.     #if defined ac_OnPlayerGiveDamage
  4014.         #if defined OnPlayerWeaponShot
  4015.             return ac_OnPlayerGiveDamage(playerid, damagedid, amount, weaponid, bodypart);
  4016.         #else
  4017.             return ac_OnPlayerGiveDamage(playerid, damagedid, amount, weaponid);
  4018.         #endif
  4019.     #else
  4020.         return 0;
  4021.     #endif
  4022. }
  4023.  
  4024. #if defined _ALS_OnPlayerGiveDamage
  4025.     #undef OnPlayerGiveDamage
  4026. #else
  4027.     #define _ALS_OnPlayerGiveDamage
  4028. #endif
  4029. #define OnPlayerGiveDamage ac_OnPlayerGiveDamage
  4030. #if defined ac_OnPlayerGiveDamage
  4031.     #if defined OnPlayerWeaponShot
  4032.         forward ac_OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart);
  4033.     #else
  4034.         forward ac_OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid);
  4035.     #endif
  4036. #endif
  4037.  
  4038. #endif
  4039.  
  4040. #if defined FILTERSCRIPT
  4041.  
  4042. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  4043. {
  4044.     if(dialogid != AntiCheatGetDialog(playerid))
  4045.     {
  4046.         new ac_nd = fs_AntiCheatGetNextDialog(playerid);
  4047.         if(dialogid == ac_nd) fs_AntiCheatSetDialog(playerid, ac_nd);
  4048.     }
  4049.     fs_AntiCheatSetNextDialog(playerid, -1);
  4050.     #if defined ac_fs_OnDialogResponse
  4051.         return ac_fs_OnDialogResponse(playerid, dialogid, response, listitem, inputtext);
  4052.     #else
  4053.         return 0;
  4054.     #endif
  4055. }
  4056.  
  4057. #if defined _ALS_OnDialogResponse
  4058.     #undef OnDialogResponse
  4059. #else
  4060.     #define _ALS_OnDialogResponse
  4061. #endif
  4062. #define OnDialogResponse ac_fs_OnDialogResponse
  4063. #if defined ac_fs_OnDialogResponse
  4064.     forward ac_fs_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
  4065. #endif
  4066.  
  4067. #else
  4068.  
  4069. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  4070. {
  4071.     if(ACInfo[playerid][acKicked] > 0) return 1;
  4072.     new ac_i = GetTickCount();
  4073.     if(ACInfo[playerid][acACAllow][49])
  4074.     {
  4075.         if(ac_i < ACInfo[playerid][acCall][0] + ac_Mtfc[0][0]) ac_FloodDetect(playerid, 0);
  4076.         else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  4077.         else ACInfo[playerid][acFloodCount][0] = ACInfo[playerid][acFloodCount][27] = 0;
  4078.     }
  4079.     if(ACInfo[playerid][acACAllow][39] && (dialogid != ACInfo[playerid][acDialog] || listitem < -1))
  4080.     {
  4081.         #if defined DEBUG
  4082.             printf("[Nex-AC debug] AC dialog: %d, dialogid: %d, listitem: %d, playerid: %d",
  4083.             ACInfo[playerid][acDialog], dialogid, listitem, playerid);
  4084.         #endif
  4085.         ac_KickWithCode(playerid, "", 0, 39);
  4086.         return 1;
  4087.     }
  4088.     ACInfo[playerid][acDialog] = -1;
  4089.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][0] = ac_i;
  4090.     if(ACInfo[playerid][acACAllow][45])
  4091.     {
  4092.         for(ac_i = strlen(inputtext) - 1; ac_i >= 0; --ac_i)
  4093.         {
  4094.             if(inputtext[ac_i] == '%') strdel(inputtext, ac_i, ac_i + 1);
  4095.         }
  4096.     }
  4097.     #if defined ac_OnDialogResponse
  4098.         return ac_OnDialogResponse(playerid, dialogid, response, listitem, inputtext);
  4099.     #else
  4100.         return 0;
  4101.     #endif
  4102. }
  4103.  
  4104. #if defined _ALS_OnDialogResponse
  4105.     #undef OnDialogResponse
  4106. #else
  4107.     #define _ALS_OnDialogResponse
  4108. #endif
  4109. #define OnDialogResponse ac_OnDialogResponse
  4110. #if defined ac_OnDialogResponse
  4111.     forward ac_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
  4112. #endif
  4113.  
  4114. public OnEnterExitModShop(playerid, enterexit, interiorid)
  4115. {
  4116.     if(ACInfo[playerid][acKicked] > 0) return 0;
  4117.     #if !AC_USE_TUNING_GARAGES
  4118.         if(ACInfo[playerid][acACAllow][23]) ac_KickWithCode(playerid, "", 0, 23, 1);
  4119.     #else
  4120.         if(ACInfo[playerid][acACAllow][23] &&
  4121.         (!(0 <= enterexit <= 1) || !(0 <= interiorid <= 3))) ac_KickWithCode(playerid, "", 0, 23, 7);
  4122.     #endif
  4123.     new ac_i = GetTickCount();
  4124.     if(ACInfo[playerid][acACAllow][49])
  4125.     {
  4126.         if(ac_i < ACInfo[playerid][acCall][1] + ac_Mtfc[1][0]) ac_FloodDetect(playerid, 1);
  4127.         else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  4128.         else ACInfo[playerid][acFloodCount][1] = ACInfo[playerid][acFloodCount][27] = 0;
  4129.     }
  4130.     ACInfo[playerid][acModShop] = !!enterexit;
  4131.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][1] = ac_i;
  4132.     ACInfo[playerid][acSetPosTick] = ACInfo[playerid][acGtc][19] = ac_i + 3850;
  4133.     new ac_vehid = ACInfo[playerid][acVeh];
  4134.     if(ACInfo[playerid][acKicked] < 1)
  4135.     {
  4136.         ac_i = interiorid % 256;
  4137.         ACVehInfo[ac_vehid][acInt] = ac_i;
  4138.         #if defined foreach
  4139.             foreach(new ac_j : Player)
  4140.             {
  4141.                 if(ACInfo[ac_j][acVeh] == ac_vehid) ACInfo[ac_j][acInt] = ac_i;
  4142.             }
  4143.         #else
  4144.             #if defined GetPlayerPoolSize
  4145.                 for(new ac_j = GetPlayerPoolSize(); ac_j >= 0; --ac_j)
  4146.             #else
  4147.                 for(new ac_j = MAX_PLAYERS - 1; ac_j >= 0; --ac_j)
  4148.             #endif
  4149.             {
  4150.                 if(IsPlayerInVehicle(ac_j, ac_vehid)) ACInfo[ac_j][acInt] = ac_i;
  4151.             }
  4152.         #endif
  4153.     }
  4154.     else
  4155.     {
  4156.         #if defined foreach
  4157.             foreach(new ac_j : Player)
  4158.             {
  4159.                 if(ACInfo[ac_j][acVeh] == ac_vehid)
  4160.                 {
  4161.                     if(ACInfo[ac_j][acUnFrozen]) ACInfo[ac_j][acIntRet] = 2;
  4162.                     else ACInfo[ac_j][acIntRet] = 1;
  4163.                 }
  4164.             }
  4165.         #else
  4166.             #if defined GetPlayerPoolSize
  4167.                 for(new ac_j = GetPlayerPoolSize(); ac_j >= 0; --ac_j)
  4168.             #else
  4169.                 for(new ac_j = MAX_PLAYERS - 1; ac_j >= 0; --ac_j)
  4170.             #endif
  4171.             {
  4172.                 if(IsPlayerInVehicle(ac_j, ac_vehid))
  4173.                 {
  4174.                     if(ACInfo[ac_j][acUnFrozen]) ACInfo[ac_j][acIntRet] = 2;
  4175.                     else ACInfo[ac_j][acIntRet] = 1;
  4176.                 }
  4177.             }
  4178.         #endif
  4179.     }
  4180.     #if defined ac_OnEnterExitModShop
  4181.         return ac_OnEnterExitModShop(playerid, enterexit, interiorid);
  4182.     #else
  4183.         return 1;
  4184.     #endif
  4185. }
  4186.  
  4187. #if defined _ALS_OnEnterExitModShop
  4188.     #undef OnEnterExitModShop
  4189. #else
  4190.     #define _ALS_OnEnterExitModShop
  4191. #endif
  4192. #define OnEnterExitModShop ac_OnEnterExitModShop
  4193. #if defined ac_OnEnterExitModShop
  4194.     forward ac_OnEnterExitModShop(playerid, enterexit, interiorid);
  4195. #endif
  4196.  
  4197. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  4198. {
  4199.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] > 0) return 0;
  4200.     if(ACInfo[playerid][acIntRet] > 0)
  4201.     {
  4202.         SetPlayerInterior(playerid, ACInfo[playerid][acInt]);
  4203.         if(ACInfo[playerid][acIntRet] == 2) TogglePlayerControllable(playerid, 1);
  4204.         ACInfo[playerid][acIntRet] = 0;
  4205.     }
  4206.     else if(newinteriorid != ACInfo[playerid][acSet][0])
  4207.     {
  4208.         if(ACInfo[playerid][acSet][0] == -1)
  4209.         {
  4210.             if(ACInfo[playerid][acVeh] > 0)
  4211.             {
  4212.                 if(ACInfo[playerid][acACAllow][3] && newinteriorid != ACInfo[playerid][acInt])
  4213.                 {
  4214.                     #if defined DEBUG
  4215.                         printf("[Nex-AC debug] AC interior: %d, acInt (last): %d, newinteriorid: %d, oldinteriorid: %d, veh: %d",
  4216.                         ACInfo[playerid][acSet][0], ACInfo[playerid][acInt], newinteriorid, oldinteriorid, ACInfo[playerid][acVeh]);
  4217.                     #endif
  4218.                     ac_KickWithCode(playerid, "", 0, 3, 1);
  4219.                 }
  4220.             }
  4221.             else if(ACInfo[playerid][acIntEnterExits]) ACInfo[playerid][acSetPosTick] = GetTickCount() + 3850;
  4222.             else if(ACInfo[playerid][acACAllow][2] && newinteriorid != ACInfo[playerid][acInt])
  4223.             {
  4224.                 #if defined DEBUG
  4225.                     printf("[Nex-AC debug] AC interior: %d, acInt (last): %d, newinteriorid: %d, oldinteriorid: %d",
  4226.                     ACInfo[playerid][acSet][0], ACInfo[playerid][acInt], newinteriorid, oldinteriorid);
  4227.                 #endif
  4228.                 ac_KickWithCode(playerid, "", 0, 2, 1);
  4229.             }
  4230.         }
  4231.     }
  4232.     else ACInfo[playerid][acSet][0] = -1;
  4233.     if(ACInfo[playerid][acKicked] < 1) ACInfo[playerid][acInt] = newinteriorid % 256;
  4234.     #if defined ac_OnPlayerInteriorChange
  4235.         return ac_OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
  4236.     #else
  4237.         return 1;
  4238.     #endif
  4239. }
  4240.  
  4241. #if defined _ALS_OnPlayerInteriorChange
  4242.     #undef OnPlayerInteriorChange
  4243. #else
  4244.     #define _ALS_OnPlayerInteriorChange
  4245. #endif
  4246. #define OnPlayerInteriorChange ac_OnPlayerInteriorChange
  4247. #if defined ac_OnPlayerInteriorChange
  4248.     forward ac_OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
  4249. #endif
  4250.  
  4251. public OnRconLoginAttempt(ip[], password[], success)
  4252. {
  4253.     static ac_ipTables[MAX_PLAYERS][2], ac_ipIndex;
  4254.     new ac_i, ac_currentIp = ac_IpToInt(ip);
  4255.     for(; ac_i < ac_ipIndex && ac_i < sizeof ac_ipTables; ++ac_i)
  4256.     {
  4257.         if(ac_ipTables[ac_i][0] == ac_currentIp)
  4258.         {
  4259.             if(success) ac_ipTables[ac_i][1] = 0;
  4260.             else if(ac_ACAllow[42])
  4261.             {
  4262.                 if(++ac_ipTables[ac_i][1] > AC_MAX_RCON_LOGIN_ATTEMPT)
  4263.                 {
  4264.                     #if defined DEBUG
  4265.                         printf(DEBUG_CODE_4, ip, password);
  4266.                     #endif
  4267.                     ac_ipTables[ac_i][1] = 0;
  4268.                     ac_KickWithCode(INVALID_PLAYER_ID, ip, 1, 42, 1);
  4269.                 }
  4270.                 #if defined OnCheatWarning
  4271.                     else OnCheatWarning(INVALID_PLAYER_ID, ip, 1, 42, 1, ac_ipTables[ac_i][1]);
  4272.                 #endif
  4273.             }
  4274.             ac_i = -1;
  4275.             break;
  4276.         }
  4277.     }
  4278.     if(ac_i != -1 && !success)
  4279.     {
  4280.         ac_ipTables[ac_ipIndex][0] = ac_currentIp;
  4281.         if(ac_ACAllow[42])
  4282.         {
  4283.             if(++ac_ipTables[ac_ipIndex][1] > AC_MAX_RCON_LOGIN_ATTEMPT)
  4284.             {
  4285.                 #undef AC_MAX_RCON_LOGIN_ATTEMPT
  4286.                 #if defined DEBUG
  4287.                     printf(DEBUG_CODE_4, ip, password, ac_ipTables[ac_ipIndex][1]);
  4288.                 #endif
  4289.                 ac_ipTables[ac_ipIndex][1] = 0;
  4290.                 ac_KickWithCode(INVALID_PLAYER_ID, ip, 1, 42, 2);
  4291.             }
  4292.             #if defined OnCheatWarning
  4293.                 else OnCheatWarning(INVALID_PLAYER_ID, ip, 1, 42, 2, ac_ipTables[ac_ipIndex][1]);
  4294.             #endif
  4295.         }
  4296.         if(++ac_ipIndex >= sizeof ac_ipTables) ac_ipIndex = 0;
  4297.         ac_ipTables[ac_ipIndex][1] = 0;
  4298.     }
  4299.     #if defined ac_OnRconLoginAttempt
  4300.         return ac_OnRconLoginAttempt(ip, password, success);
  4301.     #else
  4302.         return 1;
  4303.     #endif
  4304. }
  4305.  
  4306. #if defined _ALS_OnRconLoginAttempt
  4307.     #undef OnRconLoginAttempt
  4308. #else
  4309.     #define _ALS_OnRconLoginAttempt
  4310. #endif
  4311. #define OnRconLoginAttempt ac_OnRconLoginAttempt
  4312. #if defined ac_OnRconLoginAttempt
  4313.     forward ac_OnRconLoginAttempt(ip[], password[], success);
  4314. #endif
  4315.  
  4316. public OnPlayerUpdate(playerid)
  4317. {
  4318.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] > 0) return 0;
  4319.     new ac_gtc = GetTickCount(), ac_gpp;
  4320.     #if AC_USE_NPC
  4321.         if(!IsPlayerNPC(playerid))
  4322.         {
  4323.     #endif
  4324.         new ac_w, ac_sa = GetPlayerState(playerid);
  4325.         if(ac_sa != PLAYER_STATE_SPECTATING && (ac_w = GetPlayerWeapon(playerid)) != -1)
  4326.         {
  4327.             ac_gpp = GetPlayerPing(playerid);
  4328.             new ac_a = GetPlayerAmmo(playerid), ac_s = ac_wSlot[ac_w];
  4329.             if(ACInfo[playerid][acSet][3] > 0)
  4330.             {
  4331.                 if(ACInfo[playerid][acSet][3] == ac_w)
  4332.                 {
  4333.                     ACInfo[playerid][acSet][3] = ACInfo[playerid][acSetWeapon][ac_s] = -1;
  4334.                     ACInfo[playerid][acWeapon][ac_s] = ac_w;
  4335.                 }
  4336.                 else if(ACInfo[playerid][acGiveAmmo][ac_wSlot[ACInfo[playerid][acSet][3]]] == 0 ||
  4337.                 ac_wSlot[ACInfo[playerid][acSet][3]] != ac_s && ac_gtc > ACInfo[playerid][acGtc][2] + ac_gpp) ACInfo[playerid][acSet][3] = -1;
  4338.                 else if(!(PLAYER_STATE_DRIVER <= ac_sa <= PLAYER_STATE_PASSENGER) && ac_gtc > ACInfo[playerid][acGtc][2] + ac_gpp)
  4339.                 {
  4340.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][0])
  4341.                     {
  4342.                         if(++ACInfo[playerid][acNOPCount][0] > AC_MAX_NOP_WARNINGS)
  4343.                         {
  4344.                             #if defined DEBUG
  4345.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerArmedWeapon");
  4346.                                 printf("[Nex-AC debug] AC weapon: %d, weaponid: %d", ACInfo[playerid][acSet][3], ac_w);
  4347.                             #endif
  4348.                             #if defined OnCheatDetected
  4349.                                 ac_KickWithCode(playerid, "", 0, 52, 1);
  4350.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4351.                                 ACInfo[playerid][acSetWeapon][ac_s] = ACInfo[playerid][acSet][3] = -1;
  4352.                             #else
  4353.                                 return ac_KickWithCode(playerid, "", 0, 52, 1);
  4354.                             #endif
  4355.                         }
  4356.                         #if defined OnNOPWarning
  4357.                             else OnNOPWarning(playerid, 1, ACInfo[playerid][acNOPCount][0]);
  4358.                         #endif
  4359.                     }
  4360.                     else if(++ACInfo[playerid][acNOPCount][0] > AC_MAX_NOP_WARNINGS)
  4361.                     {
  4362.                         ACInfo[playerid][acSetWeapon][ac_s] =
  4363.                         ACInfo[playerid][acSet][3] = -1;
  4364.                     }
  4365.                 }
  4366.             }
  4367.             if(ACInfo[playerid][acGiveAmmo][ac_s] != -65535)
  4368.             {
  4369.                 if(ACInfo[playerid][acGiveAmmo][ac_s] == ac_a ||
  4370.                 ACInfo[playerid][acGiveAmmo][ac_s] > ac_a && !(ac_a < 0 <= ACInfo[playerid][acGiveAmmo][ac_s]) &&
  4371.                 ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_s] + ac_gpp)
  4372.                 {
  4373.                     ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  4374.                     ACInfo[playerid][acAmmo][ac_s] = ac_a;
  4375.                 }
  4376.                 else if(ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_s] + ac_gpp)
  4377.                 {
  4378.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][1])
  4379.                     {
  4380.                         if(++ACInfo[playerid][acNOPCount][1] > AC_MAX_NOP_WARNINGS)
  4381.                         {
  4382.                             #if defined DEBUG
  4383.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerAmmo");
  4384.                                 printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  4385.                                 ACInfo[playerid][acGiveAmmo][ac_s], ac_a, ac_w);
  4386.                             #endif
  4387.                             #if defined OnCheatDetected
  4388.                                 ac_KickWithCode(playerid, "", 0, 52, 2);
  4389.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4390.                                 ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  4391.                             #else
  4392.                                 return ac_KickWithCode(playerid, "", 0, 52, 2);
  4393.                             #endif
  4394.                         }
  4395.                         #if defined OnNOPWarning
  4396.                             else OnNOPWarning(playerid, 2, ACInfo[playerid][acNOPCount][1]);
  4397.                         #endif
  4398.                     }
  4399.                     else if(++ACInfo[playerid][acNOPCount][1] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  4400.                 }
  4401.             }
  4402.             #if AC_USE_AMMUNATIONS || AC_USE_TUNING_GARAGES
  4403.                 new ac_money = orig_GetPlayerMoney(playerid);
  4404.             #endif
  4405.             #if AC_USE_AMMUNATIONS
  4406.                 if(ACInfo[playerid][acSet][10] != -1)
  4407.                 {
  4408.                     if(ac_money < ACInfo[playerid][acMoney] &&
  4409.                     ACInfo[playerid][acSet][10] <= ACInfo[playerid][acMoney] - ac_money) ACInfo[playerid][acSet][10] = -1;
  4410.                     else if(ac_gtc > ACInfo[playerid][acGtc][15] + ac_gpp)
  4411.                     {
  4412.                         if(ACInfo[playerid][acACAllow][15])
  4413.                         {
  4414.                             if(++ACInfo[playerid][acCheatCount][10] > AC_MAX_NOP_WARNINGS)
  4415.                             {
  4416.                                 #if defined DEBUG
  4417.                                     printf("[Nex-AC debug] Money: %d, old money: %d, price: %d",
  4418.                                     ac_money, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][10]);
  4419.                                 #endif
  4420.                                 #if defined OnCheatDetected
  4421.                                     ac_KickWithCode(playerid, "", 0, 15, 3);
  4422.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4423.                                     ACInfo[playerid][acSet][10] = -1;
  4424.                                 #else
  4425.                                     return ac_KickWithCode(playerid, "", 0, 15, 3);
  4426.                                 #endif
  4427.                             }
  4428.                             #if defined OnCheatWarning
  4429.                                 else OnCheatWarning(playerid, "", 0, 15, 3, ACInfo[playerid][acCheatCount][10]);
  4430.                             #endif
  4431.                         }
  4432.                         else if(++ACInfo[playerid][acCheatCount][10] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][10] = -1;
  4433.                     }
  4434.                 }
  4435.             #endif
  4436.             new ac_i = GetPlayerInterior(playerid), Float:ac_pX, Float:ac_pY, Float:ac_pZ, Float:ac_tmp;
  4437.             GetPlayerPos(playerid, ac_pX, ac_pY, ac_pZ);
  4438.             if(ACInfo[playerid][acLastWeapon] != ac_w)
  4439.             {
  4440.                 if(ACInfo[playerid][acWeapon][ac_s] != ac_w && ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp)
  4441.                 {
  4442.                     #if AC_USE_PICKUP_WEAPONS
  4443.                         #if defined Streamer_GetDistanceToItem\
  4444.                             && defined Streamer_GetIntData
  4445.                         if(ACInfo[playerid][acLastPickup] > MAX_PICKUPS) Streamer_GetDistanceToItem(ac_pX, ac_pY, ac_pZ, STREAMER_TYPE_PICKUP, ACInfo[playerid][acLastPickup] - MAX_PICKUPS, ac_tmp);
  4446.                         if(0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS && ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
  4447.                         ac_a <= (3 <= ac_s <= 5 ? (ACInfo[playerid][acAmmo][ac_s] + ac_pAmmo[ac_w]) : ac_pAmmo[ac_w]) &&
  4448.                         IsPlayerInRangeOfPoint(playerid, 15.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
  4449.                         ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]) ||
  4450.                         ACInfo[playerid][acLastPickup] > MAX_PICKUPS &&
  4451.                         Streamer_GetIntData(STREAMER_TYPE_PICKUP, ACInfo[playerid][acLastPickup] - MAX_PICKUPS, E_STREAMER_EXTRA_ID) == ac_w + 100 &&
  4452.                         ac_a <= (3 <= ac_s <= 5 ? (ACInfo[playerid][acAmmo][ac_s] + ac_pAmmo[ac_w]) : ac_pAmmo[ac_w]) && ac_tmp <= 15.0)
  4453.                         #else
  4454.                         if(0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS && ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
  4455.                         ac_a <= (3 <= ac_s <= 5 ? (ACInfo[playerid][acAmmo][ac_s] + ac_pAmmo[ac_w]) : ac_pAmmo[ac_w]) &&
  4456.                         IsPlayerInRangeOfPoint(playerid, 15.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
  4457.                         ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]))
  4458.                         #endif
  4459.                         {
  4460.                             ACInfo[playerid][acWeapon][ac_s] = ac_w;
  4461.                             ACInfo[playerid][acAmmo][ac_s] = ac_a;
  4462.                         }
  4463.                         else
  4464.                         {
  4465.                     #endif
  4466.                         #if AC_USE_AMMUNATIONS
  4467.                             if(22 <= ac_w <= 32 && ac_InAmmuNation(playerid, ac_i))
  4468.                             {
  4469.                                 ACInfo[playerid][acCheatCount][10] = 0;
  4470.                                 if(ACInfo[playerid][acSet][10] != -1) ACInfo[playerid][acSet][10] += ac_AmmuNationInfo[ac_w - 22][0];
  4471.                                 else ACInfo[playerid][acSet][10] = ac_AmmuNationInfo[ac_w - 22][0];
  4472.                                 if(3 <= ac_s <= 5) ACInfo[playerid][acAmmo][ac_s] += ac_AmmuNationInfo[ac_w - 22][1];
  4473.                                 else ACInfo[playerid][acAmmo][ac_s] = ac_AmmuNationInfo[ac_w - 22][1];
  4474.                                 ACInfo[playerid][acWeapon][ac_s] = ac_w;
  4475.                                 ACInfo[playerid][acGtc][15] = ac_gtc + 2850;
  4476.                             }
  4477.                             else
  4478.                             {
  4479.                         #endif
  4480.                             if(ac_w == 40 || ac_w == 46 && ACInfo[playerid][acVeh] > 0 && ACInfo[playerid][acParachute] > 0)
  4481.                             {
  4482.                                 ACInfo[playerid][acWeapon][ac_s] = ac_w;
  4483.                                 ACInfo[playerid][acAmmo][ac_s] = ac_a;
  4484.                                 ACInfo[playerid][acParachute] = 0;
  4485.                             }
  4486.                             else if(ACInfo[playerid][acACAllow][15] && ACInfo[playerid][acSetWeapon][ac_s] == -1)
  4487.                             {
  4488.                                 #if defined DEBUG
  4489.                                     printf("[Nex-AC debug] AC weaponid: %d, AC ammo: %d, weaponid: %d, ammo: %d",
  4490.                                     ACInfo[playerid][acWeapon][ac_s], ACInfo[playerid][acAmmo][ac_s], ac_w, ac_a);
  4491.                                 #endif
  4492.                                 #if defined OnCheatDetected
  4493.                                     ac_KickWithCode(playerid, "", 0, 15, 1);
  4494.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4495.                                     ACInfo[playerid][acWeapon][ac_s] = ac_w;
  4496.                                     ACInfo[playerid][acAmmo][ac_s] = ac_a;
  4497.                                 #else
  4498.                                     return ac_KickWithCode(playerid, "", 0, 15, 1);
  4499.                                 #endif
  4500.                             }
  4501.                         #if AC_USE_AMMUNATIONS
  4502.                             }
  4503.                         #endif
  4504.                     #if AC_USE_PICKUP_WEAPONS
  4505.                         }
  4506.                     #endif
  4507.                 }
  4508.             }
  4509.             else if(ACInfo[playerid][acAmmo][ac_s] != ac_a && ac_sa != PLAYER_STATE_DRIVER &&
  4510.             7 <= ac_s <= 9 && ac_w != 38 && ACInfo[playerid][acGiveAmmo][ac_s] == -65535 &&
  4511.             ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp)
  4512.             {
  4513.                 if(ACInfo[playerid][acACAllow][16] &&
  4514.                 (ACInfo[playerid][acAmmo][ac_s] == 0 || ac_a > ACInfo[playerid][acAmmo][ac_s] ||
  4515.                 ac_a < 0 < ACInfo[playerid][acAmmo][ac_s]))
  4516.                 {
  4517.                     #if defined DEBUG
  4518.                         printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  4519.                         ACInfo[playerid][acAmmo][ac_s], ac_a, ac_w);
  4520.                     #endif
  4521.                     #if defined OnCheatDetected
  4522.                         ac_KickWithCode(playerid, "", 0, 16, 1);
  4523.                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4524.                     #else
  4525.                         return ac_KickWithCode(playerid, "", 0, 16, 1);
  4526.                     #endif
  4527.                 }
  4528.                 ACInfo[playerid][acAmmo][ac_s] = ac_a;
  4529.             }
  4530.             GetPlayerHealth(playerid, ac_tmp);
  4531.             new ac_health = floatround(ac_tmp, floatround_tozero);
  4532.             if(ACInfo[playerid][acSet][1] != -1)
  4533.             {
  4534.                 if(ACInfo[playerid][acSet][1] > 255)
  4535.                 {
  4536.                     ac_health += 256 * (((ACInfo[playerid][acSet][1] - (ACInfo[playerid][acSet][1] % 256)) / 256) - 1);
  4537.                     if(ACInfo[playerid][acSet][1] > ac_health + 255) ac_health += 256;
  4538.                 }
  4539.                 if(ACInfo[playerid][acSet][1] == ac_health || ACInfo[playerid][acDmgRes] ||
  4540.                 ACInfo[playerid][acSet][1] > ac_health && ac_gtc > ACInfo[playerid][acGtc][3] + ac_gpp)
  4541.                 {
  4542.                     ACInfo[playerid][acSet][1] = -1;
  4543.                     ACInfo[playerid][acDmgRes] = 0;
  4544.                 }
  4545.                 else if(ac_gtc > ACInfo[playerid][acGtc][3] + ac_gpp)
  4546.                 {
  4547.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][3])
  4548.                     {
  4549.                         if(++ACInfo[playerid][acNOPCount][3] > AC_MAX_NOP_WARNINGS)
  4550.                         {
  4551.                             #if defined DEBUG
  4552.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerHealth");
  4553.                                 printf("[Nex-AC debug] AC health: %d, health: %d", ACInfo[playerid][acSet][1], ac_health);
  4554.                             #endif
  4555.                             #if defined OnCheatDetected
  4556.                                 ac_KickWithCode(playerid, "", 0, 52, 3);
  4557.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4558.                                 ACInfo[playerid][acSet][1] = -1;
  4559.                             #else
  4560.                                 return ac_KickWithCode(playerid, "", 0, 52, 3);
  4561.                             #endif
  4562.                         }
  4563.                         #if defined OnNOPWarning
  4564.                             else OnNOPWarning(playerid, 3, ACInfo[playerid][acNOPCount][3]);
  4565.                         #endif
  4566.                     }
  4567.                     else if(++ACInfo[playerid][acNOPCount][3] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][1] = -1;
  4568.                 }
  4569.             }
  4570.             else if(ACInfo[playerid][acACAllow][12])
  4571.             {
  4572.                 if(ACInfo[playerid][acHealth] > 255)
  4573.                 {
  4574.                     ac_health += 256 * (((ACInfo[playerid][acHealth] - (ACInfo[playerid][acHealth] % 256)) / 256) - 1);
  4575.                     if(ACInfo[playerid][acHealth] > ac_health + 255) ac_health += 256;
  4576.                 }
  4577.                 if(ac_health > ACInfo[playerid][acHealth])
  4578.                 {
  4579.                     #if AC_USE_RESTAURANTS
  4580.                         if(ac_health > ACInfo[playerid][acHealth] + 70 || !ac_InRestaurant(playerid, ac_i))
  4581.                         {
  4582.                     #endif
  4583.                         #if AC_USE_VENDING_MACHINES
  4584.                             if(ac_health > ACInfo[playerid][acHealth] + 35 || !ac_NearVendingMachine(playerid, ac_i))
  4585.                             {
  4586.                         #endif
  4587.                             #if defined DEBUG
  4588.                                 printf("[Nex-AC debug] AC health: %d, health: %d", ACInfo[playerid][acHealth], ac_health);
  4589.                             #endif
  4590.                             #if defined OnCheatDetected
  4591.                                 ac_KickWithCode(playerid, "", 0, 12);
  4592.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4593.                             #else
  4594.                                 return ac_KickWithCode(playerid, "", 0, 12);
  4595.                             #endif
  4596.                         #if AC_USE_VENDING_MACHINES
  4597.                             }
  4598.                         #endif
  4599.                     #if AC_USE_RESTAURANTS
  4600.                         }
  4601.                     #endif
  4602.                 }
  4603.             }
  4604.             GetPlayerArmour(playerid, ac_tmp);
  4605.             new ac_armour = floatround(ac_tmp, floatround_tozero);
  4606.             if(ACInfo[playerid][acSet][2] != -1)
  4607.             {
  4608.                 if(ACInfo[playerid][acSet][2] > 255)
  4609.                 {
  4610.                     ac_armour += 256 * (((ACInfo[playerid][acSet][2] - (ACInfo[playerid][acSet][2] % 256)) / 256) - 1);
  4611.                     if(ACInfo[playerid][acSet][2] > ac_armour + 255) ac_armour += 256;
  4612.                 }
  4613.                 if(ACInfo[playerid][acSet][2] == ac_armour || ACInfo[playerid][acDmgRes] ||
  4614.                 ACInfo[playerid][acSet][2] > ac_armour && ac_gtc > ACInfo[playerid][acGtc][5] + ac_gpp)
  4615.                 {
  4616.                     ACInfo[playerid][acSet][2] = -1;
  4617.                     ACInfo[playerid][acDmgRes] = 0;
  4618.                 }
  4619.                 else if(ac_gtc > ACInfo[playerid][acGtc][5] + ac_gpp)
  4620.                 {
  4621.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][5])
  4622.                     {
  4623.                         if(++ACInfo[playerid][acNOPCount][5] > AC_MAX_NOP_WARNINGS)
  4624.                         {
  4625.                             #if defined DEBUG
  4626.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerArmour");
  4627.                                 printf("[Nex-AC debug] AC armour: %d, armour: %d", ACInfo[playerid][acSet][2], ac_armour);
  4628.                             #endif
  4629.                             #if defined OnCheatDetected
  4630.                                 ac_KickWithCode(playerid, "", 0, 52, 4);
  4631.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4632.                                 ACInfo[playerid][acSet][2] = -1;
  4633.                             #else
  4634.                                 return ac_KickWithCode(playerid, "", 0, 52, 4);
  4635.                             #endif
  4636.                         }
  4637.                         #if defined OnNOPWarning
  4638.                             else OnNOPWarning(playerid, 4, ACInfo[playerid][acNOPCount][5]);
  4639.                         #endif
  4640.                     }
  4641.                     else if(++ACInfo[playerid][acNOPCount][5] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][2] = -1;
  4642.                 }
  4643.             }
  4644.             else if(ACInfo[playerid][acACAllow][13])
  4645.             {
  4646.                 if(ACInfo[playerid][acArmour] > 255)
  4647.                 {
  4648.                     ac_armour += 256 * (((ACInfo[playerid][acArmour] - (ACInfo[playerid][acArmour] % 256)) / 256) - 1);
  4649.                     if(ACInfo[playerid][acArmour] > ac_armour + 255) ac_armour += 256;
  4650.                 }
  4651.                 if(ac_armour > ACInfo[playerid][acArmour])
  4652.                 {
  4653.                     #if AC_USE_AMMUNATIONS
  4654.                         if(ac_armour == 100 && ac_InAmmuNation(playerid, ac_i))
  4655.                         {
  4656.                             ACInfo[playerid][acCheatCount][10] = 0;
  4657.                             if(ACInfo[playerid][acSet][10] != -1) ACInfo[playerid][acSet][10] += 200;
  4658.                             else ACInfo[playerid][acSet][10] = 200;
  4659.                             ACInfo[playerid][acGtc][15] = ac_gtc + 2850;
  4660.                         }
  4661.                         else
  4662.                         {
  4663.                     #endif
  4664.                         #if defined DEBUG
  4665.                             printf("[Nex-AC debug] AC armour: %d, armour: %d", ACInfo[playerid][acArmour], ac_armour);
  4666.                         #endif
  4667.                         #if defined OnCheatDetected
  4668.                             ac_KickWithCode(playerid, "", 0, 13);
  4669.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4670.                         #else
  4671.                             return ac_KickWithCode(playerid, "", 0, 13);
  4672.                         #endif
  4673.                     #if AC_USE_AMMUNATIONS
  4674.                         }
  4675.                     #endif
  4676.                 }
  4677.             }
  4678.             if(ac_health < ACInfo[playerid][acHealth] || ac_armour < ACInfo[playerid][acArmour])
  4679.             {
  4680.                 ACInfo[playerid][acVehDmgRes] = false;
  4681.                 ACInfo[playerid][acCheatCount][9] = ACInfo[playerid][acDmgRes] = 0;
  4682.             }
  4683.             else if(ACInfo[playerid][acACAllow][19] &&
  4684.             ACInfo[playerid][acDmgRes] && ac_gtc > ACInfo[playerid][acGtc][14] + ac_gpp)
  4685.             {
  4686.                 ACInfo[playerid][acDmgRes] = 0;
  4687.                 ACInfo[playerid][acVehDmgRes] = false;
  4688.                 if(++ACInfo[playerid][acCheatCount][9] > AC_MAX_GODMODE_WARNINGS)
  4689.                 {
  4690.                     #undef AC_MAX_GODMODE_WARNINGS
  4691.                     #if defined DEBUG
  4692.                         printf("[Nex-AC debug] AC health: %d, health: %d, AC armour: %d, armour: %d",
  4693.                         ACInfo[playerid][acHealth], ac_health, ACInfo[playerid][acArmour], ac_armour);
  4694.                     #endif
  4695.                     #if defined OnCheatDetected
  4696.                         ac_KickWithCode(playerid, "", 0, 19);
  4697.                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4698.                         ACInfo[playerid][acCheatCount][9] = 0;
  4699.                     #else
  4700.                         return ac_KickWithCode(playerid, "", 0, 19);
  4701.                     #endif
  4702.                 }
  4703.                 #if defined OnCheatWarning
  4704.                     else OnCheatWarning(playerid, "", 0, 19, 0, ACInfo[playerid][acCheatCount][9]);
  4705.                 #endif
  4706.             }
  4707.             #if AC_USE_TUNING_GARAGES
  4708.             if(ACInfo[playerid][acSet][12] != -1)
  4709.             {
  4710.                 if(ac_money < ACInfo[playerid][acMoney] &&
  4711.                 ACInfo[playerid][acSet][12] <= ACInfo[playerid][acMoney] - ac_money) ACInfo[playerid][acSet][12] = -1;
  4712.                 else if(ac_gtc > ACInfo[playerid][acGtc][17] + ac_gpp)
  4713.                 {
  4714.                     if(ACInfo[playerid][acACAllow][23])
  4715.                     {
  4716.                         if(++ACInfo[playerid][acCheatCount][12] > AC_MAX_NOP_WARNINGS)
  4717.                         {
  4718.                             #if defined DEBUG
  4719.                                 printf("[Nex-AC debug] Money: %d, old money: %d, component price: %d",
  4720.                                 ac_money, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][12]);
  4721.                             #endif
  4722.                             #if defined OnCheatDetected
  4723.                                 ac_KickWithCode(playerid, "", 0, 23, 3);
  4724.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4725.                                 ACInfo[playerid][acSet][12] = -1;
  4726.                             #else
  4727.                                 return ac_KickWithCode(playerid, "", 0, 23, 3);
  4728.                             #endif
  4729.                         }
  4730.                         #if defined OnCheatWarning
  4731.                             else OnCheatWarning(playerid, "", 0, 23, 3, ACInfo[playerid][acCheatCount][12]);
  4732.                         #endif
  4733.                     }
  4734.                     else if(++ACInfo[playerid][acCheatCount][12] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][12] = -1;
  4735.                 }
  4736.             }
  4737.             #endif
  4738.             if(ACInfo[playerid][acSet][0] != -1 && ac_gtc > ACInfo[playerid][acGtc][0] + ac_gpp)
  4739.             {
  4740.                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][2] && ac_i != ACInfo[playerid][acSet][0])
  4741.                 {
  4742.                     if(++ACInfo[playerid][acNOPCount][2] > AC_MAX_NOP_WARNINGS)
  4743.                     {
  4744.                         #if defined DEBUG
  4745.                             printf(DEBUG_CODE_5, playerid, "SetPlayerInterior");
  4746.                             printf("[Nex-AC debug] AC interior: %d, interiorid: %d", ACInfo[playerid][acSet][0], ac_i);
  4747.                         #endif
  4748.                         #if defined OnCheatDetected
  4749.                             ac_KickWithCode(playerid, "", 0, 52, 5);
  4750.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4751.                             ACInfo[playerid][acSet][0] = -1;
  4752.                         #else
  4753.                             return ac_KickWithCode(playerid, "", 0, 52, 5);
  4754.                         #endif
  4755.                     }
  4756.                     #if defined OnNOPWarning
  4757.                         else OnNOPWarning(playerid, 5, ACInfo[playerid][acNOPCount][2]);
  4758.                     #endif
  4759.                 }
  4760.                 else if(++ACInfo[playerid][acNOPCount][2] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][0] = -1;
  4761.             }
  4762.             if(ACInfo[playerid][acSet][6] != -1 && ac_gtc > ACInfo[playerid][acGtc][12] + ac_gpp)
  4763.             {
  4764.                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][8])
  4765.                 {
  4766.                     if(++ACInfo[playerid][acNOPCount][8] > AC_MAX_NOP_WARNINGS)
  4767.                     {
  4768.                         #if defined DEBUG
  4769.                             printf(DEBUG_CODE_5, playerid, "TogglePlayerSpectating");
  4770.                         #endif
  4771.                         #if defined OnCheatDetected
  4772.                             ac_KickWithCode(playerid, "", 0, 52, 6);
  4773.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4774.                             ACInfo[playerid][acSet][6] = -1;
  4775.                         #else
  4776.                             return ac_KickWithCode(playerid, "", 0, 52, 6);
  4777.                         #endif
  4778.                     }
  4779.                     #if defined OnNOPWarning
  4780.                         else OnNOPWarning(playerid, 6, ACInfo[playerid][acNOPCount][8]);
  4781.                     #endif
  4782.                 }
  4783.                 else if(++ACInfo[playerid][acNOPCount][8] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][6] = -1;
  4784.             }
  4785.             if(ACInfo[playerid][acSet][7] != -1 && ac_gtc > ACInfo[playerid][acGtc][13] + ac_gpp)
  4786.             {
  4787.                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][9])
  4788.                 {
  4789.                     if(++ACInfo[playerid][acNOPCount][9] > AC_MAX_NOP_WARNINGS)
  4790.                     {
  4791.                         #if defined DEBUG
  4792.                             printf(DEBUG_CODE_5, playerid, "SpawnPlayer");
  4793.                             printf("[Nex-AC debug] acSet[7]: %d", ACInfo[playerid][acSet][7]);
  4794.                         #endif
  4795.                         #if defined OnCheatDetected
  4796.                             ac_KickWithCode(playerid, "", 0, 52, 7);
  4797.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4798.                             ACInfo[playerid][acSet][7] = -1;
  4799.                         #else
  4800.                             return ac_KickWithCode(playerid, "", 0, 52, 7);
  4801.                         #endif
  4802.                     }
  4803.                     #if defined OnNOPWarning
  4804.                         else OnNOPWarning(playerid, 7, ACInfo[playerid][acNOPCount][9]);
  4805.                     #endif
  4806.                 }
  4807.                 else if(++ACInfo[playerid][acNOPCount][9] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][7] = -1;
  4808.             }
  4809.             new ac_vehid = GetPlayerVehicleID(playerid);
  4810.             if(ACInfo[playerid][acSet][11] != -1 && ac_vehid > 0 && ac_gtc > ACInfo[playerid][acGtc][8] + ac_gpp)
  4811.             {
  4812.                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][11])
  4813.                 {
  4814.                     new Float:ac_vX, Float:ac_vY, Float:ac_vZ;
  4815.                     GetVehicleVelocity(ac_vehid, ac_vX, ac_vY, ac_vZ);
  4816.                     if(ac_GetSpeed(ac_vX, ac_vY, ac_vZ) <= 30)
  4817.                     {
  4818.                         #if defined DEBUG
  4819.                             printf(DEBUG_CODE_5, playerid, "RemovePlayerFromVehicle");
  4820.                             printf("[Nex-AC debug] Veh model: %d, veh: %d", GetVehicleModel(ac_vehid), ac_vehid);
  4821.                         #endif
  4822.                         #if defined OnCheatDetected
  4823.                             ac_KickWithCode(playerid, "", 0, 52, 8);
  4824.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4825.                             ACInfo[playerid][acSet][11] = -1;
  4826.                         #else
  4827.                             return ac_KickWithCode(playerid, "", 0, 52, 8);
  4828.                         #endif
  4829.                     }
  4830.                 }
  4831.                 else ACInfo[playerid][acSet][11] = -1;
  4832.             }
  4833.             ac_s = GetPlayerVehicleSeat(playerid);
  4834.             if(ACInfo[playerid][acSet][9] != -1)
  4835.             {
  4836.                 if(ACInfo[playerid][acSet][9] == ac_vehid &&
  4837.                 (ACInfo[playerid][acSet][5] == ac_s || ACInfo[playerid][acSet][5] == -1))
  4838.                 {
  4839.                     if(ACInfo[playerid][acVeh] > 0)
  4840.                     {
  4841.                         if(ac_IsAnAircraft(GetVehicleModel(ACInfo[playerid][acVeh]))) ACInfo[playerid][acParachute] = 2;
  4842.                         if(ACVehInfo[ACInfo[playerid][acVeh]][acDriver] == playerid) ACVehInfo[ACInfo[playerid][acVeh]][acDriver] = INVALID_PLAYER_ID;
  4843.                     }
  4844.                     if(ac_s == 0)
  4845.                     {
  4846.                         ACVehInfo[ac_vehid][acDriver] = playerid;
  4847.                         GetVehicleZAngle(ac_vehid, ACVehInfo[ac_vehid][acZAngle]);
  4848.                         ACInfo[playerid][acGtc][9] = ac_gtc + 1650;
  4849.                         ACInfo[playerid][acSetVehHealth] = -1.0;
  4850.                         ACInfo[playerid][acLastPosX] = ac_pX;
  4851.                         ACInfo[playerid][acLastPosY] = ac_pY;
  4852.                     }
  4853.                     ACInfo[playerid][acEnterVeh] =
  4854.                     ACInfo[playerid][acCheatCount][11] = 0;
  4855.                     ACInfo[playerid][acVehDmgRes] = false;
  4856.                     ACInfo[playerid][acEnterSeat] =
  4857.                     ACInfo[playerid][acSet][11] =
  4858.                     ACInfo[playerid][acSet][9] =
  4859.                     ACInfo[playerid][acSet][8] = -1;
  4860.                     ACInfo[playerid][acSeat] = ac_s;
  4861.                 }
  4862.                 else if(ac_gtc > ACInfo[playerid][acGtc][1] + ac_gpp)
  4863.                 {
  4864.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][7] &&
  4865.                     ACInfo[playerid][acSet][5] != -1 && ACVehInfo[ACInfo[playerid][acSet][9]][acSpawned])
  4866.                     {
  4867.                         if(++ACInfo[playerid][acNOPCount][7] > AC_MAX_NOP_WARNINGS)
  4868.                         {
  4869.                             #if defined DEBUG
  4870.                                 printf(DEBUG_CODE_5, playerid, "PutPlayerInVehicle");
  4871.                                 printf("[Nex-AC debug] AC veh: %d, veh: %d, AC seat: %d, seatid: %d",
  4872.                                 ACInfo[playerid][acSet][9], ac_vehid, ACInfo[playerid][acSet][5], ac_s);
  4873.                             #endif
  4874.                             #if defined OnCheatDetected
  4875.                                 ac_KickWithCode(playerid, "", 0, 52, 9);
  4876.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4877.                                 ACInfo[playerid][acSet][9] = -1;
  4878.                             #else
  4879.                                 return ac_KickWithCode(playerid, "", 0, 52, 9);
  4880.                             #endif
  4881.                         }
  4882.                         #if defined OnNOPWarning
  4883.                             else OnNOPWarning(playerid, 9, ACInfo[playerid][acNOPCount][7]);
  4884.                         #endif
  4885.                     }
  4886.                     else if(++ACInfo[playerid][acNOPCount][7] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][9] = -1;
  4887.                 }
  4888.             }
  4889.             else
  4890.             {
  4891.                 new Float:ac_dist_set = 25000.0;
  4892.                 if(ACInfo[playerid][acSet][8] != -1)
  4893.                 {
  4894.                     ac_dist_set = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acSetPosX], ACInfo[playerid][acSetPosY], (ACInfo[playerid][acTpToZ] ? ac_pZ : ACInfo[playerid][acSetPosZ]));
  4895.                     if(ac_dist_set < 15.0)
  4896.                     {
  4897.                         ACInfo[playerid][acSet][8] = -1;
  4898.                         ACInfo[playerid][acGtc][11] = 0;
  4899.                         ACInfo[playerid][acTpToZ] = false;
  4900.                         ACInfo[playerid][acLastPosX] = ac_pX;
  4901.                         ACInfo[playerid][acLastPosY] = ac_pY;
  4902.                         ACInfo[playerid][acPosX] = ac_pX;
  4903.                         ACInfo[playerid][acPosY] = ac_pY;
  4904.                         ACInfo[playerid][acPosZ] = ac_pZ;
  4905.                     }
  4906.                     else if(ac_gtc > ACInfo[playerid][acGtc][11] + ac_gpp)
  4907.                     {
  4908.                         if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][10])
  4909.                         {
  4910.                             if(++ACInfo[playerid][acNOPCount][10] > AC_MAX_NOP_WARNINGS)
  4911.                             {
  4912.                                 #if defined DEBUG
  4913.                                     printf(DEBUG_CODE_5, playerid, "SetPlayerPos");
  4914.                                     printf("[Nex-AC debug] Dist: %f, acSet[8]: %d", ac_dist_set, ACInfo[playerid][acSet][8]);
  4915.                                 #endif
  4916.                                 #if defined OnCheatDetected
  4917.                                     ac_KickWithCode(playerid, "", 0, 52, 10);
  4918.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4919.                                     ACInfo[playerid][acTpToZ] = false;
  4920.                                     ACInfo[playerid][acSet][8] = -1;
  4921.                                 #else
  4922.                                     return ac_KickWithCode(playerid, "", 0, 52, 10);
  4923.                                 #endif
  4924.                             }
  4925.                             #if defined OnNOPWarning
  4926.                                 else OnNOPWarning(playerid, 10, ACInfo[playerid][acNOPCount][10]);
  4927.                             #endif
  4928.                         }
  4929.                         else if(++ACInfo[playerid][acNOPCount][10] > AC_MAX_NOP_WARNINGS)
  4930.                         {
  4931.                             ACInfo[playerid][acTpToZ] = false;
  4932.                             ACInfo[playerid][acSet][8] = -1;
  4933.                         }
  4934.                     }
  4935.                 }
  4936.                 new Float:ac_vX, Float:ac_vY, Float:ac_vZ, ac_specact = GetPlayerSpecialAction(playerid),
  4937.                 Float:ac_dist = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  4938.                 if(ac_vehid > 0)
  4939.                 {
  4940.                     if(ACInfo[playerid][acVeh] > 0)
  4941.                     {
  4942.                         if(ACInfo[playerid][acVeh] != ac_vehid)
  4943.                         {
  4944.                             if(ACInfo[playerid][acACAllow][4])
  4945.                             {
  4946.                                 #if defined DEBUG
  4947.                                     printf("[Nex-AC debug] AC veh: %d, veh: %d", ACInfo[playerid][acVeh], ac_vehid);
  4948.                                 #endif
  4949.                                 #if defined OnCheatDetected
  4950.                                     ac_KickWithCode(playerid, "", 0, 4, 2);
  4951.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4952.                                 #else
  4953.                                     return ac_KickWithCode(playerid, "", 0, 4, 2);
  4954.                                 #endif
  4955.                             }
  4956.                         }
  4957.                         else if(ACInfo[playerid][acACAllow][50] && ACInfo[playerid][acSeat] != ac_s)
  4958.                         {
  4959.                             #if defined DEBUG
  4960.                                 printf("[Nex-AC debug] AC seat: %d, seatid: %d, veh model: %d",
  4961.                                 ACInfo[playerid][acSeat], ac_s, GetVehicleModel(ac_vehid));
  4962.                             #endif
  4963.                             #if defined OnCheatDetected
  4964.                                 ac_KickWithCode(playerid, "", 0, 50);
  4965.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4966.                             #else
  4967.                                 return ac_KickWithCode(playerid, "", 0, 50);
  4968.                             #endif
  4969.                         }
  4970.                     }
  4971.                     if(ac_sa == PLAYER_STATE_DRIVER)
  4972.                     {
  4973.                         if(ACInfo[playerid][acACAllow][32] && ACVehInfo[ac_vehid][acDriver] != playerid &&
  4974.                         ACVehInfo[ac_vehid][acDriver] != INVALID_PLAYER_ID)
  4975.                         {
  4976.                             #if defined DEBUG
  4977.                                 printf("[Nex-AC debug] AC driver: %d, driver: %d, veh: %d",
  4978.                                 ACVehInfo[ac_vehid][acDriver], playerid, ac_vehid);
  4979.                             #endif
  4980.                             #if defined OnCheatDetected
  4981.                                 ac_KickWithCode(playerid, "", 0, 32);
  4982.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4983.                             #else
  4984.                                 return SetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  4985.                             #endif
  4986.                         }
  4987.                         new Float:ac_vHealth;
  4988.                         GetVehicleHealth(ac_vehid, ac_vHealth);
  4989.                         if(ACInfo[playerid][acSetVehHealth] != -1.0)
  4990.                         {
  4991.                             if(ACInfo[playerid][acSetVehHealth] == ac_vHealth ||
  4992.                             ACInfo[playerid][acSetVehHealth] > ac_vHealth && ac_gtc > ACInfo[playerid][acGtc][4] + ac_gpp)
  4993.                             {
  4994.                                 ACInfo[playerid][acSetVehHealth] = -1.0;
  4995.                                 ACInfo[playerid][acVehDmgRes] = false;
  4996.                             }
  4997.                             else if(ac_gtc > ACInfo[playerid][acGtc][4] + ac_gpp)
  4998.                             {
  4999.                                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][4])
  5000.                                 {
  5001.                                     if(++ACInfo[playerid][acNOPCount][4] > AC_MAX_NOP_WARNINGS)
  5002.                                     {
  5003.                                         #if defined DEBUG
  5004.                                             printf(DEBUG_CODE_5, playerid, "SetVehicleHealth");
  5005.                                             printf("[Nex-AC debug] AC veh health: %f, veh health: %f, veh: %d",
  5006.                                             ACInfo[playerid][acSetVehHealth], ac_vHealth, ac_vehid);
  5007.                                         #endif
  5008.                                         #if defined OnCheatDetected
  5009.                                             ac_KickWithCode(playerid, "", 0, 52, 11);
  5010.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  5011.                                             ACInfo[playerid][acSetVehHealth] = -1.0;
  5012.                                         #else
  5013.                                             return ac_KickWithCode(playerid, "", 0, 52, 11);
  5014.                                         #endif
  5015.                                     }
  5016.                                     #if defined OnNOPWarning
  5017.                                         else OnNOPWarning(playerid, 11, ACInfo[playerid][acNOPCount][4]);
  5018.                                     #endif
  5019.                                 }
  5020.                                 else if(++ACInfo[playerid][acNOPCount][4] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSetVehHealth] = -1.0;
  5021.                             }
  5022.                         }
  5023.                         else if(ACInfo[playerid][acACAllow][11] &&
  5024.                         (ac_vHealth != ac_vHealth || ac_vHealth > ACVehInfo[ac_vehid][acHealth] &&
  5025.                         !ACInfo[playerid][acModShop] && ac_vHealth))
  5026.                         {
  5027.                             #if AC_USE_PAYNSPRAY
  5028.                                 if(!ac_InPayNSpray(playerid, ac_i))
  5029.                                 {
  5030.                             #endif
  5031.                                 #if defined DEBUG
  5032.                                     printf("[Nex-AC debug] AC veh health: %f, veh health: %f, veh: %d, playerid: %d",
  5033.                                     ACVehInfo[ac_vehid][acHealth], ac_vHealth, ac_vehid, playerid);
  5034.                                 #endif
  5035.                                 #if defined OnCheatDetected
  5036.                                     ac_KickWithCode(playerid, "", 0, 11);
  5037.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  5038.                                 #endif
  5039.                                 SetVehicleHealth(ac_vehid, ACVehInfo[ac_vehid][acHealth]);
  5040.                             #if AC_USE_PAYNSPRAY
  5041.                                 }
  5042.                             #endif
  5043.                         }
  5044.                         if(ACInfo[playerid][acVehDmgRes])
  5045.                         {
  5046.                             if(ac_vHealth < ACVehInfo[ac_vehid][acHealth])
  5047.                             {
  5048.                                 ACInfo[playerid][acVehDmgRes] = false;
  5049.                                 ACInfo[playerid][acCheatCount][11] = ACInfo[playerid][acDmgRes] = 0;
  5050.                             }
  5051.                             else if(ACInfo[playerid][acACAllow][20] && ac_gtc > ACInfo[playerid][acGtc][16] + ac_gpp)
  5052.                             {
  5053.                                 ACInfo[playerid][acDmgRes] = 0;
  5054.                                 ACInfo[playerid][acVehDmgRes] = false;
  5055.                                 if(++ACInfo[playerid][acCheatCount][11] > AC_MAX_GODMODE_VEH_WARNINGS)
  5056.                                 {
  5057.                                     #undef AC_MAX_GODMODE_VEH_WARNINGS
  5058.                                     #if defined DEBUG
  5059.                                         printf("[Nex-AC debug] AC veh health: %f, veh health: %f, veh: %d",
  5060.                                         ACVehInfo[ac_vehid][acHealth], ac_vHealth, ac_vehid);
  5061.                                     #endif
  5062.                                     #if defined OnCheatDetected
  5063.                                         ac_KickWithCode(playerid, "", 0, 20);
  5064.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  5065.                                         ACInfo[playerid][acCheatCount][11] = 0;
  5066.                                     #else
  5067.                                         return ac_KickWithCode(playerid, "", 0, 20);
  5068.                                     #endif
  5069.                                 }
  5070.                                 #if defined OnCheatWarning
  5071.                                     else OnCheatWarning(playerid, "", 0, 20, 0, ACInfo[playerid][acCheatCount][11]);
  5072.                                 #endif
  5073.                             }
  5074.                         }
  5075.                         GetVehicleVelocity(ac_vehid, ac_vX, ac_vY, ac_vZ);
  5076.                         new Float:ac_zAngle, ac_vsp = ac_GetSpeed(ac_vX, ac_vY, ac_vZ);
  5077.                         GetVehicleZAngle(ac_vehid, ac_zAngle);
  5078.                         if(ac_dist > 0.8)
  5079.                         {
  5080.                             if(ac_dist >= 80.0 && ac_dist > ACVehInfo[ac_vehid][acPosDiff] + ((ac_dist / 2.6) * 1.8) &&
  5081.                             ac_dist_set >= 80.0 && ac_dist_set > ACVehInfo[ac_vehid][acPosDiff] + ((ac_dist_set / 2.6) * 1.8))
  5082.                             {
  5083.                                 #if defined VectorSize
  5084.                                 if(ACInfo[playerid][acACAllow][3] && ac_gtc > ACInfo[playerid][acGtc][19] + ac_gpp &&
  5085.                                 (ACInfo[playerid][acPosZ] > -95.0 || ac_pZ - ACInfo[playerid][acPosZ] < 40.0 ||
  5086.                                 VectorSize(ac_pX - ACInfo[playerid][acPosX], ac_pY - ACInfo[playerid][acPosY], 0.0) >= 180.0 ||
  5087.                                 ++ACInfo[playerid][acCheatCount][21] > AC_MAX_TELEPORT_GLITCH_WARNINGS))
  5088.                                 #else
  5089.                                 if(ACInfo[playerid][acACAllow][3] && ac_gtc > ACInfo[playerid][acGtc][19] + ac_gpp &&
  5090.                                 (ACInfo[playerid][acPosZ] > -95.0 || ac_pZ - ACInfo[playerid][acPosZ] < 40.0 ||
  5091.                                 floatsqroot(floatpower(ac_pX - ACInfo[playerid][acPosX], 2.0) + floatpower(ac_pY - ACInfo[playerid][acPosY], 2.0)) >= 180.0 ||
  5092.                                 ++ACInfo[playerid][acCheatCount][21] > AC_MAX_TELEPORT_GLITCH_WARNINGS))
  5093.                                 #endif
  5094.                                 {
  5095.                                     #if defined DEBUG
  5096.                                         printf("[Nex-AC debug] Dist: %f, dist set: %f, old pos diff: %f, speed: %d, veh: %d",
  5097.                                         ac_dist, ac_dist_set, ACVehInfo[ac_vehid][acPosDiff], ac_vsp, ac_vehid);
  5098.                                     #endif
  5099.                                     #if defined OnCheatDetected
  5100.                                         ac_KickWithCode(playerid, "", 0, 3, 2);
  5101.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  5102.                                         ACInfo[playerid][acCheatCount][21] = 0;
  5103.                                     #else
  5104.                                         return ac_KickWithCode(playerid, "", 0, 3, 2);
  5105.                                     #endif
  5106.                                 }
  5107.                                 else
  5108.                                 {
  5109.                                     ACInfo[playerid][acLastPosX] = ac_pX;
  5110.                                     ACInfo[playerid][acLastPosY] = ac_pY;
  5111.                                 }
  5112.                             }
  5113.                             else if(ac_vsp < 12 && ac_gtc > ACInfo[playerid][acGtc][11] + ac_gpp)
  5114.                             {
  5115.                                 if(ac_dist >= 40.0 && ac_dist_set >= 40.0)
  5116.                                 {
  5117.                                     if(ACInfo[playerid][acACAllow][3])
  5118.                                     {
  5119.                                         #if defined DEBUG
  5120.                                             printf("[Nex-AC debug] Speed: %d, dist: %f, dist set: %f", ac_vsp, ac_dist, ac_dist_set);
  5121.                                         #endif
  5122.                                         #if defined OnCheatDetected
  5123.                                             ac_KickWithCode(playerid, "", 0, 3, 4);
  5124.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  5125.                                         #else
  5126.                                             return ac_KickWithCode(playerid, "", 0, 3, 4);
  5127.                                         #endif
  5128.                                     }
  5129.                                 }
  5130.                                 else if(ACInfo[playerid][acACAllow][1])
  5131.                                 {
  5132.                                     if(++ACInfo[playerid][acCheatCount][2] > AC_MAX_AIR_VEH_WARNINGS)
  5133.                                     {
  5134.                                         #if defined DEBUG
  5135.                                             printf("[Nex-AC debug] Speed: %d, dist: %f, veh: %d", ac_vsp, ac_dist, ac_vehid);
  5136.                                         #endif
  5137.                                         #if defined OnCheatDetected
  5138.                                             ac_KickWithCode(playerid, "", 0, 1, 1);
  5139.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  5140.                                             ACInfo[playerid][acCheatCount][2] = 0;
  5141.                                         #else
  5142.                                             return ac_KickWithCode(playerid, "", 0, 1, 1);
  5143.                                         #endif
  5144.                                     }
  5145. &n