Advertisement
Guest User

Nex-AC

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