Guest User

Nex-AC

a guest
Dec 2nd, 2018
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 274.14 KB | None | 0 0
  1. //Nex-AC by Nexius v1.9.42 (0.3.7-R1/R2)
  2.  
  3. #if defined _nex_ac_included
  4.     #endinput
  5. #endif
  6. #define _nex_ac_included
  7.  
  8. #include <a_samp>
  9.  
  10. #if !defined OnVehicleSirenStateChange
  11.     #error Please download SA-MP 0.3.7 server package!
  12. #endif
  13.  
  14. #if !defined FILTERSCRIPT
  15.  
  16. #if !defined DEBUG
  17.     #define DEBUG
  18. #endif
  19.  
  20. #if !defined NO_SUSPICION_LOGS
  21.     //#define NO_SUSPICION_LOGS
  22. #endif
  23.  
  24. #if defined NO_SUSPICION_LOGS
  25.     #pragma unused SUSPICION_1
  26.     #pragma unused SUSPICION_2
  27. #endif
  28.  
  29. #if !defined _nex_ac_lang_included
  30.     #include <nex-ac_en.lang>   //Localization
  31. #endif
  32.  
  33. #define NEX_AC_VERSION              "1.9.42"
  34.  
  35. #define AC_SERVER_VERSION           "0.3.7"
  36. #define AC_SERVER_DL_VERSION        "0.3.DL"
  37.  
  38. #if !defined AC_CONFIG_FILE
  39.     #define AC_CONFIG_FILE              "nex-ac_settings.cfg"
  40. #endif
  41.  
  42. #if !defined AC_MAX_CLASSES
  43.     #define AC_MAX_CLASSES              320
  44. #endif
  45.  
  46. #if !defined AC_DEFAULT_COLOR
  47.     #define AC_DEFAULT_COLOR            -1
  48. #endif
  49.  
  50. #if !defined AC_USE_VENDING_MACHINES
  51.     #define AC_USE_VENDING_MACHINES     true
  52. #endif
  53.  
  54. #if !defined AC_USE_TUNING_GARAGES
  55.     #define AC_USE_TUNING_GARAGES       true
  56. #endif
  57.  
  58. #if !defined AC_USE_PICKUP_WEAPONS
  59.     #define AC_USE_PICKUP_WEAPONS       true
  60. #endif
  61.  
  62. #if !defined AC_USE_AMMUNATIONS
  63.     #define AC_USE_AMMUNATIONS          true
  64. #endif
  65.  
  66. #if !defined AC_USE_RESTAURANTS
  67.     #define AC_USE_RESTAURANTS          true
  68. #endif
  69.  
  70. #if !defined AC_USE_PAYNSPRAY
  71.     #define AC_USE_PAYNSPRAY            true
  72. #endif
  73.  
  74. #if !defined AC_USE_CASINOS
  75.     #define AC_USE_CASINOS              true
  76. #endif
  77.  
  78. #if !defined AC_USE_QUERY
  79.     #define AC_USE_QUERY                true
  80. #endif
  81.  
  82. #if !defined AC_MAX_CONNECTS_FROM_IP
  83.     #define AC_MAX_CONNECTS_FROM_IP         1
  84. #endif
  85.  
  86. #if !defined AC_MAX_RCON_LOGIN_ATTEMPT
  87.     #define AC_MAX_RCON_LOGIN_ATTEMPT       1
  88. #endif
  89.  
  90. #if !defined AC_MAX_MSGS_REC_DIFF
  91.     #define AC_MAX_MSGS_REC_DIFF            800
  92. #endif
  93.  
  94. #if !defined AC_MAX_PING
  95.     #define AC_MAX_PING                     500
  96. #endif
  97.  
  98. #if !defined AC_MIN_TIME_RECONNECT
  99.     #define AC_MIN_TIME_RECONNECT           12      //In seconds
  100. #endif
  101.  
  102. #if !defined AC_SPEEDHACK_VEH_RESET_DELAY
  103.     #define AC_SPEEDHACK_VEH_RESET_DELAY    3       //In seconds
  104. #endif
  105.  
  106. #if !defined AC_MAX_NOP_WARNINGS
  107.     #define AC_MAX_NOP_WARNINGS             8
  108. #endif
  109.  
  110. #if !defined AC_MAX_NOP_TIMER_WARNINGS
  111.     #define AC_MAX_NOP_TIMER_WARNINGS       3
  112. #endif
  113.  
  114. #if !defined AC_MAX_PING_WARNINGS
  115.     #define AC_MAX_PING_WARNINGS            8
  116. #endif
  117.  
  118. #if !defined AC_MAX_AIR_WARNINGS
  119.     #define AC_MAX_AIR_WARNINGS             3
  120. #endif
  121.  
  122. #if !defined AC_MAX_AIR_VEH_WARNINGS
  123.     #define AC_MAX_AIR_VEH_WARNINGS         4
  124. #endif
  125.  
  126. #if !defined AC_MAX_FLYHACK_VEH_WARNINGS
  127.     #define AC_MAX_FLYHACK_VEH_WARNINGS     3
  128. #endif
  129.  
  130. #if !defined AC_MAX_FLYHACK_BIKE_WARNINGS
  131.     #define AC_MAX_FLYHACK_BIKE_WARNINGS    5
  132. #endif
  133.  
  134. #if !defined AC_MAX_CARSHOT_WARNINGS
  135.     #define AC_MAX_CARSHOT_WARNINGS         4
  136. #endif
  137.  
  138. #if !defined AC_MAX_PRO_AIM_WARNINGS
  139.     #define AC_MAX_PRO_AIM_WARNINGS         2
  140. #endif
  141.  
  142. #if !defined AC_MAX_AFK_GHOST_WARNINGS
  143.     #define AC_MAX_AFK_GHOST_WARNINGS       2
  144. #endif
  145.  
  146. #if !defined AC_MAX_RAPID_FIRE_WARNINGS
  147.     #define AC_MAX_RAPID_FIRE_WARNINGS      16
  148. #endif
  149.  
  150. #if !defined AC_MAX_AUTO_C_WARNINGS
  151.     #define AC_MAX_AUTO_C_WARNINGS          8
  152. #endif
  153.  
  154. #if !defined AC_MAX_GODMODE_WARNINGS
  155.     #define AC_MAX_GODMODE_WARNINGS         2
  156. #endif
  157.  
  158. #if !defined AC_MAX_GODMODE_VEH_WARNINGS
  159.     #define AC_MAX_GODMODE_VEH_WARNINGS     2
  160. #endif
  161.  
  162. #if !defined AC_MAX_SILENT_AIM_WARNINGS
  163.     #define AC_MAX_SILENT_AIM_WARNINGS      2
  164. #endif
  165.  
  166. #if !defined AC_MAX_FAKE_WEAPON_WARNINGS
  167.     #define AC_MAX_FAKE_WEAPON_WARNINGS     2
  168. #endif
  169.  
  170. #if !defined AC_MAX_FLYHACK_WARNINGS
  171.     #define AC_MAX_FLYHACK_WARNINGS         2
  172. #endif
  173.  
  174. #if !defined AC_MAX_SPEEDHACK_VEH_WARNINGS
  175.     #define AC_MAX_SPEEDHACK_VEH_WARNINGS   (1 * AC_SPEEDHACK_VEH_RESET_DELAY)
  176. #endif
  177.  
  178. #if !defined AC_MAX_SPEEDHACK_WARNINGS
  179.     #define AC_MAX_SPEEDHACK_WARNINGS       4
  180. #endif
  181.  
  182. #if !defined AC_MAX_CJ_RUN_WARNINGS
  183.     #define AC_MAX_CJ_RUN_WARNINGS          3
  184. #endif
  185.  
  186. #if !defined AC_MAX_MONEY_WARNINGS
  187.     #define AC_MAX_MONEY_WARNINGS           2
  188. #endif
  189.  
  190. #define ac_fpublic%0(%1) forward%0(%1); public%0(%1)
  191. #define ac_AbsoluteAngle(%0) floatadd(floatround(%0, floatround_floor) % 360, floatfract(%0))
  192. #define ac_abs(%0) (((%0) < 0) ? (-(%0)) : ((%0)))
  193.  
  194. //'ac_ACAllow' contains the default settings that will be set if no config file will be found
  195. //Don't change these values if you already have 'scriptfiles\nex-ac_settings.cfg'
  196. static bool:ac_ACAllow[] =
  197. {
  198.     true,   //0 Anti-AirBreak (onfoot)
  199.     true,   //1 Anti-AirBreak (in vehicle)
  200.     true,   //2 Anti-teleport hack (onfoot)
  201.     true,   //3 Anti-teleport hack (in vehicle)
  202.     true,   //4 Anti-teleport hack (into/between vehicles)
  203.     true,   //5 Anti-teleport hack (vehicle to player)
  204.     true,   //6 Anti-teleport hack (pickups)
  205.     true,   //7 Anti-FlyHack (onfoot)
  206.     true,   //8 Anti-FlyHack (in vehicle)
  207.     true,   //9 Anti-SpeedHack (onfoot)
  208.     true,   //10 Anti-SpeedHack (in vehicle)
  209.     true,   //11 Anti-Health hack (in vehicle)
  210.     true,   //12 Anti-Health hack (onfoot)
  211.     true,   //13 Anti-Armour hack
  212.     true,   //14 Anti-Money hack
  213.     true,   //15 Anti-Weapon hack
  214.     true,   //16 Anti-Ammo hack (add)
  215.     true,   //17 Anti-Ammo hack (infinite)
  216.     true,   //18 Anti-Special actions hack
  217.     true,   //19 Anti-GodMode from bullets (onfoot)
  218.     true,   //20 Anti-GodMode from bullets (in vehicle)
  219.     true,   //21 Anti-Invisible hack
  220.     true,   //22 Anti-lagcomp-spoof
  221.     true,   //23 Anti-Tuning hack
  222.     false,  //24 Anti-Parkour mod
  223.     true,   //25 Anti-Quick turn
  224.     true,   //26 Anti-Rapid fire
  225.     true,   //27 Anti-FakeSpawn
  226.     true,   //28 Anti-FakeKill
  227.     true,   //29 Anti-Pro Aim
  228.     true,   //30 Anti-CJ run
  229.     true,   //31 Anti-CarShot
  230.     true,   //32 Anti-CarJack
  231.     false,  //33 Anti-UnFreeze
  232.     true,   //34 Anti-AFK Ghost
  233.     true,   //35 Anti-Full Aiming
  234.  
  235.     false,  //36 Anti-Fake NPC
  236.     true,   //37 Anti-Reconnect
  237.     true,   //38 Anti-High ping
  238.     true,   //39 Anti-Dialog hack
  239.     true,   //40 Protection from the sandbox
  240.     true,   //41 Protection against an invalid version
  241.     true,   //42 Anti-Rcon hack
  242.  
  243.     true,   //43 Anti-Tuning crasher
  244.     true,   //44 Anti-Invalid seat crasher
  245.     true,   //45 Anti-Dialog crasher
  246.     true,   //46 Anti-Attached object crasher
  247.     true,   //47 Anti-Weapon Crasher
  248.  
  249.     true,   //48 Flood protection connects to one slot
  250.     true,   //49 Anti-flood callback functions
  251.     true,   //50 Anti-flood change seat
  252.  
  253.     true,   //51 Anti-Ddos
  254.  
  255.     true    //52 Anti-NOP's
  256. },
  257.  
  258. bool:ac_NOPAllow[] =
  259. {
  260.     true,   //0 Anti-NOP GivePlayerWeapon
  261.     true,   //1 Anti-NOP SetPlayerAmmo
  262.     true,   //2 Anti-NOP SetPlayerInterior
  263.     true,   //3 Anti-NOP SetPlayerHealth
  264.     true,   //4 Anti-NOP SetVehicleHealth
  265.     true,   //5 Anti-NOP SetPlayerArmour
  266.     true,   //6 Anti-NOP SetPlayerSpecialAction
  267.     true,   //7 Anti-NOP PutPlayerInVehicle
  268.     true,   //8 Anti-NOP TogglePlayerSpectating
  269.     true,   //9 Anti-NOP SpawnPlayer
  270.     true,   //10 Anti-NOP SetPlayerPos
  271.     true    //11 Anti-NOP RemovePlayerFromVehicle
  272. };
  273.  
  274. static const ac_Mtfc[][] =
  275. {
  276.     {150, 5},   //0 OnDialogResponse
  277.     {800, 2},   //1 OnEnterExitModShop
  278.     {250, 5},   //2 OnPlayerClickMap
  279.     {450, 5},   //3 OnPlayerClickPlayer
  280.     {50, 8},    //4 OnPlayerClickTextDraw
  281.     {400, 5},   //5 OnPlayerCommandText
  282.     {50, 8},    //6 OnPlayerEnterVehicle
  283.     {50, 11},   //7 OnPlayerExitVehicle
  284.     {150, 8},   //8 OnPlayerPickUpPickup
  285.     {150, 8},   //9 OnPlayerRequestClass
  286.     {150, 5},   //10 OnPlayerSelectedMenuRow
  287.     {600, 5},   //11 OnPlayerStateChange
  288.     {450, 2},   //12 OnVehicleMod
  289.     {450, 2},   //13 OnVehiclePaintjob
  290.     {450, 2},   //14 OnVehicleRespray
  291.     {300, 1},   //15 OnVehicleDeath
  292.     {450, 3},   //16 OnPlayerText
  293.     {150, 8},   //17 OnPlayerEnterCheckpoint
  294.     {150, 8},   //18 OnPlayerLeaveCheckpoint
  295.     {150, 5},   //19 OnPlayerRequestSpawn
  296.     {150, 5},   //20 OnPlayerExitedMenu
  297.     {150, 8},   //21 OnPlayerEnterRaceCheckpoint
  298.     {150, 8},   //22 OnPlayerLeaveRaceCheckpoint
  299.     {50, 8},    //23 OnPlayerClickPlayerTextDraw
  300.     {51, 9},    //24 OnVehicleDamageStatusUpdate
  301.     {150, 8},   //25 OnVehicleSirenStateChange
  302.     {150, 5},   //26 OnPlayerSelectObject
  303.     {50, 8}     //27 Cross-public
  304. },
  305.  
  306. ac_wSlot[] =
  307. {
  308.     0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10, 10, 10,
  309.     10, 8, 8, 8, 0, 0, 0, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5,
  310.     4, 6, 6, 7, 7, 7, 7, 8, 12, 9, 9, 9, 11, 11, 11
  311. },
  312.  
  313. #if AC_USE_PICKUP_WEAPONS
  314.     ac_wModel[] =
  315.     {
  316.         0, 331, 333, 334, 335, 336, 337, 338, 339, 341, 321, 322, 323, 324, 325,
  317.         326, 342, 343, 344, 0, 0, 345, 346, 347, 348, 349, 350, 351, 352, 353, 355, 356,
  318.         372, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 371
  319.     },
  320. #endif
  321.  
  322. ac_vType[] =
  323. {
  324.     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
  325.     0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  326.     0, 0, 0, 0, 0, 0, 3, 2, 5, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0,
  327.     1, 5, 5, 5, 0, 0, 0, 0, 5, 2, 0, 5, 3, 3, 0, 0, 1, 0, 0, 0,
  328.     0, 4, 0, 0, 3, 0, 0, 2, 2, 0, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0,
  329.     0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 1, 1, 1, 0, 0, 0, 0, 0, 1,
  330.     1, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  331.     0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
  332.     0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
  333.     0, 5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 1, 1, 0, 3, 0, 0, 0, 0,
  334.     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  335. },
  336.  
  337. #if AC_USE_TUNING_GARAGES
  338.     ac_cPrice[] =
  339.     {
  340.         400, 550, 200, 250, 100, 150, 80, 500, 500, 200, 1000, 220, 250, 100, 400,
  341.         500, 200, 500, 350, 300, 250, 200, 150, 350, 50, 1000, 480, 480, 770, 680, 370,
  342.         370, 170, 120, 790, 150, 500, 690, 190, 390, 500, 390, 1000, 500, 500, 510, 710,
  343.         670, 530, 810, 620, 670, 530, 130, 210, 230, 520, 430, 620, 720, 530, 180, 550, 430,
  344.         830, 850, 750, 250, 200, 550, 450, 550, 450, 1100, 1030, 980, 1560, 1620, 1200,
  345.         1030, 900, 1230, 820, 1560, 1350, 770, 100, 1500, 150, 650, 450, 100, 750,
  346.         350, 450, 350, 1000, 620, 1140, 1000, 940, 780, 830, 3250, 1610, 1540, 780, 780, 780,
  347.         1610, 1540, 0, 0, 3340, 3250, 2130, 2050, 2040, 780, 940, 780, 940, 780, 860,
  348.         780, 1120, 3340, 3250, 3340, 1650, 3380, 3290, 1590, 830, 800, 1500, 1000, 800,
  349.         580, 470, 870, 980, 150, 150, 100, 100, 490, 600, 890, 1000, 1090, 840, 910,
  350.         1200, 1030, 1030, 920, 930, 550, 1050, 1050, 950, 650, 450, 550, 850, 950,
  351.         850, 950, 970, 880, 990, 900, 950, 1000, 900, 1000, 900, 2050, 2150, 2130,
  352.         2050, 2130, 2040, 2150, 2040, 2095, 2175, 2080, 2200, 1200, 1040, 940, 1100
  353.     },
  354. #endif
  355.  
  356. ac_MaxPassengers[] =
  357. {
  358.     0x10331113, 0x11311131, 0x11331313, 0x80133301, 0x1381F110,
  359.     0x10311103, 0x10001F10, 0x11113311, 0x13113311, 0x31101100,
  360.     0x30002301, 0x11031311, 0x11111331, 0x10013111, 0x01131100,
  361.     0x11111110, 0x11100031, 0x11130221, 0x33113311, 0x11111101,
  362.     0x33101133, 0x10100550, 0x03133111, 0xFF11113F, 0x13330111,
  363.     0xFF131111, 0x0000FF3F
  364. },
  365.  
  366. ac_vMods[] =
  367. {
  368.     0x033C2700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x021A27FA, 0x00000000, 0x00FFFE00,
  369.     0x00000007, 0x0003C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  370.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x023B2785, 0x00000000, 0x00FFFE00,
  371.     0x00000007, 0x00000000, 0x00000000, 0x02BC4703, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  372.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  373.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  374.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x03BA278A, 0x00000000, 0x00FFFE00,
  375.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  376.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  377.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  378.     0x028E078A, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  379.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  380.     0x02310744, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  381.     0x00000007, 0x00000000, 0x00000000, 0x0228073A, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  382.     0x02BD4701, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x023A2780, 0x00000000, 0x00FFFE00,
  383.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  384.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  385.     0x00000007, 0x00000000, 0x00000000, 0x0228077A, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  386.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  387.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  388.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  389.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  390.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  391.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  392.     0x027A27CA, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  393.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  394.     0x0282278A, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  395.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  396.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  397.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  398.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  399.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  400.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  401.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  402.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  403.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  404.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  405.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  406.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  407.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  408.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  409.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  410.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  411.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  412.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  413.     0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  414.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  415.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  416.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  417.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  418.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  419.     0x00000007, 0x00000000, 0x00000000, 0x023E07C0, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  420.     0x03703730, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  421.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  422.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  423.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  424.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  425.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  426.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  427.     0x00000007, 0x00000000, 0x00000000, 0x031D2775, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  428.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02BE4788, 0x00000000, 0x00FFFE00,
  429.     0x00000007, 0x0003C000, 0x00000000, 0x02010771, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  430.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  431.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  432.     0x029A0FCE, 0x00000000, 0x00FFFE00, 0x00000007, 0x0000C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  433.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  434.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x03382700, 0x00000000, 0x00FFFE00,
  435.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  436.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  437.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  438.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  439.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  440.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  441.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  442.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  443.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  444.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  445.     0x00000007, 0x00000000, 0x00000000, 0x023F8795, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  446.     0x029F078C, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000, 0x029627EA, 0x00000000, 0x00FFFE00,
  447.     0x00000007, 0x0003C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  448.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  449.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  450.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  451.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  452.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x0236C782, 0x00000000, 0x00FFFE00,
  453.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  454.     0x029E1FCA, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  455.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  456.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  457.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0xFC000437, 0x00000000, 0x021C0000,
  458.     0x02000700, 0x00000000, 0x00FFFE00, 0x03FE6007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  459.     0x00001B87, 0x00000001, 0x01E00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  460.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  461.     0x00000007, 0x00000000, 0x00000000, 0x039E07D2, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  462.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x023CC700, 0x00000000, 0x00FFFE00,
  463.     0x00000007, 0x00030000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  464.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  465.     0x00000007, 0x00000000, 0x00000000, 0x038E07D6, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  466.     0x023D0709, 0x00000000, 0x00FFFE00, 0x00000007, 0x0000C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  467.     0x00000007, 0x00000000, 0x00000000, 0x029E1F8A, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  468.     0x029C077A, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000, 0x02BD076C, 0x00000000, 0x00FFFE00,
  469.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  470.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  471.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  472.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  473.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0xFFFFFE00, 0x00000007, 0x00000000, 0x000001F8,
  474.     0x02000700, 0x00000000, 0x00FFFFFE, 0x00000007, 0xC0000000, 0x00002007, 0xFE000700, 0x00000003, 0x00FFFE00,
  475.     0x00000007, 0x00003C00, 0x00000600, 0xCE000700, 0xFF800000, 0x00FFFE01, 0x00000007, 0x3C000000, 0x00000000,
  476.     0x02000700, 0x000003FC, 0x00FFFE00, 0x00000007, 0x003C0000, 0x00001800, 0x02000700, 0x00000000, 0x00FFFE00,
  477.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  478.     0x02000700, 0x007FE000, 0x00FFFE00, 0x00000007, 0x03C00000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  479.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000047, 0x0000003E, 0x3C000000,
  480.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  481.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  482.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  483.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  484.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00001C00, 0x00FFFE00,
  485.     0x0000000F, 0x00000000, 0x0003C000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x000003C0, 0xC0000000,
  486.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  487.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  488.     0x029607C2, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  489.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  490.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  491.     0x00000007, 0x00000000, 0x00000000, 0x03FFE7CF, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  492.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  493.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  494.     0x031727F1, 0x00000000, 0x00FFFE00, 0x00000007, 0x00030000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  495.     0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  496.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  497.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  498.     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  499.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  500.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  501.     0x00000007, 0x00000000, 0x00000000, 0x025627F0, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  502.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  503.     0x00000007, 0x00000000, 0x00000000, 0x039E07C2, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
  504.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  505.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  506.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  507.     0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
  508.     0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
  509.     0x00000007, 0x00000000, 0x00000000
  510. },
  511.  
  512. #if AC_USE_AMMUNATIONS
  513.     ac_AmmuNationInfo[][] =
  514.     {
  515.         {200, 30}, {600, 30}, {1200, 15},
  516.         {600, 15}, {800, 12}, {1000, 10},
  517.         {500, 60}, {2000, 90}, {3500, 120},
  518.         {4500, 150}, {300, 60}
  519.     },
  520.  
  521.     Float:ac_AmmuNations[][] =
  522.     {
  523.         {296.5541, -38.5138, 1001.5156},
  524.         {295.7008, -80.8109, 1001.5156},
  525.         {290.1963, -109.7721, 1001.5156},
  526.         {312.2592, -166.1385, 999.601}
  527.     },
  528. #endif
  529.  
  530. #if AC_USE_RESTAURANTS
  531.     Float:ac_Restaurants[][] =
  532.     {
  533.         {374.0, -119.641, 1001.4922},
  534.         {368.789, -6.857, 1001.8516},
  535.         {375.566, -68.222, 1001.5151}
  536.     },
  537. #endif
  538.  
  539. #if AC_USE_PAYNSPRAY
  540.     Float:ac_PayNSpray[][] =
  541.     {
  542.         {2064.2842, -1831.4736, 13.5469},
  543.         {-2425.7822, 1021.1392, 50.3977},
  544.         {-1420.5195, 2584.2305, 55.8433},
  545.         {487.6401, -1739.9479, 11.1385},
  546.         {1024.8651, -1024.087, 32.1016},
  547.         {-1904.7019, 284.5968, 41.0469},
  548.         {1975.2384, 2162.5088, 11.0703},
  549.         {2393.4456, 1491.5537, 10.5616},
  550.         {720.0854, -455.2807, 16.3359},
  551.         {-99.9417, 1117.9048, 19.7417}
  552.     },
  553. #endif
  554.  
  555. #if AC_USE_VENDING_MACHINES
  556.     Float:ac_vMachines[][] =
  557.     {
  558.         {-862.82, 1536.6, 21.98},
  559.         {2271.72, -76.46, 25.96},
  560.         {1277.83, 372.51, 18.95},
  561.         {662.42, -552.16, 15.71},
  562.         {201.01, -107.61, 0.89},
  563.         {-253.74, 2597.95, 62.24},
  564.         {-253.74, 2599.75, 62.24},
  565.         {-76.03, 1227.99, 19.12},
  566.         {-14.7, 1175.35, 18.95},
  567.         {-1455.11, 2591.66, 55.23},
  568.         {2352.17, -1357.15, 23.77},
  569.         {2325.97, -1645.13, 14.21},
  570.         {2139.51, -1161.48, 23.35},
  571.         {2153.23, -1016.14, 62.23},
  572.         {1928.73, -1772.44, 12.94},
  573.         {1154.72, -1460.89, 15.15},
  574.         {2480.85, -1959.27, 12.96},
  575.         {2060.11, -1897.64, 12.92},
  576.         {1729.78, -1943.04, 12.94},
  577.         {1634.1, -2237.53, 12.89},
  578.         {1789.21, -1369.26, 15.16},
  579.         {-2229.18, 286.41, 34.7},
  580.         {2319.99, 2532.85, 10.21},
  581.         {2845.72, 1295.04, 10.78},
  582.         {2503.14, 1243.69, 10.21},
  583.         {2647.69, 1129.66, 10.21},
  584.         {-2420.21, 984.57, 44.29},
  585.         {-2420.17, 985.94, 44.29},
  586.         {2085.77, 2071.35, 10.45},
  587.         {1398.84, 2222.6, 10.42},
  588.         {1659.46, 1722.85, 10.21},
  589.         {1520.14, 1055.26, 10.0},
  590.         {-1980.78, 142.66, 27.07},
  591.         {-2118.96, -423.64, 34.72},
  592.         {-2118.61, -422.41, 34.72},
  593.         {-2097.27, -398.33, 34.72},
  594.         {-2092.08, -490.05, 34.72},
  595.         {-2063.27, -490.05, 34.72},
  596.         {-2005.64, -490.05, 34.72},
  597.         {-2034.46, -490.05, 34.72},
  598.         {-2068.56, -398.33, 34.72},
  599.         {-2039.85, -398.33, 34.72},
  600.         {-2011.14, -398.33, 34.72},
  601.         {-1350.11, 492.28, 10.58},
  602.         {-1350.11, 493.85, 10.58},
  603.         {2222.36, 1602.64, 1000.06},
  604.         {2222.2, 1606.77, 1000.05},
  605.         {2155.9, 1606.77, 1000.05},
  606.         {2155.84, 1607.87, 1000.06},
  607.         {2209.9, 1607.19, 1000.05},
  608.         {2202.45, 1617.0, 1000.06},
  609.         {2209.24, 1621.21, 1000.06},
  610.         {2576.7, -1284.43, 1061.09},
  611.         {330.67, 178.5, 1020.07},
  612.         {331.92, 178.5, 1020.07},
  613.         {350.9, 206.08, 1008.47},
  614.         {361.56, 158.61, 1008.47},
  615.         {371.59, 178.45, 1020.07},
  616.         {374.89, 188.97, 1008.47},
  617.         {-19.03, -57.83, 1003.63},
  618.         {-36.14, -57.87, 1003.63},
  619.         {316.87, -140.35, 998.58},
  620.         {2225.2, -1153.42, 1025.9},
  621.         {-15.1, -140.22, 1003.63},
  622.         {-16.53, -140.29, 1003.63},
  623.         {-35.72, -140.22, 1003.63},
  624.         {373.82, -178.14, 1000.73},
  625.         {379.03, -178.88, 1000.73},
  626.         {495.96, -24.32, 1000.73},
  627.         {500.56, -1.36, 1000.73},
  628.         {501.82, -1.42, 1000.73},
  629.         {-33.87, -186.76, 1003.63},
  630.         {-32.44, -186.69, 1003.63},
  631.         {-16.11, -91.64, 1003.63},
  632.         {-17.54, -91.71, 1003.63}
  633.     },
  634. #endif
  635.  
  636. #if AC_USE_CASINOS
  637.     Float:ac_Casinos[][] =
  638.     {
  639.         {2241.2878, 1617.1624, 1006.1797, 2.0},
  640.         {2240.9736, 1604.6592, 1006.1797, 6.0},
  641.         {2242.5427, 1592.8726, 1006.1836, 6.0},
  642.         {2230.2124, 1592.1426, 1006.1832, 6.0},
  643.         {2230.4717, 1604.484, 1006.186, 6.0},
  644.         {2230.3298, 1616.9272, 1006.1799, 3.0},
  645.         {2251.9407, 1586.1736, 1006.186, 1.0},
  646.         {2218.6785, 1587.3448, 1006.1749, 1.0},
  647.         {2219.2773, 1591.7467, 1006.1867, 1.0},
  648.         {2218.5408, 1589.3229, 1006.184, 1.0},
  649.         {2218.6477, 1593.6279, 1006.1797, 1.0},
  650.         {2221.926, 1603.8285, 1006.1797, 1.0},
  651.         {2218.5095, 1603.8385, 1006.1797, 1.0},
  652.         {2219.9597, 1603.9216, 1006.1797, 1.0},
  653.         {2216.3054, 1603.7996, 1006.1819, 1.0},
  654.         {2218.731, 1619.8046, 1006.1794, 1.0},
  655.         {2218.9407, 1617.8413, 1006.1821, 1.0},
  656.         {2218.668, 1615.4681, 1006.1797, 1.0},
  657.         {2218.6418, 1613.2629, 1006.1797, 1.0},
  658.         {2252.4272, 1589.8412, 1006.1797, 5.0},
  659.         {2252.4229, 1596.6169, 1006.1797, 5.0},
  660.         {2255.1565, 1608.8784, 1006.186, 1.0},
  661.         {2254.8496, 1610.8605, 1006.1797, 1.0},
  662.         {2255.2917, 1612.9167, 1006.1797, 1.0},
  663.         {2255.033, 1614.8892, 1006.1797, 1.0},
  664.         {2255.1213, 1616.8284, 1006.1797, 1.0},
  665.         {2255.2161, 1618.8005, 1006.1797, 1.0},
  666.         {2268.5281, 1606.4894, 1006.1797, 1.0},
  667.         {2270.4922, 1606.8539, 1006.1797, 1.0},
  668.         {2272.5693, 1606.4473, 1006.1797, 1.0},
  669.         {2274.5391, 1607.0122, 1006.1797, 1.0},
  670.         {2271.8447, 1586.1633, 1006.1797, 1.0},
  671.         {2261.4844, 1586.1724, 1006.1797, 1.0},
  672.         {2257.4507, 1589.6555, 1006.1797, 5.0},
  673.         {2267.8994, 1589.8672, 1006.1797, 5.0},
  674.         {2262.8486, 1590.026, 1006.1797, 5.0},
  675.         {2272.6458, 1589.7704, 1006.1797, 5.0},
  676.         {2272.6533, 1596.5682, 1006.1797, 5.0},
  677.         {2270.4895, 1596.4606, 1006.1797, 5.0},
  678.         {2265.4441, 1596.4299, 1006.1797, 5.0},
  679.         {2260.0308, 1596.7987, 1006.1797, 5.0},
  680.         {2254.9907, 1596.241, 1006.1797, 5.0},
  681.         {1956.9524, 988.2533, 992.4688, 2.0},
  682.         {1961.6155, 993.0375, 992.4688, 2.0},
  683.         {1963.7998, 998.4406, 992.4745, 2.0},
  684.         {1936.2885, 987.1995, 992.4745, 2.0},
  685.         {1944.9768, 986.3937, 992.4688, 2.0},
  686.         {1940.7397, 990.9521, 992.4609, 2.0},
  687.         {1940.0966, 1005.8996, 992.4688, 6.0},
  688.         {1938.8785, 1014.1768, 992.4688, 6.0},
  689.         {1938.8811, 1021.4434, 992.4688, 6.0},
  690.         {1966.5975, 1006.6469, 992.4745, 6.0},
  691.         {1966.5979, 1014.1024, 992.4688, 6.0},
  692.         {1939.8351, 1029.912, 992.4688, 6.0},
  693.         {1956.854, 1047.3718, 992.4688, 6.0},
  694.         {1961.356, 1042.8112, 992.4688, 6.0},
  695.         {1963.811, 1037.1263, 992.4745, 6.0},
  696.         {1961.733, 1025.8929, 992.4688, 10.0},
  697.         {1961.708, 1010.3194, 992.4688, 10.0},
  698.         {1966.5989, 1029.7954, 992.4745, 6.0},
  699.         {1961.4139, 1017.8281, 992.4688, 10.0},
  700.         {1966.5985, 1021.7686, 992.4688, 6.0},
  701.         {1128.7106, -1.9779, 1000.6797, 1.0},
  702.         {1125.2388, 1.61, 1000.6797, 1.0},
  703.         {1125.1249, -5.0489, 1000.6797, 1.0},
  704.         {1127.4139, 3.0199, 1000.6797, 1.0},
  705.         {1135.0634, -3.8695, 1000.6797, 1.0},
  706.         {1135.0861, 0.6107, 1000.6797, 1.0},
  707.         {1132.8943, -1.7139, 1000.6797, 1.0},
  708.         {1125.3727, 3.0315, 1000.6797, 1.0},
  709.         {1119.0272, -1.4916, 1000.6924, 1.0}
  710.     },
  711. #endif
  712.  
  713. #if AC_USE_PICKUP_WEAPONS
  714.     ac_pAmmo[] =
  715.     {
  716.         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  717.         1, 1, 1, 8, 8, 8, 0, 0, 4, 30, 10, 10, 15,
  718.         10, 10, 60, 60, 80, 80, 60, 20, 10, 4, 3,
  719.         100, 500, 5, 1, 500, 500, 36, 1, 1, 1
  720.     },
  721. #endif
  722.  
  723. Float:ac_wRange[] =
  724. {
  725.     25.0, 25.0, 25.0, 30.0, 25.0, 35.0,
  726.     25.0, 35.0, 40.0, 40.0, 25.0, 55.0,
  727.     50.0, 50.0, 50.0, 4.0, 65.0
  728. };
  729.  
  730. enum acInfo
  731. {
  732.     Float:acPosX,
  733.     Float:acPosY,
  734.     Float:acPosZ,
  735.     Float:acDropJpX,
  736.     Float:acDropJpY,
  737.     Float:acDropJpZ,
  738.     Float:acSpawnPosX,
  739.     Float:acSpawnPosY,
  740.     Float:acSpawnPosZ,
  741.     Float:acSetVehHealth,
  742.     Float:acSetPosX,
  743.     Float:acSetPosY,
  744.     Float:acSetPosZ,
  745.     acSpeed,
  746.     acHealth,
  747.     acArmour,
  748.     acMoney,
  749.     acLastShot,
  750.     acLastWeapon,
  751.     acEnterVeh,
  752.     acKickVeh,
  753.     acVeh,
  754.     acSeat,
  755.     acDialog,
  756.     acNextDialog,
  757.     acInt,
  758.     acAnim,
  759.     acDmgRes,
  760.     acSpecAct,
  761.     acNextSpecAct,
  762.     acLastSpecAct,
  763.     acLastPickup,
  764.     acReloadTime,
  765.     acShotTime,
  766.     acSpawnTime,
  767.     acSetPosTime,
  768.     acUpdateTime,
  769.     acEnterVehTime,
  770.     acSpawnWeapon1,
  771.     acSpawnWeapon2,
  772.     acSpawnWeapon3,
  773.     acSpawnAmmo1,
  774.     acSpawnAmmo2,
  775.     acSpawnAmmo3,
  776.     acSpawnRes,
  777.     acTimerID,
  778.     acKickTimerID,
  779.     acParachute,
  780.     acIntRet,
  781.     acKicked,
  782.     acIp[16],
  783.     acSet[13],
  784.     acGtc[18],
  785.     acWeapon[13],
  786.     acAmmo[13],
  787.     acSetWeapon[13],
  788.     acGiveAmmo[13],
  789.     acGtcSetWeapon[13],
  790.     acGtcGiveAmmo[13],
  791.     acNOPCount[12],
  792.     acCheatCount[20],
  793.     acCall[sizeof ac_Mtfc],
  794.     acFloodCount[sizeof ac_Mtfc],
  795.     bool:acNOPAllow[sizeof ac_NOPAllow],
  796.     bool:acACAllow[sizeof ac_ACAllow],
  797.     bool:acStuntBonus,
  798.     bool:acModShop,
  799.     bool:acUnFrozen,
  800.     bool:acOnline,
  801.     bool:acDeathRes,
  802.     bool:acVehDmgRes,
  803.     bool:acSpawned,
  804.     bool:acDead,
  805.     bool:acTpToZ,
  806.     bool:acIntEnterExits,
  807.     bool:acSpec
  808. }
  809.  
  810. enum acVehInfo
  811. {
  812.     Float:acVelX,
  813.     Float:acVelY,
  814.     Float:acVelZ,
  815.     Float:acPosX,
  816.     Float:acPosY,
  817.     Float:acPosZ,
  818.     Float:acSpawnPosX,
  819.     Float:acSpawnPosY,
  820.     Float:acSpawnPosZ,
  821.     Float:acSpawnZAngle,
  822.     Float:acPosDiff,
  823.     Float:acZAngle,
  824.     Float:acHealth,
  825.     acSpeedDiff,
  826.     acDriver,
  827.     acInt,
  828.     acPaintJob,
  829.     bool:acSpawned
  830. }
  831.  
  832. enum acPickInfo
  833. {
  834.     Float:acPosX,
  835.     Float:acPosY,
  836.     Float:acPosZ,
  837.     acType,
  838.     acWeapon,
  839.     bool:acIsStatic
  840. }
  841.  
  842. static
  843.     Float:ac_ClassPos[AC_MAX_CLASSES][3],
  844.     ac_ClassWeapon[AC_MAX_CLASSES][3][2],
  845.  
  846.     ac_sInfo[6],
  847.  
  848.     ACInfo[MAX_PLAYERS][acInfo],
  849.     ACVehInfo[MAX_VEHICLES][acVehInfo],
  850.     ACPickInfo[MAX_PICKUPS][acPickInfo],
  851.  
  852.     bool:ac_IntEnterExits = true,
  853.     bool:ac_StuntBonus = true,
  854.     bool:ac_VehFriendlyFire,
  855.     bool:ac_LagCompMode,
  856.     #if !AC_USE_QUERY
  857.         bool:ac_QueryEnable,
  858.     #endif
  859.     bool:ac_RconEnable,
  860.     bool:ac_PedAnims;
  861.  
  862. ac_fpublic ac_AddStaticVehicle(vehicleid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle)
  863. {
  864.     ACVehInfo[vehicleid][acInt] =
  865.     ACVehInfo[vehicleid][acSpeedDiff] = 0;
  866.     ACVehInfo[vehicleid][acPaintJob] = 3;
  867.     ACVehInfo[vehicleid][acSpawned] = true;
  868.     ACVehInfo[vehicleid][acHealth] = 1000.0;
  869.     ACVehInfo[vehicleid][acPosDiff] =
  870.     ACVehInfo[vehicleid][acVelX] =
  871.     ACVehInfo[vehicleid][acVelY] =
  872.     ACVehInfo[vehicleid][acVelZ] = 0.0;
  873.     ACVehInfo[vehicleid][acSpawnPosX] =
  874.     ACVehInfo[vehicleid][acPosX] = spawn_x;
  875.     ACVehInfo[vehicleid][acSpawnPosY] =
  876.     ACVehInfo[vehicleid][acPosY] = spawn_y;
  877.     ACVehInfo[vehicleid][acSpawnPosZ] =
  878.     ACVehInfo[vehicleid][acPosZ] = spawn_z;
  879.     ACVehInfo[vehicleid][acSpawnZAngle] =
  880.     ACVehInfo[vehicleid][acZAngle] = z_angle;
  881.     ACVehInfo[vehicleid][acDriver] = INVALID_PLAYER_ID;
  882.     return 1;
  883. }
  884.  
  885. ac_fpublic ac_CreateVehicle(vehicleid, ac_vehicletype, Float:x, Float:y, Float:z, Float:rotation)
  886. {
  887.     ACVehInfo[vehicleid][acInt] =
  888.     ACVehInfo[vehicleid][acSpeedDiff] = 0;
  889.     ACVehInfo[vehicleid][acPaintJob] = 3;
  890.     ACVehInfo[vehicleid][acHealth] = 1000.0;
  891.     ACVehInfo[vehicleid][acPosDiff] =
  892.     ACVehInfo[vehicleid][acVelX] =
  893.     ACVehInfo[vehicleid][acVelY] =
  894.     ACVehInfo[vehicleid][acVelZ] = 0.0;
  895.     ACVehInfo[vehicleid][acSpawnPosX] =
  896.     ACVehInfo[vehicleid][acPosX] = x;
  897.     ACVehInfo[vehicleid][acSpawnPosY] =
  898.     ACVehInfo[vehicleid][acPosY] = y;
  899.     ACVehInfo[vehicleid][acSpawnPosZ] =
  900.     ACVehInfo[vehicleid][acPosZ] = z;
  901.     ACVehInfo[vehicleid][acSpawnZAngle] =
  902.     ACVehInfo[vehicleid][acZAngle] = rotation;
  903.     if(!(569 <= ac_vehicletype <= 570)) ACVehInfo[vehicleid][acSpawned] = true;
  904.     ACVehInfo[vehicleid][acDriver] = INVALID_PLAYER_ID;
  905.     return 1;
  906. }
  907.  
  908. ac_fpublic ac_AddPlayerClass(ac_classid, Float:ac_spawn_x, Float:ac_spawn_y, Float:ac_spawn_z, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo)
  909. {
  910.     if(ac_classid < AC_MAX_CLASSES)
  911.     {
  912.         #undef AC_MAX_CLASSES
  913.         ac_ClassPos[ac_classid][0] = ac_spawn_x;
  914.         ac_ClassPos[ac_classid][1] = ac_spawn_y;
  915.         ac_ClassPos[ac_classid][2] = ac_spawn_z;
  916.         ac_ClassWeapon[ac_classid][0][0] = ac_weapon1;
  917.         ac_ClassWeapon[ac_classid][0][1] = ac_weapon1_ammo;
  918.         ac_ClassWeapon[ac_classid][1][0] = ac_weapon2;
  919.         ac_ClassWeapon[ac_classid][1][1] = ac_weapon2_ammo;
  920.         ac_ClassWeapon[ac_classid][2][0] = ac_weapon3;
  921.         ac_ClassWeapon[ac_classid][2][1] = ac_weapon3_ammo;
  922.     }
  923.     return 1;
  924. }
  925.  
  926. ac_fpublic ac_SetSpawnInfo(playerid, ac_team, ac_skin, Float:ac_x, Float:ac_y, Float:ac_z, Float:ac_rotation, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo)
  927. {
  928.     if(!SetSpawnInfo(playerid, ac_team, ac_skin, ac_x, ac_y, ac_z, ac_rotation, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo)) return 0;
  929.     ACInfo[playerid][acSpawnPosX] = ac_x;
  930.     ACInfo[playerid][acSpawnPosY] = ac_y;
  931.     ACInfo[playerid][acSpawnPosZ] = ac_z;
  932.     ACInfo[playerid][acSpawnWeapon1] = ac_weapon1;
  933.     ACInfo[playerid][acSpawnAmmo1] = ac_weapon1_ammo;
  934.     ACInfo[playerid][acSpawnWeapon2] = ac_weapon2;
  935.     ACInfo[playerid][acSpawnAmmo2] = ac_weapon2_ammo;
  936.     ACInfo[playerid][acSpawnWeapon3] = ac_weapon3;
  937.     ACInfo[playerid][acSpawnAmmo3] = ac_weapon3_ammo;
  938.     return 1;
  939. }
  940.  
  941. ac_fpublic ac_AddStaticPickup(pickupid, ac_model, ac_type, Float:ac_X, Float:ac_Y, Float:ac_Z)
  942. {
  943.     #if AC_USE_PICKUP_WEAPONS
  944.         ACPickInfo[pickupid][acWeapon] = 0;
  945.         switch(ac_type)
  946.         {
  947.             case 2, 3, 15, 22:
  948.             {
  949.                 switch(ac_model)
  950.                 {
  951.                     case 370: ACPickInfo[pickupid][acType] = 2;
  952.                     case 1240: ACPickInfo[pickupid][acType] = 3;
  953.                     case 1242: ACPickInfo[pickupid][acType] = 4;
  954.                     case 321..326, 331, 333..339, 341..353, 355..369, 371, 372:
  955.                     {
  956.                         for(new ac_i = 46; ac_i >= 0; --ac_i)
  957.                         {
  958.                             if(ac_wModel[ac_i] == ac_model)
  959.                             {
  960.                                 ACPickInfo[pickupid][acType] = 1;
  961.                                 ACPickInfo[pickupid][acWeapon] = ac_i;
  962.                                 break;
  963.                             }
  964.                         }
  965.                     }
  966.                 }
  967.             }
  968.         }
  969.     #endif
  970.     ACPickInfo[pickupid][acIsStatic] = true;
  971.     ACPickInfo[pickupid][acPosX] = ac_X;
  972.     ACPickInfo[pickupid][acPosY] = ac_Y;
  973.     ACPickInfo[pickupid][acPosZ] = ac_Z;
  974.     return 1;
  975. }
  976.  
  977. ac_fpublic ac_CreatePickup(pickupid, ac_model, ac_type, Float:ac_X, Float:ac_Y, Float:ac_Z)
  978. {
  979.     #if AC_USE_PICKUP_WEAPONS
  980.         ACPickInfo[pickupid][acWeapon] = 0;
  981.         switch(ac_type)
  982.         {
  983.             case 2, 3, 15, 22:
  984.             {
  985.                 switch(ac_model)
  986.                 {
  987.                     case 370: ACPickInfo[pickupid][acType] = 2;
  988.                     case 1240: ACPickInfo[pickupid][acType] = 3;
  989.                     case 1242: ACPickInfo[pickupid][acType] = 4;
  990.                     case 321..326, 331, 333..339, 341..353, 355..369, 371, 372:
  991.                     {
  992.                         for(new ac_i = 46; ac_i >= 0; --ac_i)
  993.                         {
  994.                             if(ac_wModel[ac_i] == ac_model)
  995.                             {
  996.                                 ACPickInfo[pickupid][acType] = 1;
  997.                                 ACPickInfo[pickupid][acWeapon] = ac_i;
  998.                                 break;
  999.                             }
  1000.                         }
  1001.                     }
  1002.                 }
  1003.             }
  1004.         }
  1005.     #endif
  1006.     ACPickInfo[pickupid][acIsStatic] = false;
  1007.     ACPickInfo[pickupid][acPosX] = ac_X;
  1008.     ACPickInfo[pickupid][acPosY] = ac_Y;
  1009.     ACPickInfo[pickupid][acPosZ] = ac_Z;
  1010.     return 1;
  1011. }
  1012.  
  1013. #if AC_USE_PICKUP_WEAPONS\
  1014.     && defined Streamer_SetIntData
  1015.     #if defined STREAMER_ENABLE_TAGS
  1016.         ac_fpublic ac_CreateDynamicPickup(STREAMER_TAG_PICKUP pickupid, ac_modelid, ac_type)
  1017.     #else
  1018.         ac_fpublic ac_CreateDynamicPickup(pickupid, ac_modelid, ac_type)
  1019.     #endif
  1020.     {
  1021.         Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, 0);
  1022.         switch(ac_type)
  1023.         {
  1024.             case 2, 3, 15, 22:
  1025.             {
  1026.                 switch(ac_modelid)
  1027.                 {
  1028.                     case 370: Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, 2);
  1029.                     case 1240: Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, 3);
  1030.                     case 1242: Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, 4);
  1031.                     case 321..326, 331, 333..339, 341..353, 355..369, 371, 372:
  1032.                     {
  1033.                         for(new ac_i = 46; ac_i >= 0; --ac_i)
  1034.                         {
  1035.                             if(ac_wModel[ac_i] == ac_modelid)
  1036.                             {
  1037.                                 Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, ac_i + 100);
  1038.                                 break;
  1039.                             }
  1040.                         }
  1041.                     }
  1042.                 }
  1043.             }
  1044.         }
  1045.         return 1;
  1046.     }
  1047. #endif
  1048.  
  1049. #if defined Streamer_UpdateEx
  1050.     stock ac_Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, type = -1, compensatedtime = -1, freezeplayer = 1)
  1051.     {
  1052.         if(!Streamer_UpdateEx(playerid, x, y, z, worldid, interiorid, type, compensatedtime, freezeplayer)) return 0;
  1053.         if(compensatedtime >= 0)
  1054.         {
  1055.             ACInfo[playerid][acSet][8] = 4;
  1056.             ACInfo[playerid][acNOPCount][10] = 0;
  1057.             ACInfo[playerid][acSetPosX] = x;
  1058.             ACInfo[playerid][acSetPosY] = y;
  1059.             ACInfo[playerid][acSetPosZ] = z;
  1060.             ACInfo[playerid][acSetPosTime] =
  1061.             ACInfo[playerid][acGtc][11] = GetTickCount() + 3250;
  1062.         }
  1063.         return 1;
  1064.     }
  1065.  
  1066.     #if defined _ALS_Streamer_UpdateEx
  1067.         #undef Streamer_UpdateEx
  1068.     #else
  1069.         #define _ALS_Streamer_UpdateEx
  1070.     #endif
  1071.     #define Streamer_UpdateEx ac_Streamer_UpdateEx
  1072. #endif
  1073.  
  1074. stock ac_GetPlayerVersion(playerid, version[], len)
  1075. {
  1076.     new ac_ret = GetPlayerVersion(playerid, version, len);
  1077.     for(new ac_i = ac_ret - 1; ac_i >= 0; --ac_i)
  1078.     {
  1079.         if(version[ac_i] == '%')
  1080.         {
  1081.             strdel(version, ac_i, ac_i + 1);
  1082.             ac_ret--;
  1083.         }
  1084.     }
  1085.     return ac_ret;
  1086. }
  1087.  
  1088. #if defined _ALS_GetPlayerVersion
  1089.     #undef GetPlayerVersion
  1090. #else
  1091.     #define _ALS_GetPlayerVersion
  1092. #endif
  1093. #define GetPlayerVersion ac_GetPlayerVersion
  1094.  
  1095. stock ac_GetPlayerFacingAngle(playerid, &Float:ang)
  1096. {
  1097.     if(!GetPlayerFacingAngle(playerid, ang)) return 0;
  1098.     if(floatcmp(ang, ang) != 0) ang = 0.0;
  1099.     ang = ac_AbsoluteAngle(ang);
  1100.     return 1;
  1101. }
  1102.  
  1103. #if defined _ALS_GetPlayerFacingAngle
  1104.     #undef GetPlayerFacingAngle
  1105. #else
  1106.     #define _ALS_GetPlayerFacingAngle
  1107. #endif
  1108. #define GetPlayerFacingAngle ac_GetPlayerFacingAngle
  1109.  
  1110. stock ac_GetVehicleZAngle(vehicleid, &Float:z_angle)
  1111. {
  1112.     if(!GetVehicleZAngle(vehicleid, z_angle)) return 0;
  1113.     if(floatcmp(z_angle, z_angle) != 0) z_angle = 0.0;
  1114.     z_angle = ac_AbsoluteAngle(z_angle);
  1115.     #undef ac_AbsoluteAngle
  1116.     return 1;
  1117. }
  1118.  
  1119. #if defined _ALS_GetVehicleZAngle
  1120.     #undef GetVehicleZAngle
  1121. #else
  1122.     #define _ALS_GetVehicleZAngle
  1123. #endif
  1124. #define GetVehicleZAngle ac_GetVehicleZAngle
  1125.  
  1126. ac_fpublic ac_DestroyVehicle(vehicleid)
  1127. {
  1128.     if(!DestroyVehicle(vehicleid)) return 0;
  1129.     ACVehInfo[vehicleid][acSpawned] = false;
  1130.     return 1;
  1131. }
  1132.  
  1133. ac_fpublic ac_DestroyPickup(pickupid)
  1134. {
  1135.     if(!DestroyPickup(pickupid)) return 0;
  1136.     ACPickInfo[pickupid][acType] = 0;
  1137.     return 1;
  1138. }
  1139.  
  1140. ac_fpublic ac_DisableInteriorEnterExits()
  1141. {
  1142.     ac_IntEnterExits = false;
  1143.     return DisableInteriorEnterExits();
  1144. }
  1145.  
  1146. ac_fpublic ac_UsePlayerPedAnims()
  1147. {
  1148.     ac_PedAnims = true;
  1149.     return UsePlayerPedAnims();
  1150. }
  1151.  
  1152. ac_fpublic ac_EnableVehicleFriendlyFire()
  1153. {
  1154.     ac_VehFriendlyFire = true;
  1155.     return EnableVehicleFriendlyFire();
  1156. }
  1157.  
  1158. ac_fpublic ac_EnableStuntBonusForAll(enable)
  1159. {
  1160.     ac_StuntBonus = !!enable;
  1161.     #if defined foreach
  1162.         foreach(new ac_i : Player) ACInfo[ac_i][acStuntBonus] = ac_StuntBonus;
  1163.     #else
  1164.         for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1165.         {
  1166.             if(IsPlayerConnected(ac_i)) ACInfo[ac_i][acStuntBonus] = ac_StuntBonus;
  1167.         }
  1168.     #endif
  1169.     return EnableStuntBonusForAll(enable);
  1170. }
  1171.  
  1172. ac_fpublic ac_EnableStuntBonusForPlayer(playerid, enable)
  1173. {
  1174.     if(!EnableStuntBonusForPlayer(playerid, enable)) return 0;
  1175.     ACInfo[playerid][acStuntBonus] = !!enable;
  1176.     return 1;
  1177. }
  1178.  
  1179. ac_fpublic ac_ShowPlayerDialog(playerid, ac_dialogid)
  1180. {
  1181.     ACInfo[playerid][acDialog] = ac_dialogid;
  1182.     return 1;
  1183. }
  1184.  
  1185. ac_fpublic ac_fs_ShowPlayerDialog(playerid, ac_dialogid)
  1186. {
  1187.     ACInfo[playerid][acNextDialog] = ac_dialogid;
  1188.     return 1;
  1189. }
  1190.  
  1191. ac_fpublic ac_TogglePlayerControllable(playerid, toggle)
  1192. {
  1193.     if(!TogglePlayerControllable(playerid, toggle)) return 0;
  1194.     ACInfo[playerid][acUnFrozen] = !!toggle;
  1195.     return 1;
  1196. }
  1197.  
  1198. ac_fpublic ac_TogglePlayerSpectating(playerid, toggle)
  1199. {
  1200.     if(!TogglePlayerSpectating(playerid, toggle)) return 0;
  1201.     if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING || ACInfo[playerid][acSet][6] != -1)
  1202.     {
  1203.         if(!toggle)
  1204.         {
  1205.             if(ACInfo[playerid][acDead]) ACInfo[playerid][acSet][7] = 4;
  1206.             else
  1207.             {
  1208.                 ACInfo[playerid][acSet][3] =
  1209.                 ACInfo[playerid][acSet][4] =
  1210.                 ACInfo[playerid][acSet][6] =
  1211.                 ACInfo[playerid][acSet][8] =
  1212.                 ACInfo[playerid][acSet][9] =
  1213.                 ACInfo[playerid][acNextSpecAct] = -1;
  1214.                 for(new ac_i = 12; ac_i >= 0; --ac_i)
  1215.                 {
  1216.                     ACInfo[playerid][acSetWeapon][ac_i] = -1;
  1217.                     ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  1218.                 }
  1219.                 ACInfo[playerid][acTpToZ] = false;
  1220.                 ACInfo[playerid][acUnFrozen] = true;
  1221.                 ACInfo[playerid][acSet][7] = 1;
  1222.             }
  1223.             ACInfo[playerid][acSpawnRes]++;
  1224.             ACInfo[playerid][acSpec] = false;
  1225.             ACInfo[playerid][acSpawnTime] = ACInfo[playerid][acNOPCount][9] = 0;
  1226.             ACInfo[playerid][acGtc][13] = GetTickCount() + 2650;
  1227.         }
  1228.     }
  1229.     else if(toggle)
  1230.     {
  1231.         ACInfo[playerid][acSet][6] = 1;
  1232.         ACInfo[playerid][acNOPCount][8] = 0;
  1233.         ACInfo[playerid][acGtc][12] = GetTickCount() + 2650;
  1234.     }
  1235.     return 1;
  1236. }
  1237.  
  1238. ac_fpublic ac_SpawnPlayer(playerid)
  1239. {
  1240.     if(!SpawnPlayer(playerid)) return 0;
  1241.     if(ACInfo[playerid][acDead]) ACInfo[playerid][acSet][7] = 5;
  1242.     else
  1243.     {
  1244.         ACInfo[playerid][acSet][3] =
  1245.         ACInfo[playerid][acSet][4] =
  1246.         ACInfo[playerid][acSet][8] =
  1247.         ACInfo[playerid][acSet][9] =
  1248.         ACInfo[playerid][acNextSpecAct] = -1;
  1249.         for(new ac_i = 12; ac_i >= 0; --ac_i)
  1250.         {
  1251.             ACInfo[playerid][acSetWeapon][ac_i] = -1;
  1252.             ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  1253.         }
  1254.         ACInfo[playerid][acTpToZ] = false;
  1255.         ACInfo[playerid][acUnFrozen] = true;
  1256.         ACInfo[playerid][acSet][7] = 2;
  1257.     }
  1258.     ACInfo[playerid][acSpawnRes]++;
  1259.     ACInfo[playerid][acSpawnTime] = ACInfo[playerid][acNOPCount][9] = 0;
  1260.     ACInfo[playerid][acGtc][13] = GetTickCount() + 2650;
  1261.     return 1;
  1262. }
  1263.  
  1264. ac_fpublic ac_SetPlayerHealth(playerid, Float:ac_health)
  1265. {
  1266.     if(!SetPlayerHealth(playerid, ac_health)) return 0;
  1267.     if(floatcmp(ac_health, 0.0) == -1) ac_health = 0.0;
  1268.     ACInfo[playerid][acNOPCount][3] = 0;
  1269.     ACInfo[playerid][acSet][1] = floatround(ac_health, floatround_tozero);
  1270.     ACInfo[playerid][acGtc][3] = GetTickCount() + 2650;
  1271.     return 1;
  1272. }
  1273.  
  1274. ac_fpublic ac_SetPlayerArmour(playerid, Float:ac_armour)
  1275. {
  1276.     if(!SetPlayerArmour(playerid, ac_armour)) return 0;
  1277.     if(floatcmp(ac_armour, 0.0) == -1) ac_armour = 0.0;
  1278.     ACInfo[playerid][acNOPCount][5] = 0;
  1279.     ACInfo[playerid][acSet][2] = floatround(ac_armour, floatround_tozero);
  1280.     ACInfo[playerid][acGtc][5] = GetTickCount() + 2650;
  1281.     return 1;
  1282. }
  1283.  
  1284. ac_fpublic ac_GivePlayerWeapon(playerid, ac_weaponid, ac_ammo)
  1285. {
  1286.     if(0 <= ac_weaponid <= 18 || 22 <= ac_weaponid <= 46)
  1287.     {
  1288.         new ac_s = ac_wSlot[ac_weaponid];
  1289.         ACInfo[playerid][acNOPCount][0] = ACInfo[playerid][acNOPCount][1] = 0;
  1290.         if(16 <= ac_weaponid <= 18 || 22 <= ac_weaponid <= 43)
  1291.         {
  1292.             if(3 <= ac_s <= 5 || (ACInfo[playerid][acSetWeapon][ac_s] == -1
  1293.             ? ACInfo[playerid][acWeapon][ac_s] : ACInfo[playerid][acSetWeapon][ac_s]) == ac_weaponid)
  1294.             {
  1295.                 ACInfo[playerid][acGiveAmmo][ac_s] =
  1296.                 (ACInfo[playerid][acGiveAmmo][ac_s] == -65535 ? ACInfo[playerid][acAmmo][ac_s]
  1297.                 : ACInfo[playerid][acGiveAmmo][ac_s]) + ac_ammo;
  1298.             }
  1299.             else ACInfo[playerid][acGiveAmmo][ac_s] = ac_ammo;
  1300.             if(ACInfo[playerid][acGiveAmmo][ac_s] < -32768) ac_ammo = ACInfo[playerid][acGiveAmmo][ac_s] = -32768;
  1301.             else if(ACInfo[playerid][acGiveAmmo][ac_s] > 32767) ac_ammo = ACInfo[playerid][acGiveAmmo][ac_s] = 32767;
  1302.             ACInfo[playerid][acSetWeapon][ac_s] = ACInfo[playerid][acSet][3] = ac_weaponid;
  1303.             ACInfo[playerid][acReloadTime] = 0;
  1304.         }
  1305.         else
  1306.         {
  1307.             ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  1308.             ACInfo[playerid][acSetWeapon][ac_s] = ACInfo[playerid][acSet][3] = ac_weaponid;
  1309.         }
  1310.         ACInfo[playerid][acGtcGiveAmmo][ac_s] =
  1311.         ACInfo[playerid][acGtcSetWeapon][ac_s] = ACInfo[playerid][acGtc][2] = GetTickCount() + 2650;
  1312.     }
  1313.     return GivePlayerWeapon(playerid, ac_weaponid, ac_ammo);
  1314. }
  1315.  
  1316. ac_fpublic ac_SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo)
  1317. {
  1318.     if(ac_ammo < -32768) ac_ammo = -32768;
  1319.     else if(ac_ammo > 32767) ac_ammo = 32767;
  1320.     if(16 <= ac_weaponslot <= 43)
  1321.     {
  1322.         new ac_s = ac_wSlot[ac_weaponslot];
  1323.         if(ACInfo[playerid][acWeapon][ac_s] > 0 || ACInfo[playerid][acSetWeapon][ac_s] > 0)
  1324.         {
  1325.             ACInfo[playerid][acNOPCount][1] = 0;
  1326.             ACInfo[playerid][acGiveAmmo][ac_s] = ac_ammo;
  1327.             ACInfo[playerid][acGtcGiveAmmo][ac_s] = GetTickCount() + 2650;
  1328.         }
  1329.     }
  1330.     return SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo);
  1331. }
  1332.  
  1333. ac_fpublic ac_SetPlayerArmedWeapon(playerid, ac_weaponid)
  1334. {
  1335.     if(!SetPlayerArmedWeapon(playerid, ac_weaponid)) return 0;
  1336.     if(0 <= ac_weaponid <= 18 || 22 <= ac_weaponid <= 46)
  1337.     {
  1338.         new ac_s = ac_wSlot[ac_weaponid];
  1339.         if((ac_weaponid == ACInfo[playerid][acWeapon][ac_s] || ac_weaponid == ACInfo[playerid][acSetWeapon][ac_s]) &&
  1340.         (ACInfo[playerid][acAmmo][ac_s] != 0 || ACInfo[playerid][acGiveAmmo][ac_s] != 0))
  1341.         {
  1342.             ACInfo[playerid][acNOPCount][0] = 0;
  1343.             ACInfo[playerid][acSet][3] = ac_weaponid;
  1344.             ACInfo[playerid][acGtc][2] = GetTickCount() + 2650;
  1345.         }
  1346.     }
  1347.     return 1;
  1348. }
  1349.  
  1350. ac_fpublic ac_ResetPlayerWeapons(playerid)
  1351. {
  1352.     if(!ResetPlayerWeapons(playerid)) return 0;
  1353.     for(new ac_i = 12; ac_i >= 0; --ac_i)
  1354.     {
  1355.         ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acAmmo][ac_i] = 0;
  1356.         ACInfo[playerid][acSetWeapon][ac_i] = -1;
  1357.         ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  1358.     }
  1359.     ACInfo[playerid][acSet][3] = -1;
  1360.     ACInfo[playerid][acGtc][7] = GetTickCount() + 2650;
  1361.     return 1;
  1362. }
  1363.  
  1364. ac_fpublic ac_GivePlayerMoney(playerid, ac_money)
  1365. {
  1366.     if(!GivePlayerMoney(playerid, ac_money)) return 0;
  1367.     ACInfo[playerid][acNOPCount][11] = AC_MAX_MONEY_WARNINGS;
  1368.     ACInfo[playerid][acMoney] += ac_money;
  1369.     #undef AC_MAX_MONEY_WARNINGS
  1370.     return 1;
  1371. }
  1372.  
  1373. ac_fpublic ac_ResetPlayerMoney(playerid)
  1374. {
  1375.     if(!ResetPlayerMoney(playerid)) return 0;
  1376.     ACInfo[playerid][acNOPCount][11] = 0;
  1377.     ACInfo[playerid][acMoney] = 0;
  1378.     return 1;
  1379. }
  1380.  
  1381. static bad_GetPlayerMoney(playerid) return GetPlayerMoney(playerid);
  1382.  
  1383. ac_fpublic ac_SetPlayerSpecialAction(playerid, ac_actionid)
  1384. {
  1385.     if(!SetPlayerSpecialAction(playerid, ac_actionid)) return 0;
  1386.     if(ac_actionid == SPECIAL_ACTION_USEJETPACK || SPECIAL_ACTION_CUFFED <= ac_actionid <= SPECIAL_ACTION_CARRY ||
  1387.     (ac_actionid == SPECIAL_ACTION_USECELLPHONE || ac_actionid == 68 || SPECIAL_ACTION_DANCE1 <= ac_actionid <= SPECIAL_ACTION_DANCE4) && ACInfo[playerid][acVeh] == 0 ||
  1388.     ac_actionid == SPECIAL_ACTION_STOPUSECELLPHONE && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_USECELLPHONE ||
  1389.     (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 ||
  1390.     ac_actionid == SPECIAL_ACTION_NONE && ACInfo[playerid][acSpecAct] != SPECIAL_ACTION_DUCK &&
  1391.     ACInfo[playerid][acSpecAct] != SPECIAL_ACTION_ENTER_VEHICLE && ACInfo[playerid][acSpecAct] != SPECIAL_ACTION_HANDSUP)
  1392.     {
  1393.         ACInfo[playerid][acNOPCount][6] = 0;
  1394.         if((ac_actionid == 68 || SPECIAL_ACTION_HANDSUP <= ac_actionid <= SPECIAL_ACTION_USECELLPHONE ||
  1395.         SPECIAL_ACTION_DRINK_BEER <= ac_actionid <= SPECIAL_ACTION_CARRY) && SPECIAL_ACTION_DANCE1 <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_DANCE4 ||
  1396.         SPECIAL_ACTION_DRINK_BEER <= ac_actionid <= SPECIAL_ACTION_CARRY && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_DUCK ||
  1397.         (ac_actionid == SPECIAL_ACTION_NONE || SPECIAL_ACTION_CUFFED <= ac_actionid <= SPECIAL_ACTION_CARRY) && ACInfo[playerid][acVeh] ||
  1398.         SPECIAL_ACTION_CUFFED <= ac_actionid <= SPECIAL_ACTION_CARRY && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_ENTER_VEHICLE) ACInfo[playerid][acNextSpecAct] = ac_actionid;
  1399.         else
  1400.         {
  1401.             if(ac_actionid == SPECIAL_ACTION_STOPUSECELLPHONE) ac_actionid = SPECIAL_ACTION_NONE;
  1402.             else if(ac_actionid == SPECIAL_ACTION_USEJETPACK || ac_actionid == SPECIAL_ACTION_HANDSUP ||
  1403.             ac_actionid == 68 || SPECIAL_ACTION_DANCE1 <= ac_actionid <= SPECIAL_ACTION_DANCE4 ||
  1404.             SPECIAL_ACTION_DRINK_BEER <= ac_actionid <= SPECIAL_ACTION_DRINK_SPRUNK) ACInfo[playerid][acNextSpecAct] = ACInfo[playerid][acSpecAct];
  1405.             else ACInfo[playerid][acNextSpecAct] = -1;
  1406.             ACInfo[playerid][acSet][4] = ac_actionid;
  1407.             ACInfo[playerid][acGtc][6] = GetTickCount() + 3250;
  1408.         }
  1409.     }
  1410.     return 1;
  1411. }
  1412.  
  1413. ac_fpublic ac_SetPlayerInterior(playerid, ac_interiorid)
  1414. {
  1415.     if(!SetPlayerInterior(playerid, ac_interiorid)) return 0;
  1416.     ACInfo[playerid][acNOPCount][2] = 0;
  1417.     ACInfo[playerid][acSet][0] = ac_interiorid % 256;
  1418.     ACInfo[playerid][acGtc][0] = GetTickCount() + 3250;
  1419.     return 1;
  1420. }
  1421.  
  1422. ac_fpublic ac_SetPlayerPos(playerid, Float:ac_x, Float:ac_y, Float:ac_z)
  1423. {
  1424.     if(!SetPlayerPos(playerid, ac_x, ac_y, ac_z)) return 0;
  1425.     ACInfo[playerid][acSet][8] = 1;
  1426.     ACInfo[playerid][acNOPCount][10] = 0;
  1427.     ACInfo[playerid][acSetPosX] = ac_x;
  1428.     ACInfo[playerid][acSetPosY] = ac_y;
  1429.     ACInfo[playerid][acSetPosZ] = ac_z;
  1430.     ACInfo[playerid][acSetPosTime] =
  1431.     ACInfo[playerid][acGtc][11] = GetTickCount() + 3250;
  1432.     return 1;
  1433. }
  1434.  
  1435. ac_fpublic ac_SetPlayerPosFindZ(playerid, Float:ac_x, Float:ac_y, Float:ac_z)
  1436. {
  1437.     if(!SetPlayerPosFindZ(playerid, ac_x, ac_y, ac_z)) return 0;
  1438.     ACInfo[playerid][acSet][8] = 2;
  1439.     ACInfo[playerid][acTpToZ] = true;
  1440.     ACInfo[playerid][acNOPCount][10] = 0;
  1441.     ACInfo[playerid][acSetPosX] = ac_x;
  1442.     ACInfo[playerid][acSetPosY] = ac_y;
  1443.     ACInfo[playerid][acSetPosTime] =
  1444.     ACInfo[playerid][acGtc][11] = GetTickCount() + 3250;
  1445.     return 1;
  1446. }
  1447.  
  1448. ac_fpublic ac_SetPlayerVelocity(playerid, Float:ac_X, Float:ac_Y, Float:ac_Z)
  1449. {
  1450.     if(!SetPlayerVelocity(playerid, ac_X, ac_Y, ac_Z)) return 0;
  1451.     ACInfo[playerid][acSpeed] = ac_GetSpeed(ac_X, ac_Y, ac_Z);
  1452.     ACInfo[playerid][acGtc][10] = GetTickCount() + 800;
  1453.     return 1;
  1454. }
  1455.  
  1456. ac_fpublic ac_PutPlayerInVehicle(playerid, ac_vehicleid, ac_seatid)
  1457. {
  1458.     if(!PutPlayerInVehicle(playerid, ac_vehicleid, ac_seatid)) return 0;
  1459.     if(!(SPECIAL_ACTION_DANCE1 <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_DANCE4) &&
  1460.     !(SPECIAL_ACTION_DRINK_BEER <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_DRINK_SPRUNK) &&
  1461.     GetPlayerVirtualWorld(playerid) == GetVehicleVirtualWorld(ac_vehicleid))
  1462.     {
  1463.         new ac_model = GetVehicleModel(ac_vehicleid);
  1464.         ACInfo[playerid][acNOPCount][7] = 0;
  1465.         ACInfo[playerid][acSet][9] = ac_vehicleid;
  1466.         if(ac_model == 431 || ac_model == 437 || ac_IsVehicleSeatOccupied(ac_vehicleid, ac_seatid) ||
  1467.         ac_seatid > ac_GetMaxPassengers(ac_model)) ACInfo[playerid][acSet][5] = -1;
  1468.         else ACInfo[playerid][acSet][5] = ac_seatid;
  1469.         ACInfo[playerid][acGtc][1] = GetTickCount() + 2650;
  1470.     }
  1471.     return 1;
  1472. }
  1473.  
  1474. ac_fpublic ac_RemovePlayerFromVehicle(playerid)
  1475. {
  1476.     if(!RemovePlayerFromVehicle(playerid)) return 0;
  1477.     ACInfo[playerid][acSet][11] = 1;
  1478.     ACInfo[playerid][acGtc][8] = GetTickCount() + 4250;
  1479.     return 1;
  1480. }
  1481.  
  1482. ac_fpublic ac_SetVehiclePos(vehicleid, Float:ac_x, Float:ac_y, Float:ac_z)
  1483. {
  1484.     if(!SetVehiclePos(vehicleid, ac_x, ac_y, ac_z)) return 0;
  1485.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1486.     if(ac_driver != INVALID_PLAYER_ID)
  1487.     {
  1488.         ACInfo[ac_driver][acSet][8] = 3;
  1489.         ACInfo[ac_driver][acNOPCount][10] = 0;
  1490.         ACInfo[ac_driver][acSetPosX] = ac_x;
  1491.         ACInfo[ac_driver][acSetPosY] = ac_y;
  1492.         ACInfo[ac_driver][acSetPosZ] = ac_z;
  1493.         ACInfo[ac_driver][acSetPosTime] =
  1494.         ACInfo[ac_driver][acGtc][11] = GetTickCount() + 3250;
  1495.     }
  1496.     return 1;
  1497. }
  1498.  
  1499. ac_fpublic ac_SetVehicleVelocity(vehicleid, Float:ac_X, Float:ac_Y, Float:ac_Z)
  1500. {
  1501.     if(!SetVehicleVelocity(vehicleid, ac_X, ac_Y, ac_Z)) return 0;
  1502.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1503.     if(ac_driver != INVALID_PLAYER_ID)
  1504.     {
  1505.         ACVehInfo[vehicleid][acVelX] = ac_X;
  1506.         ACVehInfo[vehicleid][acVelY] = ac_Y;
  1507.         ACVehInfo[vehicleid][acVelZ] = ac_Z;
  1508.         ACInfo[ac_driver][acGtc][9] = GetTickCount() + 800;
  1509.     }
  1510.     return 1;
  1511. }
  1512.  
  1513. ac_fpublic ac_SetVehicleAngularVelocity(vehicleid, Float:ac_X, Float:ac_Y, Float:ac_Z)
  1514. {
  1515.     if(!SetVehicleAngularVelocity(vehicleid, ac_X, ac_Y, ac_Z)) return 0;
  1516.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1517.     if(ac_driver != INVALID_PLAYER_ID)
  1518.     {
  1519.         ACVehInfo[vehicleid][acVelX] = ac_X;
  1520.         ACVehInfo[vehicleid][acVelY] = ac_Y;
  1521.         ACVehInfo[vehicleid][acVelZ] = ac_Z;
  1522.         ACInfo[ac_driver][acGtc][9] = GetTickCount() + 800;
  1523.     }
  1524.     return 1;
  1525. }
  1526.  
  1527. ac_fpublic ac_LinkVehicleToInterior(vehicleid, ac_interiorid)
  1528. {
  1529.     if(!LinkVehicleToInterior(vehicleid, ac_interiorid)) return 0;
  1530.     ACVehInfo[vehicleid][acInt] = ac_interiorid % 256;
  1531.     return 1;
  1532. }
  1533.  
  1534. ac_fpublic ac_ChangeVehiclePaintjob(vehicleid, ac_paintjobid)
  1535. {
  1536.     if(GetVehicleModel(vehicleid) > 0) ACVehInfo[vehicleid][acPaintJob] = ac_paintjobid;
  1537.     return ChangeVehiclePaintjob(vehicleid, ac_paintjobid);
  1538. }
  1539.  
  1540. ac_fpublic ac_SetVehicleHealth(vehicleid, Float:ac_health)
  1541. {
  1542.     if(!SetVehicleHealth(vehicleid, ac_health)) return 0;
  1543.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1544.     if(ac_driver != INVALID_PLAYER_ID)
  1545.     {
  1546.         ACInfo[ac_driver][acNOPCount][4] = 0;
  1547.         ACInfo[ac_driver][acSetVehHealth] = ac_health;
  1548.         ACInfo[ac_driver][acGtc][4] = GetTickCount() + 2650;
  1549.     }
  1550.     else ACVehInfo[vehicleid][acHealth] = ac_health;
  1551.     return 1;
  1552. }
  1553.  
  1554. ac_fpublic ac_RepairVehicle(vehicleid)
  1555. {
  1556.     if(!RepairVehicle(vehicleid)) return 0;
  1557.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1558.     if(ac_driver != INVALID_PLAYER_ID)
  1559.     {
  1560.         ACInfo[ac_driver][acNOPCount][4] = 0;
  1561.         ACInfo[ac_driver][acSetVehHealth] = 1000.0;
  1562.         ACInfo[ac_driver][acGtc][4] = GetTickCount() + 2650;
  1563.     }
  1564.     else ACVehInfo[vehicleid][acHealth] = 1000.0;
  1565.     return 1;
  1566. }
  1567.  
  1568. ac_fpublic ac_SetVehicleToRespawn(vehicleid)
  1569. {
  1570.     new ac_driver = ACVehInfo[vehicleid][acDriver];
  1571.     if(ac_driver != INVALID_PLAYER_ID) ACInfo[ac_driver][acGtc][9] = GetTickCount() + 800;
  1572.     return SetVehicleToRespawn(vehicleid);
  1573. }
  1574.  
  1575. ac_fpublic ac_EnableAntiCheat(code, enable)
  1576. {
  1577.     if(!(0 <= code < sizeof ac_ACAllow)) return 0;
  1578.     if(code == 42)
  1579.     {
  1580.         if(enable)
  1581.         {
  1582.             if(!ac_ACAllow[code])
  1583.             {
  1584.                 #if !AC_USE_QUERY
  1585.                     ac_QueryEnable = !!GetServerVarAsBool("query");
  1586.                 #endif
  1587.                 ac_RconEnable = !!GetServerVarAsBool("rcon");
  1588.             }
  1589.             #if !AC_USE_QUERY
  1590.                 SendRconCommand("query 0");
  1591.             #endif
  1592.             SendRconCommand("rcon 0");
  1593.         }
  1594.         else
  1595.         {
  1596.             static ac_strtmp[9];
  1597.             #if !AC_USE_QUERY
  1598.                 format(ac_strtmp, sizeof ac_strtmp, "query %b", ac_QueryEnable);
  1599.                 SendRconCommand(ac_strtmp);
  1600.             #endif
  1601.             format(ac_strtmp, sizeof ac_strtmp, "rcon %b", ac_RconEnable);
  1602.             SendRconCommand(ac_strtmp);
  1603.         }
  1604.     }
  1605.     ac_ACAllow[code] = !!enable;
  1606.     if(enable)
  1607.     {
  1608.         #if defined foreach
  1609.             foreach(new ac_i : Player)
  1610.         #else
  1611.             for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1612.             {
  1613.                 if(IsPlayerConnected(ac_i))
  1614.         #endif
  1615.         {
  1616.             ACInfo[ac_i][acACAllow][code] = ac_ACAllow[code];
  1617.             switch(code)
  1618.             {
  1619.                 case 7: ACInfo[ac_i][acCheatCount][15] = 0;
  1620.                 case 8: ACInfo[ac_i][acCheatCount][3] = 0;
  1621.                 case 9: ACInfo[ac_i][acCheatCount][17] = 0;
  1622.                 case 10: ACInfo[ac_i][acCheatCount][16] = 0;
  1623.                 case 15: ACInfo[ac_i][acCheatCount][10] = 0;
  1624.                 case 17: ACInfo[ac_i][acCheatCount][7] = 0;
  1625.                 case 19: ACInfo[ac_i][acCheatCount][9] = 0;
  1626.                 case 20: ACInfo[ac_i][acCheatCount][11] = 0;
  1627.                 case 23: ACInfo[ac_i][acCheatCount][12] = 0;
  1628.                 case 26: ACInfo[ac_i][acCheatCount][14] = ACInfo[ac_i][acCheatCount][8] = 0;
  1629.                 case 29: ACInfo[ac_i][acCheatCount][13] = ACInfo[ac_i][acCheatCount][6] = 0;
  1630.                 case 30: ACInfo[ac_i][acCheatCount][19] = 0;
  1631.                 case 31: ACInfo[ac_i][acCheatCount][4] = 0;
  1632.                 case 34: ACInfo[ac_i][acCheatCount][5] = 0;
  1633.                 case 38: ACInfo[ac_i][acCheatCount][0] = 0;
  1634.                 case 47: ACInfo[ac_i][acCheatCount][18] = 0;
  1635.             }
  1636.         }
  1637.         #if !defined foreach
  1638.             }
  1639.         #endif
  1640.     }
  1641.     else
  1642.     {
  1643.         #if defined foreach
  1644.             foreach(new ac_i : Player) ACInfo[ac_i][acACAllow][code] = ac_ACAllow[code];
  1645.         #else
  1646.             for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1647.             {
  1648.                 if(IsPlayerConnected(ac_i)) ACInfo[ac_i][acACAllow][code] = ac_ACAllow[code];
  1649.             }
  1650.         #endif
  1651.     }
  1652.     return 1;
  1653. }
  1654.  
  1655. ac_fpublic ac_EnableAntiNOP(nopcode, enable)
  1656. {
  1657.     if(!(0 <= nopcode < sizeof ac_NOPAllow)) return 0;
  1658.     ac_NOPAllow[nopcode] = !!enable;
  1659.     #if defined foreach
  1660.         foreach(new ac_i : Player) ACInfo[ac_i][acNOPAllow][nopcode] = ac_NOPAllow[nopcode];
  1661.     #else
  1662.         for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  1663.         {
  1664.             if(IsPlayerConnected(ac_i)) ACInfo[ac_i][acNOPAllow][nopcode] = ac_NOPAllow[nopcode];
  1665.         }
  1666.     #endif
  1667.     return 1;
  1668. }
  1669.  
  1670. ac_fpublic ac_EnableAntiCheatForPlayer(playerid, code, enable)
  1671. {
  1672.     if(!(0 <= code < sizeof ac_ACAllow)) return 0;
  1673.     ACInfo[playerid][acACAllow][code] = !!enable;
  1674.     if(enable)
  1675.     {
  1676.         switch(code)
  1677.         {
  1678.             case 7: ACInfo[playerid][acCheatCount][15] = 0;
  1679.             case 8: ACInfo[playerid][acCheatCount][3] = 0;
  1680.             case 9: ACInfo[playerid][acCheatCount][17] = 0;
  1681.             case 10: ACInfo[playerid][acCheatCount][16] = 0;
  1682.             case 15: ACInfo[playerid][acCheatCount][10] = 0;
  1683.             case 17: ACInfo[playerid][acCheatCount][7] = 0;
  1684.             case 19: ACInfo[playerid][acCheatCount][9] = 0;
  1685.             case 20: ACInfo[playerid][acCheatCount][11] = 0;
  1686.             case 23: ACInfo[playerid][acCheatCount][12] = 0;
  1687.             case 26: ACInfo[playerid][acCheatCount][14] = ACInfo[playerid][acCheatCount][8] = 0;
  1688.             case 29: ACInfo[playerid][acCheatCount][13] = ACInfo[playerid][acCheatCount][6] = 0;
  1689.             case 30: ACInfo[playerid][acCheatCount][19] = 0;
  1690.             case 31: ACInfo[playerid][acCheatCount][4] = 0;
  1691.             case 34: ACInfo[playerid][acCheatCount][5] = 0;
  1692.             case 38: ACInfo[playerid][acCheatCount][0] = 0;
  1693.             case 47: ACInfo[playerid][acCheatCount][18] = 0;
  1694.         }
  1695.     }
  1696.     return 1;
  1697. }
  1698.  
  1699. ac_fpublic ac_EnableAntiNOPForPlayer(playerid, nopcode, enable)
  1700. {
  1701.     if(!(0 <= nopcode < sizeof ac_NOPAllow)) return 0;
  1702.     ACInfo[playerid][acNOPAllow][nopcode] = !!enable;
  1703.     return 1;
  1704. }
  1705.  
  1706. ac_fpublic ac_IsAntiCheatEnabled(code)
  1707. {
  1708.     if(!(0 <= code < sizeof ac_ACAllow)) return 0;
  1709.     return ac_ACAllow[code];
  1710. }
  1711.  
  1712. ac_fpublic ac_IsAntiNOPEnabled(nopcode)
  1713. {
  1714.     if(!(0 <= nopcode < sizeof ac_NOPAllow)) return 0;
  1715.     return ac_NOPAllow[nopcode];
  1716. }
  1717.  
  1718. ac_fpublic ac_IsAntiCheatEnabledForPlayer(playerid, code)
  1719. {
  1720.     if(!(0 <= code < sizeof ac_ACAllow)) return 0;
  1721.     return ACInfo[playerid][acACAllow][code];
  1722. }
  1723.  
  1724. ac_fpublic ac_IsAntiNOPEnabledForPlayer(playerid, nopcode)
  1725. {
  1726.     if(!(0 <= nopcode < sizeof ac_NOPAllow)) return 0;
  1727.     return ACInfo[playerid][acNOPAllow][nopcode];
  1728. }
  1729.  
  1730. ac_fpublic ac_AntiCheatGetSpeed(playerid) return ACInfo[playerid][acSpeed];
  1731.  
  1732. ac_fpublic ac_AntiCheatGetAnimationIndex(playerid) return ACInfo[playerid][acAnim];
  1733.  
  1734. ac_fpublic ac_AntiCheatGetDialog(playerid) return ACInfo[playerid][acDialog];
  1735.  
  1736. ac_fpublic ac_AntiCheatGetMoney(playerid) return ACInfo[playerid][acMoney];
  1737.  
  1738. ac_fpublic ac_AntiCheatGetEnterVehicle(playerid) return ACInfo[playerid][acEnterVeh];
  1739.  
  1740. ac_fpublic ac_AntiCheatGetVehicleID(playerid) return ACInfo[playerid][acVeh];
  1741.  
  1742. ac_fpublic ac_AntiCheatGetWeapon(playerid) return ACInfo[playerid][acLastWeapon];
  1743.  
  1744. ac_fpublic ac_AntiCheatGetVehicleSeat(playerid) return ACInfo[playerid][acSeat];
  1745.  
  1746. ac_fpublic ac_AntiCheatGetSpecialAction(playerid) return ACInfo[playerid][acSpecAct];
  1747.  
  1748. ac_fpublic ac_AntiCheatGetLastSpecialActio(playerid) return ACInfo[playerid][acLastSpecAct];
  1749.  
  1750. ac_fpublic ac_AntiCheatGetLastShotWeapon(playerid) return ACInfo[playerid][acLastShot];
  1751.  
  1752. ac_fpublic ac_AntiCheatGetLastPickup(playerid) return ACInfo[playerid][acLastPickup];
  1753.  
  1754. ac_fpublic ac_AntiCheatGetLastUpdateTime(playerid) return ACInfo[playerid][acUpdateTime];
  1755.  
  1756. ac_fpublic ac_AntiCheatGetLastReloadTime(playerid) return ACInfo[playerid][acReloadTime];
  1757.  
  1758. ac_fpublic ac_AntiCheatGetLastEnteredVehTi(playerid) return ACInfo[playerid][acEnterVehTime];
  1759.  
  1760. ac_fpublic ac_AntiCheatGetLastShotTime(playerid) return ACInfo[playerid][acShotTime];
  1761.  
  1762. ac_fpublic ac_AntiCheatGetLastSpawnTime(playerid) return ACInfo[playerid][acSpawnTime];
  1763.  
  1764. ac_fpublic ac_AntiCheatIntEnterExitsIsEnab(playerid) return ACInfo[playerid][acIntEnterExits];
  1765.  
  1766. ac_fpublic ac_AntiCheatStuntBonusIsEnabled(playerid) return ACInfo[playerid][acStuntBonus];
  1767.  
  1768. ac_fpublic ac_AntiCheatIsInModShop(playerid) return ACInfo[playerid][acModShop];
  1769.  
  1770. ac_fpublic ac_AntiCheatIsFrozen(playerid) return !ACInfo[playerid][acUnFrozen];
  1771.  
  1772. ac_fpublic ac_AntiCheatIsDead(playerid) return ACInfo[playerid][acDead];
  1773.  
  1774. ac_fpublic ac_AntiCheatIsConnected(playerid) return ACInfo[playerid][acOnline];
  1775.  
  1776. ac_fpublic ac_AntiCheatKickWithDesync(playerid, code)
  1777. {
  1778.     if(ACInfo[playerid][acKicked] > 0) return 0;
  1779.     new ac_gpp = GetPlayerPing(playerid) + 150;
  1780.     #if defined SetPlayerTimerEx_
  1781.         ACInfo[playerid][acKickTimerID] = SetPlayerTimerEx_(playerid, "ac_KickTimer", 0, (ac_gpp > AC_MAX_PING ? AC_MAX_PING : ac_gpp), 1, "i", playerid);
  1782.     #else
  1783.         ACInfo[playerid][acKickTimerID] = SetTimerEx("ac_KickTimer", (ac_gpp > AC_MAX_PING ? AC_MAX_PING : ac_gpp), false, "i", playerid);
  1784.     #endif
  1785.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  1786.     {
  1787.         if(code == 4) ACInfo[playerid][acKickVeh] = GetPlayerVehicleID(playerid);
  1788.         ACInfo[playerid][acKicked] = 2;
  1789.     }
  1790.     else ACInfo[playerid][acKicked] = 1;
  1791.     return 1;
  1792. }
  1793.  
  1794. ac_fpublic ac_AntiCheatIsKickedWithDecync(playerid) return ACInfo[playerid][acKicked];
  1795.  
  1796. ac_fpublic ac_AntiCheatGetNextDialog(playerid) return ACInfo[playerid][acNextDialog];
  1797.  
  1798. ac_fpublic ac_AntiCheatGetVehicleDriver(vehicleid) return ACVehInfo[vehicleid][acDriver];
  1799.  
  1800. ac_fpublic ac_AntiCheatGetVehicleInterior(vehicleid) return ACVehInfo[vehicleid][acInt];
  1801.  
  1802. ac_fpublic ac_AntiCheatGetVehiclePaintjob(vehicleid) return ACVehInfo[vehicleid][acPaintJob];
  1803.  
  1804. #endif
  1805.  
  1806. stock acc_AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2)
  1807. {
  1808.     new ac_vehicleid = AddStaticVehicle(modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2);
  1809.     if(ac_vehicleid != INVALID_VEHICLE_ID)
  1810.     {
  1811.         #if defined FILTERSCRIPT
  1812.             CallRemoteFunction("ac_AddStaticVehicle", "iffff", ac_vehicleid, spawn_x, spawn_y, spawn_z, z_angle);
  1813.         #else
  1814.             ac_AddStaticVehicle(ac_vehicleid, spawn_x, spawn_y, spawn_z, z_angle);
  1815.         #endif
  1816.     }
  1817.     return ac_vehicleid;
  1818. }
  1819.  
  1820. #if defined _ALS_AddStaticVehicle
  1821.     #undef AddStaticVehicle
  1822. #else
  1823.     #define _ALS_AddStaticVehicle
  1824. #endif
  1825. #define AddStaticVehicle acc_AddStaticVehicle
  1826.  
  1827. stock acc_AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay, addsiren = 0)
  1828. {
  1829.     new ac_vehicleid = AddStaticVehicleEx(modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2, respawn_delay, addsiren);
  1830.     if(ac_vehicleid != INVALID_VEHICLE_ID)
  1831.     {
  1832.         #if defined FILTERSCRIPT
  1833.             CallRemoteFunction("ac_AddStaticVehicle", "iffff", ac_vehicleid, spawn_x, spawn_y, spawn_z, z_angle);
  1834.         #else
  1835.             ac_AddStaticVehicle(ac_vehicleid, spawn_x, spawn_y, spawn_z, z_angle);
  1836.         #endif
  1837.     }
  1838.     return ac_vehicleid;
  1839. }
  1840.  
  1841. #if defined _ALS_AddStaticVehicleEx
  1842.     #undef AddStaticVehicleEx
  1843. #else
  1844.     #define _ALS_AddStaticVehicleEx
  1845. #endif
  1846. #define AddStaticVehicleEx acc_AddStaticVehicleEx
  1847.  
  1848. stock acc_CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, addsiren = 0)
  1849. {
  1850.     new ac_vehicleid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay, addsiren);
  1851.     if(ac_vehicleid != INVALID_VEHICLE_ID)
  1852.     {
  1853.         #if defined FILTERSCRIPT
  1854.             CallRemoteFunction("ac_CreateVehicle", "iiffff", ac_vehicleid, vehicletype, x, y, z, rotation);
  1855.         #else
  1856.             ac_CreateVehicle(ac_vehicleid, vehicletype, x, y, z, rotation);
  1857.         #endif
  1858.     }
  1859.     return ac_vehicleid;
  1860. }
  1861.  
  1862. #if defined _ALS_CreateVehicle
  1863.     #undef CreateVehicle
  1864. #else
  1865.     #define _ALS_CreateVehicle
  1866. #endif
  1867. #define CreateVehicle acc_CreateVehicle
  1868.  
  1869. 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)
  1870. {
  1871.     new ac_classid = AddPlayerClass(modelid, spawn_x, spawn_y, spawn_z, z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1872.     #if defined FILTERSCRIPT
  1873.         CallRemoteFunction("ac_AddPlayerClass", "ifffiiiiii", ac_classid, spawn_x, spawn_y, spawn_z, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1874.     #else
  1875.         ac_AddPlayerClass(ac_classid, spawn_x, spawn_y, spawn_z, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1876.     #endif
  1877.     return ac_classid;
  1878. }
  1879.  
  1880. #if defined _ALS_AddPlayerClass
  1881.     #undef AddPlayerClass
  1882. #else
  1883.     #define _ALS_AddPlayerClass
  1884. #endif
  1885. #define AddPlayerClass acc_AddPlayerClass
  1886.  
  1887. 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)
  1888. {
  1889.     new ac_classid = AddPlayerClassEx(teamid, modelid, spawn_x, spawn_y, spawn_z, z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1890.     #if defined FILTERSCRIPT
  1891.         CallRemoteFunction("ac_AddPlayerClass", "ifffiiiiii", ac_classid, spawn_x, spawn_y, spawn_z, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1892.     #else
  1893.         ac_AddPlayerClass(ac_classid, spawn_x, spawn_y, spawn_z, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1894.     #endif
  1895.     return ac_classid;
  1896. }
  1897.  
  1898. #if defined _ALS_AddPlayerClassEx
  1899.     #undef AddPlayerClassEx
  1900. #else
  1901.     #define _ALS_AddPlayerClassEx
  1902. #endif
  1903. #define AddPlayerClassEx acc_AddPlayerClassEx
  1904.  
  1905. stock acc_SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
  1906. {
  1907.     #if defined FILTERSCRIPT
  1908.         return CallRemoteFunction("ac_SetSpawnInfo", "iiiffffiiiiii", playerid, team, skin, x, y, z, rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1909.     #else
  1910.         return ac_SetSpawnInfo(playerid, team, skin, x, y, z, rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  1911.     #endif
  1912. }
  1913.  
  1914. #if defined _ALS_SetSpawnInfo
  1915.     #undef SetSpawnInfo
  1916. #else
  1917.     #define _ALS_SetSpawnInfo
  1918. #endif
  1919. #define SetSpawnInfo acc_SetSpawnInfo
  1920.  
  1921. stock acc_AddStaticPickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0)
  1922. {
  1923.     new ac_pickupid = CreatePickup(model, type, X, Y, Z, virtualworld);
  1924.     if(ac_pickupid != -1)
  1925.     {
  1926.         #if defined FILTERSCRIPT
  1927.             return CallRemoteFunction("ac_AddStaticPickup", "iiifff", ac_pickupid, model, type, X, Y, Z);
  1928.         #else
  1929.             return ac_AddStaticPickup(ac_pickupid, model, type, X, Y, Z);
  1930.         #endif
  1931.     }
  1932.     return 0;
  1933. }
  1934.  
  1935. #if defined _ALS_AddStaticPickup
  1936.     #undef AddStaticPickup
  1937. #else
  1938.     #define _ALS_AddStaticPickup
  1939. #endif
  1940. #define AddStaticPickup acc_AddStaticPickup
  1941.  
  1942. stock acc_CreatePickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0)
  1943. {
  1944.     new ac_pickupid = CreatePickup(model, type, X, Y, Z, virtualworld);
  1945.     if(ac_pickupid != -1)
  1946.     {
  1947.         #if defined FILTERSCRIPT
  1948.             CallRemoteFunction("ac_CreatePickup", "iiifff", ac_pickupid, model, type, X, Y, Z);
  1949.         #else
  1950.             ac_CreatePickup(ac_pickupid, model, type, X, Y, Z);
  1951.         #endif
  1952.     }
  1953.     return ac_pickupid;
  1954. }
  1955.  
  1956. #if defined _ALS_CreatePickup
  1957.     #undef CreatePickup
  1958. #else
  1959.     #define _ALS_CreatePickup
  1960. #endif
  1961. #define CreatePickup acc_CreatePickup
  1962.  
  1963. #if defined CreateDynamicPickup
  1964.     #if defined STREAMER_ENABLE_TAGS
  1965.         stock STREAMER_TAG_PICKUP acc_CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0)
  1966.         {
  1967.             new STREAMER_TAG_PICKUP ac_pickupid = CreateDynamicPickup(modelid, type, x, y, z, worldid, interiorid, playerid, streamdistance, areaid, priority);
  1968.     #else
  1969.         stock acc_CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, areaid = -1, priority = 0)
  1970.         {
  1971.             new ac_pickupid = CreateDynamicPickup(modelid, type, x, y, z, worldid, interiorid, playerid, streamdistance, areaid, priority);
  1972.     #endif
  1973.         if(_:ac_pickupid > 0)
  1974.         {
  1975.             #if defined FILTERSCRIPT
  1976.                 CallRemoteFunction("ac_CreateDynamicPickup", "iii", ac_pickupid, modelid, type);
  1977.             #else
  1978.                 #if AC_USE_PICKUP_WEAPONS
  1979.                     ac_CreateDynamicPickup(ac_pickupid, modelid, type);
  1980.                 #endif
  1981.             #endif
  1982.         }
  1983.         return ac_pickupid;
  1984.     }
  1985.  
  1986.     #if defined _ALS_CreateDynamicPickup
  1987.         #undef CreateDynamicPickup
  1988.     #else
  1989.         #define _ALS_CreateDynamicPickup
  1990.     #endif
  1991.     #define CreateDynamicPickup acc_CreateDynamicPickup
  1992. #endif
  1993.  
  1994. #if defined CreateDynamicPickupEx
  1995.     #if defined STREAMER_ENABLE_TAGS
  1996.         stock STREAMER_TAG_PICKUP acc_CreateDynamicPickupEx(modelid, type, Float:x, Float:y, Float:z, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, STREAMER_TAG_AREA areas[] = { STREAMER_TAG_AREA -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas)
  1997.         {
  1998.             new STREAMER_TAG_PICKUP ac_pickupid = CreateDynamicPickupEx(modelid, type, x, y, z, streamdistance, worlds, interiors, players, areas, priority, maxworlds, maxinteriors, maxplayers, maxareas);
  1999.     #else
  2000.             stock acc_CreateDynamicPickupEx(modelid, type, Float:x, Float:y, Float:z, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, areas[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas)
  2001.         {
  2002.             new ac_pickupid = CreateDynamicPickupEx(modelid, type, x, y, z, streamdistance, worlds, interiors, players, areas, priority, maxworlds, maxinteriors, maxplayers, maxareas);
  2003.     #endif
  2004.         if(_:ac_pickupid > 0)
  2005.         {
  2006.             #if defined FILTERSCRIPT
  2007.                 CallRemoteFunction("ac_CreateDynamicPickup", "iii", ac_pickupid, modelid, type);
  2008.             #else
  2009.                 #if AC_USE_PICKUP_WEAPONS
  2010.                     ac_CreateDynamicPickup(ac_pickupid, modelid, type);
  2011.                 #endif
  2012.             #endif
  2013.         }
  2014.         return ac_pickupid;
  2015.     }
  2016.  
  2017.     #if defined _ALS_CreateDynamicPickupEx
  2018.         #undef CreateDynamicPickupEx
  2019.     #else
  2020.         #define _ALS_CreateDynamicPickupEx
  2021.     #endif
  2022.     #define CreateDynamicPickupEx acc_CreateDynamicPickupEx
  2023. #endif
  2024.  
  2025. stock acc_DestroyVehicle(vehicleid)
  2026. {
  2027.     #if defined FILTERSCRIPT
  2028.         return CallRemoteFunction("ac_DestroyVehicle", "i", vehicleid);
  2029.     #else
  2030.         return ac_DestroyVehicle(vehicleid);
  2031.     #endif
  2032. }
  2033.  
  2034. #if defined _ALS_DestroyVehicle
  2035.     #undef DestroyVehicle
  2036. #else
  2037.     #define _ALS_DestroyVehicle
  2038. #endif
  2039. #define DestroyVehicle acc_DestroyVehicle
  2040.  
  2041. stock acc_DestroyPickup(pickup)
  2042. {
  2043.     #if defined FILTERSCRIPT
  2044.         return CallRemoteFunction("ac_DestroyPickup", "i", pickup);
  2045.     #else
  2046.         return ac_DestroyPickup(pickup);
  2047.     #endif
  2048. }
  2049.  
  2050. #if defined _ALS_DestroyPickup
  2051.     #undef DestroyPickup
  2052. #else
  2053.     #define _ALS_DestroyPickup
  2054. #endif
  2055. #define DestroyPickup acc_DestroyPickup
  2056.  
  2057. stock acc_DisableInteriorEnterExits()
  2058. {
  2059.     #if defined FILTERSCRIPT
  2060.         return CallRemoteFunction("ac_DisableInteriorEnterExits", "");
  2061.     #else
  2062.         return ac_DisableInteriorEnterExits();
  2063.     #endif
  2064. }
  2065.  
  2066. #if defined _ALS_DisableInteriorEnterExits
  2067.     #undef DisableInteriorEnterExits
  2068. #else
  2069.     #define _ALS_DisableInteriorEnterExits
  2070. #endif
  2071. #define DisableInteriorEnterExits acc_DisableInteriorEnterExits
  2072.  
  2073. stock acc_UsePlayerPedAnims()
  2074. {
  2075.     #if defined FILTERSCRIPT
  2076.         return CallRemoteFunction("ac_UsePlayerPedAnims", "");
  2077.     #else
  2078.         return ac_UsePlayerPedAnims();
  2079.     #endif
  2080. }
  2081.  
  2082. #if defined _ALS_UsePlayerPedAnims
  2083.     #undef UsePlayerPedAnims
  2084. #else
  2085.     #define _ALS_UsePlayerPedAnims
  2086. #endif
  2087. #define UsePlayerPedAnims acc_UsePlayerPedAnims
  2088.  
  2089. stock acc_EnableVehicleFriendlyFire()
  2090. {
  2091.     #if defined FILTERSCRIPT
  2092.         return CallRemoteFunction("ac_EnableVehicleFriendlyFire", "");
  2093.     #else
  2094.         return ac_EnableVehicleFriendlyFire();
  2095.     #endif
  2096. }
  2097.  
  2098. #if defined _ALS_EnableVehicleFriendlyFire
  2099.     #undef EnableVehicleFriendlyFire
  2100. #else
  2101.     #define _ALS_EnableVehicleFriendlyFire
  2102. #endif
  2103. #define EnableVehicleFriendlyFire acc_EnableVehicleFriendlyFire
  2104.  
  2105. stock acc_EnableStuntBonusForAll(enable)
  2106. {
  2107.     #if defined FILTERSCRIPT
  2108.         return CallRemoteFunction("ac_EnableStuntBonusForAll", "i", enable);
  2109.     #else
  2110.         return ac_EnableStuntBonusForAll(enable);
  2111.     #endif
  2112. }
  2113.  
  2114. #if defined _ALS_EnableStuntBonusForAll
  2115.     #undef EnableStuntBonusForAll
  2116. #else
  2117.     #define _ALS_EnableStuntBonusForAll
  2118. #endif
  2119. #define EnableStuntBonusForAll acc_EnableStuntBonusForAll
  2120.  
  2121. stock acc_EnableStuntBonusForPlayer(playerid, enable)
  2122. {
  2123.     #if defined FILTERSCRIPT
  2124.         return CallRemoteFunction("ac_EnableStuntBonusForPlayer", "ii", playerid, enable);
  2125.     #else
  2126.         return ac_EnableStuntBonusForPlayer(playerid, enable);
  2127.     #endif
  2128. }
  2129.  
  2130. #if defined _ALS_EnableStuntBonusForPlayer
  2131.     #undef EnableStuntBonusForPlayer
  2132. #else
  2133.     #define _ALS_EnableStuntBonusForPlayer
  2134. #endif
  2135. #define EnableStuntBonusForPlayer acc_EnableStuntBonusForPlayer
  2136.  
  2137. #if defined _inc_y_dialog || defined _INC_y_dialog
  2138.     stock ac_Dialog_Show(playerid, style, string:title[], string:caption[], string:button1[], string:button2[] = "", dialog = -1)
  2139.     {
  2140.         if(!(0 <= playerid < MAX_PLAYERS))
  2141.         {
  2142.             #if defined FILTERSCRIPT
  2143.                 CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, dialog);
  2144.             #else
  2145.                 ac_ShowPlayerDialog(playerid, dialog);
  2146.             #endif
  2147.         }
  2148.         return Dialog_Show(playerid, style, title, caption, button1, button2, dialog);
  2149.     }
  2150.  
  2151.     #if defined _ALS_Dialog_Show
  2152.         #undef Dialog_Show
  2153.     #else
  2154.         #define _ALS_Dialog_Show
  2155.     #endif
  2156.     #define Dialog_Show ac_Dialog_Show
  2157. #endif
  2158.  
  2159. stock acc_ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
  2160. {
  2161.     if(ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2))
  2162.     {
  2163.         #if defined FILTERSCRIPT
  2164.             return CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, dialogid);
  2165.         #else
  2166.             return ac_ShowPlayerDialog(playerid, dialogid);
  2167.         #endif
  2168.     }
  2169.     return 0;
  2170. }
  2171.  
  2172. #if defined _ALS_ShowPlayerDialog
  2173.     #undef ShowPlayerDialog
  2174. #else
  2175.     #define _ALS_ShowPlayerDialog
  2176. #endif
  2177. #define ShowPlayerDialog acc_ShowPlayerDialog
  2178.  
  2179. stock acc_TogglePlayerControllable(playerid, toggle)
  2180. {
  2181.     #if defined FILTERSCRIPT
  2182.         return CallRemoteFunction("ac_TogglePlayerControllable", "ii", playerid, toggle);
  2183.     #else
  2184.         return ac_TogglePlayerControllable(playerid, toggle);
  2185.     #endif
  2186. }
  2187.  
  2188. #if defined _ALS_TogglePlayerControllable
  2189.     #undef TogglePlayerControllable
  2190. #else
  2191.     #define _ALS_TogglePlayerControllable
  2192. #endif
  2193. #define TogglePlayerControllable acc_TogglePlayerControllable
  2194.  
  2195. stock acc_TogglePlayerSpectating(playerid, toggle)
  2196. {
  2197.     #if defined FILTERSCRIPT
  2198.         return CallRemoteFunction("ac_TogglePlayerSpectating", "ii", playerid, toggle);
  2199.     #else
  2200.         return ac_TogglePlayerSpectating(playerid, toggle);
  2201.     #endif
  2202. }
  2203.  
  2204. #if defined _ALS_TogglePlayerSpectating
  2205.     #undef TogglePlayerSpectating
  2206. #else
  2207.     #define _ALS_TogglePlayerSpectating
  2208. #endif
  2209. #define TogglePlayerSpectating acc_TogglePlayerSpectating
  2210.  
  2211. stock acc_SpawnPlayer(playerid)
  2212. {
  2213.     #if defined FILTERSCRIPT
  2214.         return CallRemoteFunction("ac_SpawnPlayer", "i", playerid);
  2215.     #else
  2216.         return ac_SpawnPlayer(playerid);
  2217.     #endif
  2218. }
  2219.  
  2220. #if defined _ALS_SpawnPlayer
  2221.     #undef SpawnPlayer
  2222. #else
  2223.     #define _ALS_SpawnPlayer
  2224. #endif
  2225. #define SpawnPlayer acc_SpawnPlayer
  2226.  
  2227. stock acc_SetPlayerHealth(playerid, Float:health)
  2228. {
  2229.     #if defined FILTERSCRIPT
  2230.         return CallRemoteFunction("ac_SetPlayerHealth", "if", playerid, health);
  2231.     #else
  2232.         return ac_SetPlayerHealth(playerid, health);
  2233.     #endif
  2234. }
  2235.  
  2236. #if defined _ALS_SetPlayerHealth
  2237.     #undef SetPlayerHealth
  2238. #else
  2239.     #define _ALS_SetPlayerHealth
  2240. #endif
  2241. #define SetPlayerHealth acc_SetPlayerHealth
  2242.  
  2243. stock acc_SetPlayerArmour(playerid, Float:armour)
  2244. {
  2245.     #if defined FILTERSCRIPT
  2246.         return CallRemoteFunction("ac_SetPlayerArmour", "if", playerid, armour);
  2247.     #else
  2248.         return ac_SetPlayerArmour(playerid, armour);
  2249.     #endif
  2250. }
  2251.  
  2252. #if defined _ALS_SetPlayerArmour
  2253.     #undef SetPlayerArmour
  2254. #else
  2255.     #define _ALS_SetPlayerArmour
  2256. #endif
  2257. #define SetPlayerArmour acc_SetPlayerArmour
  2258.  
  2259. stock acc_GivePlayerWeapon(playerid, weaponid, ammo)
  2260. {
  2261.     if(!(0 <= playerid < MAX_PLAYERS)) return 0;
  2262.     #if defined FILTERSCRIPT
  2263.         return CallRemoteFunction("ac_GivePlayerWeapon", "iid", playerid, weaponid, ammo);
  2264.     #else
  2265.         return ac_GivePlayerWeapon(playerid, weaponid, ammo);
  2266.     #endif
  2267. }
  2268.  
  2269. #if defined _ALS_GivePlayerWeapon
  2270.     #undef GivePlayerWeapon
  2271. #else
  2272.     #define _ALS_GivePlayerWeapon
  2273. #endif
  2274. #define GivePlayerWeapon acc_GivePlayerWeapon
  2275.  
  2276. stock acc_SetPlayerAmmo(playerid, weaponslot, ammo)
  2277. {
  2278.     if(!(0 <= playerid < MAX_PLAYERS)) return 0;
  2279.     #if defined FILTERSCRIPT
  2280.         return CallRemoteFunction("ac_SetPlayerAmmo", "iid", playerid, weaponslot, ammo);
  2281.     #else
  2282.         return ac_SetPlayerAmmo(playerid, weaponslot, ammo);
  2283.     #endif
  2284. }
  2285.  
  2286. #if defined _ALS_SetPlayerAmmo
  2287.     #undef SetPlayerAmmo
  2288. #else
  2289.     #define _ALS_SetPlayerAmmo
  2290. #endif
  2291. #define SetPlayerAmmo acc_SetPlayerAmmo
  2292.  
  2293. stock acc_SetPlayerArmedWeapon(playerid, weaponid)
  2294. {
  2295.     #if defined FILTERSCRIPT
  2296.         return CallRemoteFunction("ac_SetPlayerArmedWeapon", "ii", playerid, weaponid);
  2297.     #else
  2298.         return ac_SetPlayerArmedWeapon(playerid, weaponid);
  2299.     #endif
  2300. }
  2301.  
  2302. #if defined _ALS_SetPlayerArmedWeapon
  2303.     #undef SetPlayerArmedWeapon
  2304. #else
  2305.     #define _ALS_SetPlayerArmedWeapon
  2306. #endif
  2307. #define SetPlayerArmedWeapon acc_SetPlayerArmedWeapon
  2308.  
  2309. stock acc_ResetPlayerWeapons(playerid)
  2310. {
  2311.     #if defined FILTERSCRIPT
  2312.         return CallRemoteFunction("ac_ResetPlayerWeapons", "i", playerid);
  2313.     #else
  2314.         return ac_ResetPlayerWeapons(playerid);
  2315.     #endif
  2316. }
  2317.  
  2318. #if defined _ALS_ResetPlayerWeapons
  2319.     #undef ResetPlayerWeapons
  2320. #else
  2321.     #define _ALS_ResetPlayerWeapons
  2322. #endif
  2323. #define ResetPlayerWeapons acc_ResetPlayerWeapons
  2324.  
  2325. stock acc_GivePlayerMoney(playerid, money)
  2326. {
  2327.     #if defined FILTERSCRIPT
  2328.         return CallRemoteFunction("ac_GivePlayerMoney", "id", playerid, money);
  2329.     #else
  2330.         return ac_GivePlayerMoney(playerid, money);
  2331.     #endif
  2332. }
  2333.  
  2334. #if defined _ALS_GivePlayerMoney
  2335.     #undef GivePlayerMoney
  2336. #else
  2337.     #define _ALS_GivePlayerMoney
  2338. #endif
  2339. #define GivePlayerMoney acc_GivePlayerMoney
  2340.  
  2341. stock acc_ResetPlayerMoney(playerid)
  2342. {
  2343.     #if defined FILTERSCRIPT
  2344.         return CallRemoteFunction("ac_ResetPlayerMoney", "i", playerid);
  2345.     #else
  2346.         return ac_ResetPlayerMoney(playerid);
  2347.     #endif
  2348. }
  2349.  
  2350. #if defined _ALS_ResetPlayerMoney
  2351.     #undef ResetPlayerMoney
  2352. #else
  2353.     #define _ALS_ResetPlayerMoney
  2354. #endif
  2355. #define ResetPlayerMoney acc_ResetPlayerMoney
  2356.  
  2357. stock acc_GetPlayerMoney(playerid)
  2358. {
  2359.     if(!IsPlayerConnected(playerid)) return 0;
  2360.     #if defined FILTERSCRIPT
  2361.         return CallRemoteFunction("ac_AntiCheatGetMoney", "i", playerid);
  2362.     #else
  2363.         return ac_AntiCheatGetMoney(playerid);
  2364.     #endif
  2365. }
  2366.  
  2367. #if defined _ALS_GetPlayerMoney
  2368.     #undef GetPlayerMoney
  2369. #else
  2370.     #define _ALS_GetPlayerMoney
  2371. #endif
  2372. #define GetPlayerMoney acc_GetPlayerMoney
  2373.  
  2374. stock acc_SetPlayerSpecialAction(playerid, actionid)
  2375. {
  2376.     #if defined FILTERSCRIPT
  2377.         return CallRemoteFunction("ac_SetPlayerSpecialAction", "ii", playerid, actionid);
  2378.     #else
  2379.         return ac_SetPlayerSpecialAction(playerid, actionid);
  2380.     #endif
  2381. }
  2382.  
  2383. #if defined _ALS_SetPlayerSpecialAction
  2384.     #undef SetPlayerSpecialAction
  2385. #else
  2386.     #define _ALS_SetPlayerSpecialAction
  2387. #endif
  2388. #define SetPlayerSpecialAction acc_SetPlayerSpecialAction
  2389.  
  2390. stock acc_SetPlayerInterior(playerid, interiorid)
  2391. {
  2392.     #if defined FILTERSCRIPT
  2393.         return CallRemoteFunction("ac_SetPlayerInterior", "ii", playerid, interiorid);
  2394.     #else
  2395.         return ac_SetPlayerInterior(playerid, interiorid);
  2396.     #endif
  2397. }
  2398.  
  2399. #if defined _ALS_SetPlayerInterior
  2400.     #undef SetPlayerInterior
  2401. #else
  2402.     #define _ALS_SetPlayerInterior
  2403. #endif
  2404. #define SetPlayerInterior acc_SetPlayerInterior
  2405.  
  2406. stock acc_SetPlayerPos(playerid, Float:x, Float:y, Float:z)
  2407. {
  2408.     #if defined FILTERSCRIPT
  2409.         return CallRemoteFunction("ac_SetPlayerPos", "ifff", playerid, x, y, z);
  2410.     #else
  2411.         return ac_SetPlayerPos(playerid, x, y, z);
  2412.     #endif
  2413. }
  2414.  
  2415. #if defined _ALS_SetPlayerPos
  2416.     #undef SetPlayerPos
  2417. #else
  2418.     #define _ALS_SetPlayerPos
  2419. #endif
  2420. #define SetPlayerPos acc_SetPlayerPos
  2421.  
  2422. stock acc_SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z)
  2423. {
  2424.     #if defined FILTERSCRIPT
  2425.         return CallRemoteFunction("ac_SetPlayerPosFindZ", "ifff", playerid, x, y, z);
  2426.     #else
  2427.         return ac_SetPlayerPosFindZ(playerid, x, y, z);
  2428.     #endif
  2429. }
  2430.  
  2431. #if defined _ALS_SetPlayerPosFindZ
  2432.     #undef SetPlayerPosFindZ
  2433. #else
  2434.     #define _ALS_SetPlayerPosFindZ
  2435. #endif
  2436. #define SetPlayerPosFindZ acc_SetPlayerPosFindZ
  2437.  
  2438. stock acc_SetPlayerVelocity(playerid, Float:X, Float:Y, Float:Z)
  2439. {
  2440.     #if defined FILTERSCRIPT
  2441.         return CallRemoteFunction("ac_SetPlayerVelocity", "ifff", playerid, X, Y, Z);
  2442.     #else
  2443.         return ac_SetPlayerVelocity(playerid, X, Y, Z);
  2444.     #endif
  2445. }
  2446.  
  2447. #if defined _ALS_SetPlayerVelocity
  2448.     #undef SetPlayerVelocity
  2449. #else
  2450.     #define _ALS_SetPlayerVelocity
  2451. #endif
  2452. #define SetPlayerVelocity acc_SetPlayerVelocity
  2453.  
  2454. stock acc_PutPlayerInVehicle(playerid, vehicleid, seatid)
  2455. {
  2456.     #if defined FILTERSCRIPT
  2457.         return CallRemoteFunction("ac_PutPlayerInVehicle", "iii", playerid, vehicleid, seatid);
  2458.     #else
  2459.         return ac_PutPlayerInVehicle(playerid, vehicleid, seatid);
  2460.     #endif
  2461. }
  2462.  
  2463. #if defined _ALS_PutPlayerInVehicle
  2464.     #undef PutPlayerInVehicle
  2465. #else
  2466.     #define _ALS_PutPlayerInVehicle
  2467. #endif
  2468. #define PutPlayerInVehicle acc_PutPlayerInVehicle
  2469.  
  2470. stock acc_RemovePlayerFromVehicle(playerid)
  2471. {
  2472.     #if defined FILTERSCRIPT
  2473.         return CallRemoteFunction("ac_RemovePlayerFromVehicle", "i", playerid);
  2474.     #else
  2475.         return ac_RemovePlayerFromVehicle(playerid);
  2476.     #endif
  2477. }
  2478.  
  2479. #if defined _ALS_RemovePlayerFromVehicle
  2480.     #undef RemovePlayerFromVehicle
  2481. #else
  2482.     #define _ALS_RemovePlayerFromVehicle
  2483. #endif
  2484. #define RemovePlayerFromVehicle acc_RemovePlayerFromVehicle
  2485.  
  2486. stock acc_SetVehiclePos(vehicleid, Float:x, Float:y, Float:z)
  2487. {
  2488.     #if defined FILTERSCRIPT
  2489.         return CallRemoteFunction("ac_SetVehiclePos", "ifff", vehicleid, x, y, z);
  2490.     #else
  2491.         return ac_SetVehiclePos(vehicleid, x, y, z);
  2492.     #endif
  2493. }
  2494.  
  2495. #if defined _ALS_SetVehiclePos
  2496.     #undef SetVehiclePos
  2497. #else
  2498.     #define _ALS_SetVehiclePos
  2499. #endif
  2500. #define SetVehiclePos acc_SetVehiclePos
  2501.  
  2502. stock acc_SetVehicleVelocity(vehicleid, Float:X, Float:Y, Float:Z)
  2503. {
  2504.     #if defined FILTERSCRIPT
  2505.         return CallRemoteFunction("ac_SetVehicleVelocity", "ifff", vehicleid, X, Y, Z);
  2506.     #else
  2507.         return ac_SetVehicleVelocity(vehicleid, X, Y, Z);
  2508.     #endif
  2509. }
  2510.  
  2511. #if defined _ALS_SetVehicleVelocity
  2512.     #undef SetVehicleVelocity
  2513. #else
  2514.     #define _ALS_SetVehicleVelocity
  2515. #endif
  2516. #define SetVehicleVelocity acc_SetVehicleVelocity
  2517.  
  2518. stock acc_SetVehicleAngularVelocity(vehicleid, Float:X, Float:Y, Float:Z)
  2519. {
  2520.     #if defined FILTERSCRIPT
  2521.         return CallRemoteFunction("ac_SetVehicleAngularVelocity", "ifff", vehicleid, X, Y, Z);
  2522.     #else
  2523.         return ac_SetVehicleAngularVelocity(vehicleid, X, Y, Z);
  2524.     #endif
  2525. }
  2526.  
  2527. #if defined _ALS_SetVehicleAngularVelocity
  2528.     #undef SetVehicleAngularVelocity
  2529. #else
  2530.     #define _ALS_SetVehicleAngularVelocity
  2531. #endif
  2532. #define SetVehicleAngularVelocity acc_SetVehicleAngularVelocity
  2533.  
  2534. stock acc_LinkVehicleToInterior(vehicleid, interiorid)
  2535. {
  2536.     #if defined FILTERSCRIPT
  2537.         return CallRemoteFunction("ac_LinkVehicleToInterior", "ii", vehicleid, interiorid);
  2538.     #else
  2539.         return ac_LinkVehicleToInterior(vehicleid, interiorid);
  2540.     #endif
  2541. }
  2542.  
  2543. #if defined _ALS_LinkVehicleToInterior
  2544.     #undef LinkVehicleToInterior
  2545. #else
  2546.     #define _ALS_LinkVehicleToInterior
  2547. #endif
  2548. #define LinkVehicleToInterior acc_LinkVehicleToInterior
  2549.  
  2550. stock acc_ChangeVehiclePaintjob(vehicleid, paintjobid)
  2551. {
  2552.     #if defined FILTERSCRIPT
  2553.         return CallRemoteFunction("ac_ChangeVehiclePaintjob", "ii", vehicleid, paintjobid);
  2554.     #else
  2555.         return ac_ChangeVehiclePaintjob(vehicleid, paintjobid);
  2556.     #endif
  2557. }
  2558.  
  2559. #if defined _ALS_ChangeVehiclePaintjob
  2560.     #undef ChangeVehiclePaintjob
  2561. #else
  2562.     #define _ALS_ChangeVehiclePaintjob
  2563. #endif
  2564. #define ChangeVehiclePaintjob acc_ChangeVehiclePaintjob
  2565.  
  2566. stock acc_SetVehicleHealth(vehicleid, Float:health)
  2567. {
  2568.     if(floatcmp(health, 0.0) == -1) health = 0.0;
  2569.     #if defined FILTERSCRIPT
  2570.         return CallRemoteFunction("ac_SetVehicleHealth", "if", vehicleid, health);
  2571.     #else
  2572.         return ac_SetVehicleHealth(vehicleid, health);
  2573.     #endif
  2574. }
  2575.  
  2576. #if defined _ALS_SetVehicleHealth
  2577.     #undef SetVehicleHealth
  2578. #else
  2579.     #define _ALS_SetVehicleHealth
  2580. #endif
  2581. #define SetVehicleHealth acc_SetVehicleHealth
  2582.  
  2583. stock acc_RepairVehicle(vehicleid)
  2584. {
  2585.     #if defined FILTERSCRIPT
  2586.         return CallRemoteFunction("ac_RepairVehicle", "i", vehicleid);
  2587.     #else
  2588.         return ac_RepairVehicle(vehicleid);
  2589.     #endif
  2590. }
  2591.  
  2592. #if defined _ALS_RepairVehicle
  2593.     #undef RepairVehicle
  2594. #else
  2595.     #define _ALS_RepairVehicle
  2596. #endif
  2597. #define RepairVehicle acc_RepairVehicle
  2598.  
  2599. stock acc_SetVehicleToRespawn(vehicleid)
  2600. {
  2601.     if(GetVehicleModel(vehicleid) > 0)
  2602.     {
  2603.         #if defined FILTERSCRIPT
  2604.             return CallRemoteFunction("ac_SetVehicleToRespawn", "i", vehicleid);
  2605.         #else
  2606.             return ac_SetVehicleToRespawn(vehicleid);
  2607.         #endif
  2608.     }
  2609.     return 0;
  2610. }
  2611.  
  2612. #if defined _ALS_SetVehicleToRespawn
  2613.     #undef SetVehicleToRespawn
  2614. #else
  2615.     #define _ALS_SetVehicleToRespawn
  2616. #endif
  2617. #define SetVehicleToRespawn acc_SetVehicleToRespawn
  2618.  
  2619. stock EnableAntiCheat(code, enable)
  2620. {
  2621.     #if defined FILTERSCRIPT
  2622.         return CallRemoteFunction("ac_EnableAntiCheat", "ii", code, enable);
  2623.     #else
  2624.         return ac_EnableAntiCheat(code, enable);
  2625.     #endif
  2626. }
  2627.  
  2628. stock EnableAntiNOP(nopcode, enable)
  2629. {
  2630.     #if defined FILTERSCRIPT
  2631.         return CallRemoteFunction("ac_EnableAntiNOP", "ii", nopcode, enable);
  2632.     #else
  2633.         return ac_EnableAntiNOP(nopcode, enable);
  2634.     #endif
  2635. }
  2636.  
  2637. stock EnableAntiCheatForPlayer(playerid, code, enable)
  2638. {
  2639.     if(!IsPlayerConnected(playerid)) return 0;
  2640.     #if defined FILTERSCRIPT
  2641.         return CallRemoteFunction("ac_EnableAntiCheatForPlayer", "iii", playerid, code, enable);
  2642.     #else
  2643.         return ac_EnableAntiCheatForPlayer(playerid, code, enable);
  2644.     #endif
  2645. }
  2646.  
  2647. stock EnableAntiNOPForPlayer(playerid, nopcode, enable)
  2648. {
  2649.     if(!IsPlayerConnected(playerid)) return 0;
  2650.     #if defined FILTERSCRIPT
  2651.         return CallRemoteFunction("ac_EnableAntiNOPForPlayer", "iii", playerid, nopcode, enable);
  2652.     #else
  2653.         return ac_EnableAntiNOPForPlayer(playerid, nopcode, enable);
  2654.     #endif
  2655. }
  2656.  
  2657. stock IsAntiCheatEnabled(code)
  2658. {
  2659.     #if defined FILTERSCRIPT
  2660.         return CallRemoteFunction("ac_IsAntiCheatEnabled", "i", code);
  2661.     #else
  2662.         return ac_IsAntiCheatEnabled(code);
  2663.     #endif
  2664. }
  2665.  
  2666. stock IsAntiNOPEnabled(nopcode)
  2667. {
  2668.     #if defined FILTERSCRIPT
  2669.         return CallRemoteFunction("ac_IsAntiNOPEnabled", "i", nopcode);
  2670.     #else
  2671.         return ac_IsAntiNOPEnabled(nopcode);
  2672.     #endif
  2673. }
  2674.  
  2675. stock IsAntiCheatEnabledForPlayer(playerid, code)
  2676. {
  2677.     if(!IsPlayerConnected(playerid)) return 0;
  2678.     #if defined FILTERSCRIPT
  2679.         return CallRemoteFunction("ac_IsAntiCheatEnabledForPlayer", "ii", playerid, code);
  2680.     #else
  2681.         return ac_IsAntiCheatEnabledForPlayer(playerid, code);
  2682.     #endif
  2683. }
  2684.  
  2685. stock IsAntiNOPEnabledForPlayer(playerid, nopcode)
  2686. {
  2687.     if(!IsPlayerConnected(playerid)) return 0;
  2688.     #if defined FILTERSCRIPT
  2689.         return CallRemoteFunction("ac_IsAntiNOPEnabledForPlayer", "ii", playerid, nopcode);
  2690.     #else
  2691.         return ac_IsAntiNOPEnabledForPlayer(playerid, nopcode);
  2692.     #endif
  2693. }
  2694.  
  2695. stock AntiCheatGetSpeed(playerid)
  2696. {
  2697.     if(!IsPlayerConnected(playerid)) return 0;
  2698.     #if defined FILTERSCRIPT
  2699.         return CallRemoteFunction("ac_AntiCheatGetSpeed", "i", playerid);
  2700.     #else
  2701.         return ac_AntiCheatGetSpeed(playerid);
  2702.     #endif
  2703. }
  2704.  
  2705. stock AntiCheatGetAnimationIndex(playerid)
  2706. {
  2707.     if(!IsPlayerConnected(playerid)) return 0;
  2708.     #if defined FILTERSCRIPT
  2709.         return CallRemoteFunction("ac_AntiCheatGetAnimationIndex", "i", playerid);
  2710.     #else
  2711.         return ac_AntiCheatGetAnimationIndex(playerid);
  2712.     #endif
  2713. }
  2714.  
  2715. stock AntiCheatGetDialog(playerid)
  2716. {
  2717.     if(!IsPlayerConnected(playerid)) return -1;
  2718.     #if defined FILTERSCRIPT
  2719.         return CallRemoteFunction("ac_AntiCheatGetDialog", "i", playerid);
  2720.     #else
  2721.         return ac_AntiCheatGetDialog(playerid);
  2722.     #endif
  2723. }
  2724.  
  2725. stock AntiCheatGetMoney(playerid)
  2726. {
  2727.     if(!IsPlayerConnected(playerid)) return 0;
  2728.     #if defined FILTERSCRIPT
  2729.         return CallRemoteFunction("ac_AntiCheatGetMoney", "i", playerid);
  2730.     #else
  2731.         return ac_AntiCheatGetMoney(playerid);
  2732.     #endif
  2733. }
  2734.  
  2735. stock AntiCheatGetClass(playerid)
  2736. {
  2737.     if(!IsPlayerConnected(playerid)) return 0;
  2738.     #if defined FILTERSCRIPT
  2739.         return CallRemoteFunction("ac_AntiCheatGetClass", "i", playerid);
  2740.     #else
  2741.         return ac_AntiCheatGetClass(playerid);
  2742.     #endif
  2743. }
  2744.  
  2745. stock AntiCheatGetEnterVehicle(playerid)
  2746. {
  2747.     if(!IsPlayerConnected(playerid)) return 0;
  2748.     #if defined FILTERSCRIPT
  2749.         return CallRemoteFunction("ac_AntiCheatGetEnterVehicle", "i", playerid);
  2750.     #else
  2751.         return ac_AntiCheatGetEnterVehicle(playerid);
  2752.     #endif
  2753. }
  2754.  
  2755. stock AntiCheatGetVehicleID(playerid)
  2756. {
  2757.     if(!IsPlayerConnected(playerid)) return 0;
  2758.     #if defined FILTERSCRIPT
  2759.         return CallRemoteFunction("ac_AntiCheatGetVehicleID", "i", playerid);
  2760.     #else
  2761.         return ac_AntiCheatGetVehicleID(playerid);
  2762.     #endif
  2763. }
  2764.  
  2765. stock AntiCheatGetWeapon(playerid)
  2766. {
  2767.     if(!IsPlayerConnected(playerid)) return -1;
  2768.     #if defined FILTERSCRIPT
  2769.         return CallRemoteFunction("ac_AntiCheatGetWeapon", "i", playerid);
  2770.     #else
  2771.         return ac_AntiCheatGetWeapon(playerid);
  2772.     #endif
  2773. }
  2774.  
  2775. stock AntiCheatGetVehicleSeat(playerid)
  2776. {
  2777.     if(!IsPlayerConnected(playerid)) return -1;
  2778.     #if defined FILTERSCRIPT
  2779.         return CallRemoteFunction("ac_AntiCheatGetVehicleSeat", "i", playerid);
  2780.     #else
  2781.         return ac_AntiCheatGetVehicleSeat(playerid);
  2782.     #endif
  2783. }
  2784.  
  2785. stock AntiCheatGetSpecialAction(playerid)
  2786. {
  2787.     if(!IsPlayerConnected(playerid)) return 0;
  2788.     #if defined FILTERSCRIPT
  2789.         return CallRemoteFunction("ac_AntiCheatGetSpecialAction", "i", playerid);
  2790.     #else
  2791.         return ac_AntiCheatGetSpecialAction(playerid);
  2792.     #endif
  2793. }
  2794.  
  2795. stock AntiCheatGetLastSpecialAction(playerid)
  2796. {
  2797.     if(!IsPlayerConnected(playerid)) return 0;
  2798.     #if defined FILTERSCRIPT
  2799.         return CallRemoteFunction("ac_AntiCheatGetLastSpecialActio", "i", playerid);
  2800.     #else
  2801.         return ac_AntiCheatGetLastSpecialActio(playerid);
  2802.     #endif
  2803. }
  2804.  
  2805. stock AntiCheatGetLastShotWeapon(playerid)
  2806. {
  2807.     if(!IsPlayerConnected(playerid)) return -1;
  2808.     #if defined FILTERSCRIPT
  2809.         return CallRemoteFunction("ac_AntiCheatGetLastShotWeapon", "i", playerid);
  2810.     #else
  2811.         return ac_AntiCheatGetLastShotWeapon(playerid);
  2812.     #endif
  2813. }
  2814.  
  2815. stock AntiCheatGetLastPickup(playerid)
  2816. {
  2817.     if(!IsPlayerConnected(playerid)) return -1;
  2818.     #if defined FILTERSCRIPT
  2819.         return CallRemoteFunction("ac_AntiCheatGetLastPickup", "i", playerid);
  2820.     #else
  2821.         return ac_AntiCheatGetLastPickup(playerid);
  2822.     #endif
  2823. }
  2824.  
  2825. stock AntiCheatGetLastUpdateTime(playerid)
  2826. {
  2827.     if(!IsPlayerConnected(playerid)) return 0;
  2828.     #if defined FILTERSCRIPT
  2829.         return CallRemoteFunction("ac_AntiCheatGetLastUpdateTime", "i", playerid);
  2830.     #else
  2831.         return ac_AntiCheatGetLastUpdateTime(playerid);
  2832.     #endif
  2833. }
  2834.  
  2835. stock AntiCheatGetLastReloadTime(playerid)
  2836. {
  2837.     if(!IsPlayerConnected(playerid)) return 0;
  2838.     #if defined FILTERSCRIPT
  2839.         return CallRemoteFunction("ac_AntiCheatGetLastReloadTime", "i", playerid);
  2840.     #else
  2841.         return ac_AntiCheatGetLastReloadTime(playerid);
  2842.     #endif
  2843. }
  2844.  
  2845. stock AntiCheatGetLastEnteredVehTime(playerid)
  2846. {
  2847.     if(!IsPlayerConnected(playerid)) return 0;
  2848.     #if defined FILTERSCRIPT
  2849.         return CallRemoteFunction("ac_AntiCheatGetLastEnteredVehTi", "i", playerid);
  2850.     #else
  2851.         return ac_AntiCheatGetLastEnteredVehTi(playerid);
  2852.     #endif
  2853. }
  2854.  
  2855. stock AntiCheatGetLastShotTime(playerid)
  2856. {
  2857.     if(!IsPlayerConnected(playerid)) return 0;
  2858.     #if defined FILTERSCRIPT
  2859.         return CallRemoteFunction("ac_AntiCheatGetLastShotTime", "i", playerid);
  2860.     #else
  2861.         return ac_AntiCheatGetLastShotTime(playerid);
  2862.     #endif
  2863. }
  2864.  
  2865. stock AntiCheatGetLastSpawnTime(playerid)
  2866. {
  2867.     if(!IsPlayerConnected(playerid)) return 0;
  2868.     #if defined FILTERSCRIPT
  2869.         return CallRemoteFunction("ac_AntiCheatGetLastSpawnTime", "i", playerid);
  2870.     #else
  2871.         return ac_AntiCheatGetLastSpawnTime(playerid);
  2872.     #endif
  2873. }
  2874.  
  2875. stock AntiCheatIntEnterExitsIsEnabled(playerid)
  2876. {
  2877.     if(!IsPlayerConnected(playerid)) return 0;
  2878.     #if defined FILTERSCRIPT
  2879.         return CallRemoteFunction("ac_AntiCheatIntEnterExitsIsEnab", "i", playerid);
  2880.     #else
  2881.         return ac_AntiCheatIntEnterExitsIsEnab(playerid);
  2882.     #endif
  2883. }
  2884.  
  2885. stock AntiCheatStuntBonusIsEnabled(playerid)
  2886. {
  2887.     if(!IsPlayerConnected(playerid)) return 0;
  2888.     #if defined FILTERSCRIPT
  2889.         return CallRemoteFunction("ac_AntiCheatStuntBonusIsEnabled", "i", playerid);
  2890.     #else
  2891.         return ac_AntiCheatStuntBonusIsEnabled(playerid);
  2892.     #endif
  2893. }
  2894.  
  2895. stock AntiCheatIsInModShop(playerid)
  2896. {
  2897.     if(!IsPlayerConnected(playerid)) return 0;
  2898.     #if defined FILTERSCRIPT
  2899.         return CallRemoteFunction("ac_AntiCheatIsInModShop", "i", playerid);
  2900.     #else
  2901.         return ac_AntiCheatIsInModShop(playerid);
  2902.     #endif
  2903. }
  2904.  
  2905. stock AntiCheatIsFrozen(playerid)
  2906. {
  2907.     if(!IsPlayerConnected(playerid)) return 0;
  2908.     #if defined FILTERSCRIPT
  2909.         return CallRemoteFunction("ac_AntiCheatIsFrozen", "i", playerid);
  2910.     #else
  2911.         return ac_AntiCheatIsFrozen(playerid);
  2912.     #endif
  2913. }
  2914.  
  2915. stock AntiCheatIsDead(playerid)
  2916. {
  2917.     if(!IsPlayerConnected(playerid)) return 0;
  2918.     #if defined FILTERSCRIPT
  2919.         return CallRemoteFunction("ac_AntiCheatIsDead", "i", playerid);
  2920.     #else
  2921.         return ac_AntiCheatIsDead(playerid);
  2922.     #endif
  2923. }
  2924.  
  2925. stock AntiCheatIsConnected(playerid)
  2926. {
  2927.     if(!IsPlayerConnected(playerid)) return 0;
  2928.     #if defined FILTERSCRIPT
  2929.         return CallRemoteFunction("ac_AntiCheatIsConnected", "i", playerid);
  2930.     #else
  2931.         return ac_AntiCheatIsConnected(playerid);
  2932.     #endif
  2933. }
  2934.  
  2935. stock AntiCheatKickWithDesync(playerid, code)
  2936. {
  2937.     if(!IsPlayerConnected(playerid)) return 0;
  2938.     #if defined FILTERSCRIPT
  2939.         return CallRemoteFunction("ac_AntiCheatKickWithDesync", "ii", playerid, code);
  2940.     #else
  2941.         return ac_AntiCheatKickWithDesync(playerid, code);
  2942.     #endif
  2943. }
  2944.  
  2945. stock AntiCheatIsKickedWithDecync(playerid)
  2946. {
  2947.     if(!IsPlayerConnected(playerid)) return 3;
  2948.     #if defined FILTERSCRIPT
  2949.         return CallRemoteFunction("ac_AntiCheatIsKickedWithDecync", "i", playerid);
  2950.     #else
  2951.         return ac_AntiCheatIsKickedWithDecync(playerid);
  2952.     #endif
  2953. }
  2954.  
  2955. stock AntiCheatGetVehicleDriver(vehicleid)
  2956. {
  2957.     if(GetVehicleModel(vehicleid) < 400) return INVALID_PLAYER_ID;
  2958.     #if defined FILTERSCRIPT
  2959.         return CallRemoteFunction("ac_AntiCheatGetVehicleDriver", "i", vehicleid);
  2960.     #else
  2961.         return ac_AntiCheatGetVehicleDriver(vehicleid);
  2962.     #endif
  2963. }
  2964.  
  2965. stock AntiCheatGetVehicleInterior(vehicleid)
  2966. {
  2967.     if(GetVehicleModel(vehicleid) < 400) return 0;
  2968.     #if defined FILTERSCRIPT
  2969.         return CallRemoteFunction("ac_AntiCheatGetVehicleInterior", "i", vehicleid);
  2970.     #else
  2971.         return ac_AntiCheatGetVehicleInterior(vehicleid);
  2972.     #endif
  2973. }
  2974.  
  2975. stock AntiCheatGetVehiclePaintjob(vehicleid)
  2976. {
  2977.     if(GetVehicleModel(vehicleid) < 400) return 3;
  2978.     #if defined FILTERSCRIPT
  2979.         return CallRemoteFunction("ac_AntiCheatGetVehiclePaintjob", "i", vehicleid);
  2980.     #else
  2981.         return ac_AntiCheatGetVehiclePaintjob(vehicleid);
  2982.     #endif
  2983. }
  2984.  
  2985. #if defined _inc_y_hooks || defined _INC_y_hooks
  2986.     DEFINE_HOOK_REPLACEMENT(SirenState, Siren);
  2987.     DEFINE_HOOK_REPLACEMENT(Vehicle, Veh);
  2988. #endif
  2989.  
  2990. #if defined FILTERSCRIPT
  2991.  
  2992. static fs_AntiCheatGetNextDialog(playerid)
  2993. {
  2994.     if(!IsPlayerConnected(playerid)) return -1;
  2995.     return CallRemoteFunction("ac_AntiCheatGetNextDialog", "i", playerid);
  2996. }
  2997.  
  2998. static fs_AntiCheatSetDialog(playerid, dialogid)
  2999. {
  3000.     if(!(0 <= playerid < MAX_PLAYERS)) return 0;
  3001.     return CallRemoteFunction("ac_ShowPlayerDialog", "id", playerid, dialogid);
  3002. }
  3003.  
  3004. static fs_AntiCheatSetNextDialog(playerid, dialogid)
  3005. {
  3006.     if(!(0 <= playerid < MAX_PLAYERS)) return 0;
  3007.     return CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, dialogid);
  3008. }
  3009.  
  3010. #else
  3011.  
  3012. #if defined _inc_y_hooks || defined _INC_y_hooks
  3013.     hook OnGameModeInit()
  3014. #else
  3015.     public OnGameModeInit()
  3016. #endif
  3017. {
  3018.     if(!ac_LoadCfg()) printf(CFG_OPENING_ERROR, AC_CONFIG_FILE);
  3019.     if(ac_ACAllow[42])
  3020.     {
  3021.         #if !AC_USE_QUERY
  3022.             ac_QueryEnable = !!GetServerVarAsBool("query");
  3023.             SendRconCommand("query 0");
  3024.         #endif
  3025.         #undef AC_USE_QUERY
  3026.         ac_RconEnable = !!GetServerVarAsBool("rcon");
  3027.         SendRconCommand("rcon 0");
  3028.     }
  3029.     #if AC_MAX_CONNECTS_FROM_IP > 1
  3030.         ac_ACAllow[37] = false;
  3031.     #endif
  3032.     ac_LagCompMode = !!GetServerVarAsInt("lagcompmode");
  3033.     print(" ");
  3034.     print("--------------------------------------");
  3035.     print(LOADED_MSG_1);
  3036.     printf(LOADED_MSG_2, NEX_AC_VERSION);
  3037.     print(LOADED_MSG_3);
  3038.     print("--------------------------------------\n");
  3039.     new ac_a = 1;
  3040.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3041.         && defined ac_OnGameModeInit
  3042.         ac_a = ac_OnGameModeInit();
  3043.     #endif
  3044.     static ac_strtmp[10];
  3045.     GetServerVarAsString("version", ac_strtmp, sizeof ac_strtmp);
  3046.     if(strfind(ac_strtmp, AC_SERVER_VERSION) == -1 && strfind(ac_strtmp, AC_SERVER_DL_VERSION) == -1) print(VERSION_WARNING);
  3047.     #undef AC_SERVER_DL_VERSION
  3048.     #undef AC_SERVER_VERSION
  3049.     return ac_a;
  3050. }
  3051.  
  3052. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3053.     #if defined _ALS_OnGameModeInit
  3054.         #undef OnGameModeInit
  3055.     #else
  3056.         #define _ALS_OnGameModeInit
  3057.     #endif
  3058.     #define OnGameModeInit ac_OnGameModeInit
  3059.     #if defined ac_OnGameModeInit
  3060.         forward ac_OnGameModeInit();
  3061.     #endif
  3062. #endif
  3063.  
  3064. #if defined _inc_y_hooks || defined _INC_y_hooks
  3065.     hook OnGameModeExit()
  3066. #else
  3067.     public OnGameModeExit()
  3068. #endif
  3069. {
  3070.     new ac_a = 1;
  3071.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3072.         && defined ac_OnGameModeExit
  3073.         ac_a = ac_OnGameModeExit();
  3074.     #endif
  3075.     print(" ");
  3076.     print("--------------------------------------");
  3077.     print(STATS_STRING_1);
  3078.     print(STATS_STRING_2);
  3079.     printf(STATS_STRING_3, ac_sInfo[0]);
  3080.     printf(STATS_STRING_4, ac_sInfo[1]);
  3081.     printf(STATS_STRING_5, ac_sInfo[2]);
  3082.     printf(STATS_STRING_6, ac_sInfo[3]);
  3083.     printf(STATS_STRING_7, ac_sInfo[4]);
  3084.     printf(STATS_STRING_8, ac_sInfo[5]);
  3085.     print("--------------------------------------\n");
  3086.     return ac_a;
  3087. }
  3088.  
  3089. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3090.     #if defined _ALS_OnGameModeExit
  3091.         #undef OnGameModeExit
  3092.     #else
  3093.         #define _ALS_OnGameModeExit
  3094.     #endif
  3095.     #define OnGameModeExit ac_OnGameModeExit
  3096.     #if defined ac_OnGameModeExit
  3097.         forward ac_OnGameModeExit();
  3098.     #endif
  3099. #endif
  3100.  
  3101. #if defined _inc_y_hooks || defined _INC_y_hooks
  3102.     hook OnPlayerConnect(playerid)
  3103. #else
  3104.     public OnPlayerConnect(playerid)
  3105. #endif
  3106. {
  3107.     ACInfo[playerid][acVeh] =
  3108.     ACInfo[playerid][acKicked] =
  3109.     ACInfo[playerid][acKickVeh] = 0;
  3110.     GetPlayerIp(playerid, ACInfo[playerid][acIp], 16);
  3111.     if(IsPlayerNPC(playerid))
  3112.     {
  3113.         if(ac_ACAllow[36] && strcmp(ACInfo[playerid][acIp], "127.0.0.1")) ac_KickWithCode(playerid, "", 0, 36);
  3114.         ACInfo[playerid][acTimerID] = 0;
  3115.     }
  3116.     else
  3117.     {
  3118.         if(ac_ACAllow[48] && ACInfo[playerid][acOnline]) ac_KickWithCode(playerid, "", 0, 48, 1);
  3119.         if(ac_ACAllow[41])
  3120.         {
  3121.             static ac_ver[24];
  3122.             GetPlayerVersion(playerid, ac_ver, sizeof ac_ver);
  3123.             if(!strcmp(ac_ver, "unknown", true))
  3124.             {
  3125.                 #if defined DEBUG
  3126.                     printf(DEBUG_CODE_2, playerid, ac_ver);
  3127.                 #endif
  3128.                 ac_KickWithCode(playerid, "", 0, 41);
  3129.             }
  3130.         }
  3131.         new ac_i = AC_MAX_CONNECTS_FROM_IP;
  3132.         if(ac_ACAllow[40])
  3133.         {
  3134.             #if defined foreach
  3135.                 foreach(new ac_j : Player)
  3136.                 {
  3137.                     if(ac_j != playerid && !IsPlayerNPC(ac_j) && !strcmp(ACInfo[playerid][acIp], ACInfo[ac_j][acIp], false))
  3138.             #else
  3139.                 for(new ac_j = GetPlayerPoolSize(); ac_j >= 0; --ac_j)
  3140.                 {
  3141.                     if(ac_j != playerid && IsPlayerConnected(ac_j) && !IsPlayerNPC(ac_j) &&
  3142.                     !strcmp(ACInfo[playerid][acIp], ACInfo[ac_j][acIp], false))
  3143.             #endif
  3144.                 {
  3145.                     ac_i--;
  3146.                     if(ac_i < 1)
  3147.                     {
  3148.                         #if defined DEBUG
  3149.                             printf(DEBUG_CODE_3, playerid, AC_MAX_CONNECTS_FROM_IP);
  3150.                         #endif
  3151.                         #undef AC_MAX_CONNECTS_FROM_IP
  3152.                         ac_KickWithCode(playerid, "", 0, 40);
  3153.                         break;
  3154.                     }
  3155.                 }
  3156.             }
  3157.         }
  3158.         ACInfo[playerid][acSpec] =
  3159.         ACInfo[playerid][acSpawned] =
  3160.         ACInfo[playerid][acDeathRes] = false;
  3161.         ACInfo[playerid][acDead] = true;
  3162.         ACInfo[playerid][acIntEnterExits] = ac_IntEnterExits;
  3163.         ACInfo[playerid][acStuntBonus] = ac_StuntBonus;
  3164.         ACInfo[playerid][acCheatCount][0] =
  3165.         ACInfo[playerid][acLastWeapon] =
  3166.         ACInfo[playerid][acSpawnRes] =
  3167.         ACInfo[playerid][acMoney] =
  3168.         ACInfo[playerid][acAnim] =
  3169.         ACInfo[playerid][acInt] = 0;
  3170.         ACInfo[playerid][acSet][12] =
  3171.         ACInfo[playerid][acSet][10] =
  3172.         ACInfo[playerid][acSet][0] =
  3173.         ACInfo[playerid][acNextDialog] =
  3174.         ACInfo[playerid][acDialog] = -1;
  3175.         for(ac_i = 12; ac_i >= 0; --ac_i)
  3176.         {
  3177.             ACInfo[playerid][acSetWeapon][ac_i] = -1;
  3178.             ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  3179.         }
  3180.         for(ac_i = 27; ac_i >= 0; --ac_i) ACInfo[playerid][acFloodCount][ac_i] = 0;
  3181.         ACInfo[playerid][acDropJpX] = ACInfo[playerid][acDropJpY] = ACInfo[playerid][acDropJpZ] = 25000.0;
  3182.         memcpy(ACInfo[playerid][acNOPAllow], ac_NOPAllow, 0, sizeof(ac_NOPAllow) * 4, sizeof ac_NOPAllow);
  3183.         memcpy(ACInfo[playerid][acACAllow], ac_ACAllow, 0, sizeof(ac_ACAllow) * 4, sizeof ac_ACAllow);
  3184.         #if defined SetPlayerTimerEx_
  3185.             ACInfo[playerid][acTimerID] = SetPlayerTimerEx_(playerid, "ac_Timer", 0, 1000, 1, "i", playerid);
  3186.         #else
  3187.             ACInfo[playerid][acTimerID] = SetTimerEx("ac_Timer", 1000, false, "i", playerid);
  3188.         #endif
  3189.     }
  3190.     ACInfo[playerid][acOnline] = true;
  3191.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3192.         && defined ac_OnPlayerConnect
  3193.         return ac_OnPlayerConnect(playerid);
  3194.     #else
  3195.         return 1;
  3196.     #endif
  3197. }
  3198.  
  3199. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3200.     #if defined _ALS_OnPlayerConnect
  3201.         #undef OnPlayerConnect
  3202.     #else
  3203.         #define _ALS_OnPlayerConnect
  3204.     #endif
  3205.     #define OnPlayerConnect ac_OnPlayerConnect
  3206.     #if defined ac_OnPlayerConnect
  3207.         forward ac_OnPlayerConnect(playerid);
  3208.     #endif
  3209. #endif
  3210.  
  3211. #if defined _inc_y_hooks || defined _INC_y_hooks
  3212.     hook OnPlayerDisconnect(playerid, reason)
  3213. #else
  3214.     public OnPlayerDisconnect(playerid, reason)
  3215. #endif
  3216. {
  3217.     ACInfo[playerid][acOnline] = false;
  3218.     if(!IsPlayerNPC(playerid))
  3219.     {
  3220.         #if defined KillPlayerTimer
  3221.             KillPlayerTimer(ACInfo[playerid][acTimerID]);
  3222.         #else
  3223.             KillTimer(ACInfo[playerid][acTimerID]);
  3224.         #endif
  3225.         if(ACInfo[playerid][acACAllow][37]) BlockIpAddress(ACInfo[playerid][acIp],
  3226.         (AC_MIN_TIME_RECONNECT * 1000) - (reason > 0 ? 0 : GetServerVarAsInt("playertimeout")));
  3227.         #undef AC_MIN_TIME_RECONNECT
  3228.     }
  3229.     #if defined KillPlayerTimer
  3230.         KillPlayerTimer(ACInfo[playerid][acKickTimerID]);
  3231.     #else
  3232.         KillTimer(ACInfo[playerid][acKickTimerID]);
  3233.     #endif
  3234.     new ac_vehid = ACInfo[playerid][acKickVeh];
  3235.     if(ac_vehid > 0)
  3236.     {
  3237.         if(ACVehInfo[ac_vehid][acDriver] == playerid) ACVehInfo[ac_vehid][acDriver] = INVALID_PLAYER_ID;
  3238.         if(ACInfo[playerid][acKicked] == 2)
  3239.         {
  3240.             LinkVehicleToInterior(ac_vehid, ACVehInfo[ac_vehid][acInt]);
  3241.             SetVehicleZAngle(ac_vehid, ACVehInfo[ac_vehid][acZAngle]);
  3242.             SetVehiclePos(ac_vehid, ACVehInfo[ac_vehid][acPosX], ACVehInfo[ac_vehid][acPosY], ACVehInfo[ac_vehid][acPosZ]);
  3243.             SetVehicleHealth(ac_vehid, ACVehInfo[ac_vehid][acHealth]);
  3244.             ChangeVehiclePaintjob(ac_vehid, ACVehInfo[ac_vehid][acPaintJob]);
  3245.         }
  3246.     }
  3247.     if((ac_vehid = ACInfo[playerid][acVeh]) > 0)
  3248.     {
  3249.         if(ACVehInfo[ac_vehid][acDriver] == playerid) ACVehInfo[ac_vehid][acDriver] = INVALID_PLAYER_ID;
  3250.         if(ACInfo[playerid][acKicked] == 2)
  3251.         {
  3252.             LinkVehicleToInterior(ac_vehid, ACVehInfo[ac_vehid][acInt]);
  3253.             SetVehicleZAngle(ac_vehid, ACVehInfo[ac_vehid][acZAngle]);
  3254.             SetVehiclePos(ac_vehid, ACVehInfo[ac_vehid][acPosX], ACVehInfo[ac_vehid][acPosY], ACVehInfo[ac_vehid][acPosZ]);
  3255.             SetVehicleHealth(ac_vehid, ACVehInfo[ac_vehid][acHealth]);
  3256.             ChangeVehiclePaintjob(ac_vehid, ACVehInfo[ac_vehid][acPaintJob]);
  3257.         }
  3258.     }
  3259.     if(ACInfo[playerid][acKicked] < 1) ACInfo[playerid][acKicked] = 3;
  3260.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3261.         && defined ac_OnPlayerDisconnect
  3262.         return ac_OnPlayerDisconnect(playerid, reason);
  3263.     #else
  3264.         return 1;
  3265.     #endif
  3266. }
  3267.  
  3268. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3269.     #if defined _ALS_OnPlayerDisconnect
  3270.         #undef OnPlayerDisconnect
  3271.     #else
  3272.         #define _ALS_OnPlayerDisconnect
  3273.     #endif
  3274.     #define OnPlayerDisconnect ac_OnPlayerDisconnect
  3275.     #if defined ac_OnPlayerDisconnect
  3276.         forward ac_OnPlayerDisconnect(playerid, reason);
  3277.     #endif
  3278. #endif
  3279.  
  3280. #if defined _inc_y_hooks || defined _INC_y_hooks
  3281.     hook OnPlayerSpawn(playerid)
  3282. #else
  3283.     public OnPlayerSpawn(playerid)
  3284. #endif
  3285. {
  3286.     if(ACInfo[playerid][acKicked] > 0) return 0;
  3287.     if(!IsPlayerNPC(playerid))
  3288.     {
  3289.         new ac_i, ac_gtc = GetTickCount();
  3290.         if(ACInfo[playerid][acSpec] && ACInfo[playerid][acSet][7] < 2)
  3291.         {
  3292.             ACInfo[playerid][acSet][3] =
  3293.             ACInfo[playerid][acSet][4] =
  3294.             ACInfo[playerid][acSet][8] =
  3295.             ACInfo[playerid][acSet][9] = -1;
  3296.             ACInfo[playerid][acSpec] = false;
  3297.         }
  3298.         else
  3299.         {
  3300.             if(ACInfo[playerid][acACAllow][27] &&
  3301.             (ACInfo[playerid][acSpawnRes] < 1 || ac_gtc < ACInfo[playerid][acSpawnTime] + 1000))
  3302.             {
  3303.                 #if defined DEBUG
  3304.                     printf("[Nex-AC debug] Spawn res: %d, Respawn time: %d",
  3305.                     ACInfo[playerid][acSpawnRes], ac_gtc - ACInfo[playerid][acSpawnTime]);
  3306.                 #endif
  3307.                 ac_KickWithCode(playerid, "", 0, 27);
  3308.                 #if defined OnCheatDetected
  3309.                     ACInfo[playerid][acSpawnRes] = 1;
  3310.                 #endif
  3311.             }
  3312.             if(ACInfo[playerid][acSpawnRes] > 0) ACInfo[playerid][acSpawnRes]--;
  3313.             if(!(1 <= ACInfo[playerid][acSet][7] <= 2))
  3314.             {
  3315.                 for(ac_i = 11; ac_i >= 0; --ac_i) ACInfo[playerid][acSet][ac_i] = -1;
  3316.                 SetPlayerHealth(playerid, 100.0);
  3317.                 SetPlayerArmour(playerid, 0.0);
  3318.                 SetPlayerInterior(playerid, 0);
  3319.                 ACInfo[playerid][acHealth] = 100;
  3320.                 ACInfo[playerid][acArmour] =
  3321.                 ACInfo[playerid][acInt] = 0;
  3322.             }
  3323.         }
  3324.         if(!(1 <= ACInfo[playerid][acSet][7] <= 2))
  3325.         {
  3326.             for(ac_i = 12; ac_i >= 0; --ac_i)
  3327.             {
  3328.                 ACInfo[playerid][acSetWeapon][ac_i] = -1;
  3329.                 ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  3330.             }
  3331.             ACInfo[playerid][acNextSpecAct] = -1;
  3332.             ACInfo[playerid][acUnFrozen] = true;
  3333.             ACInfo[playerid][acTpToZ] = false;
  3334.         }
  3335.         for(ac_i = 12; ac_i >= 0; --ac_i) ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acAmmo][ac_i] = 0;
  3336.         ACInfo[playerid][acModShop] =
  3337.         ACInfo[playerid][acDead] = false;
  3338.         ACInfo[playerid][acSpawned] = true;
  3339.         ACInfo[playerid][acLastPickup] =
  3340.         ACInfo[playerid][acSet][7] =
  3341.         ACInfo[playerid][acSeat] = -1;
  3342.         ACInfo[playerid][acCheatCount][5] =
  3343.         ACInfo[playerid][acCheatCount][6] =
  3344.         ACInfo[playerid][acCheatCount][7] =
  3345.         ACInfo[playerid][acCheatCount][8] =
  3346.         ACInfo[playerid][acCheatCount][9] =
  3347.         ACInfo[playerid][acCheatCount][13] =
  3348.         ACInfo[playerid][acCheatCount][14] =
  3349.         ACInfo[playerid][acCheatCount][16] =
  3350.         ACInfo[playerid][acCheatCount][18] =
  3351.         ACInfo[playerid][acLastSpecAct] =
  3352.         ACInfo[playerid][acLastWeapon] =
  3353.         ACInfo[playerid][acParachute] =
  3354.         ACInfo[playerid][acEnterVeh] =
  3355.         ACInfo[playerid][acLastShot] =
  3356.         ACInfo[playerid][acKickVeh] =
  3357.         ACInfo[playerid][acSpecAct] =
  3358.         ACInfo[playerid][acDmgRes] =
  3359.         ACInfo[playerid][acIntRet] =
  3360.         ACInfo[playerid][acSpeed] =
  3361.         ACInfo[playerid][acVeh] = 0;
  3362.         ACInfo[playerid][acSetPosTime] =
  3363.         ACInfo[playerid][acGtc][7] = ac_gtc + 2650;
  3364.         if(1 <= ACInfo[playerid][acSpawnWeapon1] <= 46)
  3365.         {
  3366.             ac_i = ac_wSlot[ACInfo[playerid][acSpawnWeapon1]];
  3367.             ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acSpawnWeapon1];
  3368.             ACInfo[playerid][acAmmo][ac_i] = ACInfo[playerid][acSpawnAmmo1];
  3369.         }
  3370.         if(1 <= ACInfo[playerid][acSpawnWeapon2] <= 46)
  3371.         {
  3372.             ac_i = ac_wSlot[ACInfo[playerid][acSpawnWeapon2]];
  3373.             ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acSpawnWeapon2];
  3374.             ACInfo[playerid][acAmmo][ac_i] = ACInfo[playerid][acSpawnAmmo2];
  3375.         }
  3376.         if(1 <= ACInfo[playerid][acSpawnWeapon3] <= 46)
  3377.         {
  3378.             ac_i = ac_wSlot[ACInfo[playerid][acSpawnWeapon3]];
  3379.             ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acSpawnWeapon3];
  3380.             ACInfo[playerid][acAmmo][ac_i] = ACInfo[playerid][acSpawnAmmo3];
  3381.         }
  3382.     }
  3383.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3384.         && defined ac_OnPlayerSpawn
  3385.         return ac_OnPlayerSpawn(playerid);
  3386.     #else
  3387.         return 1;
  3388.     #endif
  3389. }
  3390.  
  3391. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3392.     #if defined _ALS_OnPlayerSpawn
  3393.         #undef OnPlayerSpawn
  3394.     #else
  3395.         #define _ALS_OnPlayerSpawn
  3396.     #endif
  3397.     #define OnPlayerSpawn ac_OnPlayerSpawn
  3398.     #if defined ac_OnPlayerSpawn
  3399.         forward ac_OnPlayerSpawn(playerid);
  3400.     #endif
  3401. #endif
  3402.  
  3403. #if defined _inc_y_hooks || defined _INC_y_hooks
  3404.     hook OnPlayerDeath(playerid, killerid, reason)
  3405. #else
  3406.     public OnPlayerDeath(playerid, killerid, reason)
  3407. #endif
  3408. {
  3409.     if(ACInfo[playerid][acKicked] > 0) return 0;
  3410.     if(ACInfo[playerid][acACAllow][28] &&
  3411.     (ACInfo[playerid][acDead] || !ACInfo[playerid][acDeathRes] &&
  3412.     reason != 255 && (reason != WEAPON_COLLISION || killerid != INVALID_PLAYER_ID)))
  3413.     {
  3414.         #if defined DEBUG
  3415.             printf("[Nex-AC debug] Is dead: %d, Death res: %d, killerid: %d, reason: %d",
  3416.             ACInfo[playerid][acDead], ACInfo[playerid][acDeathRes], killerid, reason);
  3417.         #endif
  3418.         ac_KickWithCode(playerid, "", 0, 28);
  3419.     }
  3420.     ACInfo[playerid][acDead] = true;
  3421.     ACInfo[playerid][acDeathRes] = false;
  3422.     if(ACInfo[playerid][acSpawnRes] < 1) ACInfo[playerid][acSpawnTime] = GetTickCount();
  3423.     ACInfo[playerid][acSpawnRes] = 1;
  3424.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3425.         && defined ac_OnPlayerDeath
  3426.         return ac_OnPlayerDeath(playerid, killerid, reason);
  3427.     #else
  3428.         return 1;
  3429.     #endif
  3430. }
  3431.  
  3432. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3433.     #if defined _ALS_OnPlayerDeath
  3434.         #undef OnPlayerDeath
  3435.     #else
  3436.         #define _ALS_OnPlayerDeath
  3437.     #endif
  3438.     #define OnPlayerDeath ac_OnPlayerDeath
  3439.     #if defined ac_OnPlayerDeath
  3440.         forward ac_OnPlayerDeath(playerid, killerid, reason);
  3441.     #endif
  3442. #endif
  3443.  
  3444. #if defined _inc_y_hooks || defined _INC_y_hooks
  3445.     hook OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
  3446. #else
  3447.     public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
  3448. #endif
  3449. {
  3450.     if(ACInfo[playerid][acKicked] > 0) return 1;
  3451.     if(ACInfo[playerid][acACAllow][47] && !(3 <= bodypart <= 9))
  3452.     {
  3453.         #if defined DEBUG
  3454.             printf("[Nex-AC debug] Issuerid: %d, amount: %f, weaponid: %d, bodypart: %d", issuerid, amount, weaponid, bodypart);
  3455.         #endif
  3456.         ac_KickWithCode(playerid, "", 0, 47, 4);
  3457.         return 1;
  3458.     }
  3459.     if(!ACInfo[playerid][acDead]) ACInfo[playerid][acDeathRes] = true;
  3460.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3461.         && defined ac_OnPlayerTakeDamage
  3462.         return ac_OnPlayerTakeDamage(playerid, issuerid, amount, weaponid, bodypart);
  3463.     #else
  3464.         return 0;
  3465.     #endif
  3466. }
  3467.  
  3468. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3469.     #if defined _ALS_OnPlayerTakeDamage
  3470.         #undef OnPlayerTakeDamage
  3471.     #else
  3472.         #define _ALS_OnPlayerTakeDamage
  3473.     #endif
  3474.     #define OnPlayerTakeDamage ac_OnPlayerTakeDamage
  3475.     #if defined ac_OnPlayerTakeDamage
  3476.         forward ac_OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart);
  3477.     #endif
  3478. #endif
  3479.  
  3480. #if defined _inc_y_hooks || defined _INC_y_hooks
  3481.     hook OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
  3482. #else
  3483.     public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
  3484. #endif
  3485. {
  3486.     if(ACInfo[playerid][acKicked] > 0) return 1;
  3487.     if(ACInfo[playerid][acACAllow][47] && (!(0 <= damagedid < MAX_PLAYERS) || !(3 <= bodypart <= 9)))
  3488.     {
  3489.         #if defined DEBUG
  3490.             printf("[Nex-AC debug] Damagedid: %d, amount: %f, weaponid: %d, bodypart: %d", damagedid, amount, weaponid, bodypart);
  3491.         #endif
  3492.         ac_KickWithCode(playerid, "", 0, 47, 3);
  3493.         return 1;
  3494.     }
  3495.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3496.         && defined ac_OnPlayerGiveDamage
  3497.         return ac_OnPlayerGiveDamage(playerid, damagedid, amount, weaponid, bodypart);
  3498.     #else
  3499.         return 0;
  3500.     #endif
  3501. }
  3502.  
  3503. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3504.     #if defined _ALS_OnPlayerGiveDamage
  3505.         #undef OnPlayerGiveDamage
  3506.     #else
  3507.         #define _ALS_OnPlayerGiveDamage
  3508.     #endif
  3509.     #define OnPlayerGiveDamage ac_OnPlayerGiveDamage
  3510.     #if defined ac_OnPlayerGiveDamage
  3511.         forward ac_OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart);
  3512.     #endif
  3513. #endif
  3514.  
  3515. #endif
  3516.  
  3517. #if defined FILTERSCRIPT
  3518.  
  3519. #if defined _inc_y_hooks || defined _INC_y_hooks
  3520.     hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  3521. #else
  3522.     public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  3523. #endif
  3524. {
  3525.     if(dialogid != AntiCheatGetDialog(playerid))
  3526.     {
  3527.         new ac_nd = fs_AntiCheatGetNextDialog(playerid);
  3528.         if(dialogid == ac_nd) fs_AntiCheatSetDialog(playerid, ac_nd);
  3529.     }
  3530.     fs_AntiCheatSetNextDialog(playerid, -1);
  3531.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3532.         && defined ac_fs_OnDialogResponse
  3533.         return ac_fs_OnDialogResponse(playerid, dialogid, response, listitem, inputtext);
  3534.     #else
  3535.         return 0;
  3536.     #endif
  3537. }
  3538.  
  3539. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3540.     #if defined _ALS_OnDialogResponse
  3541.         #undef OnDialogResponse
  3542.     #else
  3543.         #define _ALS_OnDialogResponse
  3544.     #endif
  3545.     #define OnDialogResponse ac_fs_OnDialogResponse
  3546.     #if defined ac_fs_OnDialogResponse
  3547.         forward ac_fs_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
  3548.     #endif
  3549. #endif
  3550.  
  3551. #else
  3552.  
  3553. #if defined _inc_y_hooks || defined _INC_y_hooks
  3554.     hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  3555. #else
  3556.     public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  3557. #endif
  3558. {
  3559.     if(ACInfo[playerid][acKicked] > 0) return 1;
  3560.     new ac_i = GetTickCount();
  3561.     if(ACInfo[playerid][acACAllow][49])
  3562.     {
  3563.         if(ac_i < ACInfo[playerid][acCall][0] + ac_Mtfc[0][0]) ac_FloodDetect(playerid, 0);
  3564.         else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  3565.         else ACInfo[playerid][acFloodCount][0] = ACInfo[playerid][acFloodCount][27] = 0;
  3566.     }
  3567.     if(ACInfo[playerid][acACAllow][39] && (dialogid != ACInfo[playerid][acDialog] || listitem < -1))
  3568.     {
  3569.         #if defined DEBUG
  3570.             printf("[Nex-AC debug] AC dialog: %d, dialogid: %d, listitem: %d, playerid: %d",
  3571.             ACInfo[playerid][acDialog], dialogid, listitem, playerid);
  3572.         #endif
  3573.         ac_KickWithCode(playerid, "", 0, 39);
  3574.         return 1;
  3575.     }
  3576.     ACInfo[playerid][acDialog] = -1;
  3577.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][0] = ac_i;
  3578.     if(ACInfo[playerid][acACAllow][45])
  3579.     {
  3580.         for(ac_i = strlen(inputtext) - 1; ac_i >= 0; --ac_i)
  3581.         {
  3582.             if(inputtext[ac_i] == '%') strdel(inputtext, ac_i, ac_i + 1);
  3583.         }
  3584.     }
  3585.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3586.         && defined ac_OnDialogResponse
  3587.         return ac_OnDialogResponse(playerid, dialogid, response, listitem, inputtext);
  3588.     #else
  3589.         return 0;
  3590.     #endif
  3591. }
  3592.  
  3593. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3594.     #if defined _ALS_OnDialogResponse
  3595.         #undef OnDialogResponse
  3596.     #else
  3597.         #define _ALS_OnDialogResponse
  3598.     #endif
  3599.     #define OnDialogResponse ac_OnDialogResponse
  3600.     #if defined ac_OnDialogResponse
  3601.         forward ac_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
  3602.     #endif
  3603. #endif
  3604.  
  3605. #if defined _inc_y_hooks || defined _INC_y_hooks
  3606.     hook OnEnterExitModShop(playerid, enterexit, interiorid)
  3607. #else
  3608.     public OnEnterExitModShop(playerid, enterexit, interiorid)
  3609. #endif
  3610. {
  3611.     if(ACInfo[playerid][acKicked] > 0) return 0;
  3612.     #if !AC_USE_TUNING_GARAGES
  3613.         if(ACInfo[playerid][acACAllow][23]) ac_KickWithCode(playerid, "", 0, 23, 1);
  3614.     #else
  3615.         if(ACInfo[playerid][acACAllow][23] &&
  3616.         (!(0 <= enterexit <= 1) || !(0 <= interiorid <= 3))) ac_KickWithCode(playerid, "", 0, 23, 7);
  3617.     #endif
  3618.     new ac_i = GetTickCount();
  3619.     if(ACInfo[playerid][acACAllow][49])
  3620.     {
  3621.         if(ac_i < ACInfo[playerid][acCall][1] + ac_Mtfc[1][0]) ac_FloodDetect(playerid, 1);
  3622.         else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  3623.         else ACInfo[playerid][acFloodCount][1] = ACInfo[playerid][acFloodCount][27] = 0;
  3624.     }
  3625.     ACInfo[playerid][acModShop] = !!enterexit;
  3626.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][1] = ac_i;
  3627.     ACInfo[playerid][acSetPosTime] = ACInfo[playerid][acGtc][11] = ac_i + 3250;
  3628.     new ac_veh = ACInfo[playerid][acVeh];
  3629.     if(ACInfo[playerid][acKicked] < 1)
  3630.     {
  3631.         ac_i = interiorid % 256;
  3632.         ACVehInfo[ac_veh][acInt] = ac_i;
  3633.         #if defined foreach
  3634.             foreach(new ac_j : Player)
  3635.             {
  3636.                 if(ACInfo[ac_j][acVeh] == ac_veh) ACInfo[ac_j][acInt] = ac_i;
  3637.             }
  3638.         #else
  3639.             for(new ac_j = GetPlayerPoolSize(); ac_j >= 0; --ac_j)
  3640.             {
  3641.                 if(IsPlayerInVehicle(ac_j, ac_veh)) ACInfo[ac_j][acInt] = ac_i;
  3642.             }
  3643.         #endif
  3644.     }
  3645.     else
  3646.     {
  3647.         #if defined foreach
  3648.             foreach(new ac_j : Player)
  3649.             {
  3650.                 if(ACInfo[ac_j][acVeh] == ac_veh)
  3651.                 {
  3652.                     if(ACInfo[ac_j][acUnFrozen]) ACInfo[ac_j][acIntRet] = 2;
  3653.                     else ACInfo[ac_j][acIntRet] = 1;
  3654.                 }
  3655.             }
  3656.         #else
  3657.             for(new ac_j = GetPlayerPoolSize(); ac_j >= 0; --ac_j)
  3658.             {
  3659.                 if(IsPlayerInVehicle(ac_j, ac_veh))
  3660.                 {
  3661.                     if(ACInfo[ac_j][acUnFrozen]) ACInfo[ac_j][acIntRet] = 2;
  3662.                     else ACInfo[ac_j][acIntRet] = 1;
  3663.                 }
  3664.             }
  3665.         #endif
  3666.     }
  3667.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3668.         && defined ac_OnEnterExitModShop
  3669.         return ac_OnEnterExitModShop(playerid, enterexit, interiorid);
  3670.     #else
  3671.         return 1;
  3672.     #endif
  3673. }
  3674.  
  3675. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3676.     #if defined _ALS_OnEnterExitModShop
  3677.         #undef OnEnterExitModShop
  3678.     #else
  3679.         #define _ALS_OnEnterExitModShop
  3680.     #endif
  3681.     #define OnEnterExitModShop ac_OnEnterExitModShop
  3682.     #if defined ac_OnEnterExitModShop
  3683.         forward ac_OnEnterExitModShop(playerid, enterexit, interiorid);
  3684.     #endif
  3685. #endif
  3686.  
  3687. #if defined _inc_y_hooks || defined _INC_y_hooks
  3688.     hook OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  3689. #else
  3690.     public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  3691. #endif
  3692. {
  3693.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] > 0) return 0;
  3694.     if(ACInfo[playerid][acIntRet] > 0)
  3695.     {
  3696.         SetPlayerInterior(playerid, ACInfo[playerid][acInt]);
  3697.         if(ACInfo[playerid][acIntRet] == 2) TogglePlayerControllable(playerid, 1);
  3698.         ACInfo[playerid][acIntRet] = 0;
  3699.     }
  3700.     else if(newinteriorid != ACInfo[playerid][acSet][0])
  3701.     {
  3702.         if(ACInfo[playerid][acSet][0] == -1)
  3703.         {
  3704.             new ac_vehid = GetPlayerVehicleID(playerid);
  3705.             if(ac_vehid > 0)
  3706.             {
  3707.                 if(ACInfo[playerid][acACAllow][3] && newinteriorid != ACInfo[playerid][acInt])
  3708.                 {
  3709.                     #if defined DEBUG
  3710.                         printf("[Nex-AC debug] AC interior: %d, acInt (last): %d, newinteriorid: %d, oldinteriorid: %d, veh: %d",
  3711.                         ACInfo[playerid][acSet][0], ACInfo[playerid][acInt], newinteriorid, oldinteriorid, ac_vehid);
  3712.                     #endif
  3713.                     ac_KickWithCode(playerid, "", 0, 3, 1);
  3714.                 }
  3715.             }
  3716.             else if(ACInfo[playerid][acIntEnterExits])
  3717.             {
  3718.                 GetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  3719.                 ACInfo[playerid][acSetPosTime] = ACInfo[playerid][acGtc][11] = GetTickCount() + 3250;
  3720.             }
  3721.             else if(ACInfo[playerid][acACAllow][2] && newinteriorid != ACInfo[playerid][acInt])
  3722.             {
  3723.                 #if defined DEBUG
  3724.                     printf("[Nex-AC debug] AC interior: %d, acInt (last): %d, newinteriorid: %d, oldinteriorid: %d",
  3725.                     ACInfo[playerid][acSet][0], ACInfo[playerid][acInt], newinteriorid, oldinteriorid);
  3726.                 #endif
  3727.                 ac_KickWithCode(playerid, "", 0, 2, 1);
  3728.             }
  3729.         }
  3730.     }
  3731.     else ACInfo[playerid][acSet][0] = -1;
  3732.     if(ACInfo[playerid][acKicked] < 1) ACInfo[playerid][acInt] = newinteriorid % 256;
  3733.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3734.         && defined ac_OnPlayerInteriorChange
  3735.         return ac_OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
  3736.     #else
  3737.         return 1;
  3738.     #endif
  3739. }
  3740.  
  3741. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3742.     #if defined _ALS_OnPlayerInteriorChange
  3743.         #undef OnPlayerInteriorChange
  3744.     #else
  3745.         #define _ALS_OnPlayerInteriorChange
  3746.     #endif
  3747.     #define OnPlayerInteriorChange ac_OnPlayerInteriorChange
  3748.     #if defined ac_OnPlayerInteriorChange
  3749.         forward ac_OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
  3750.     #endif
  3751. #endif
  3752.  
  3753. #if defined _inc_y_hooks || defined _INC_y_hooks
  3754.     hook OnRconLoginAttempt(ip[], password[], success)
  3755. #else
  3756.     public OnRconLoginAttempt(ip[], password[], success)
  3757. #endif
  3758. {
  3759.     if(ac_ACAllow[42])
  3760.     {
  3761.         static ac_ipTables[MAX_PLAYERS][2], ac_ip_index;
  3762.         new ac_i, ac_current_ip = ac_IpToInt(ip);
  3763.         for(; ac_i < ac_ip_index && ac_i < sizeof ac_ipTables; ++ac_i)
  3764.         {
  3765.             if(ac_ipTables[ac_i][0] == ac_current_ip)
  3766.             {
  3767.                 if(success) ac_ipTables[ac_i][1] = 0;
  3768.                 else if(++ac_ipTables[ac_i][1] > AC_MAX_RCON_LOGIN_ATTEMPT)
  3769.                 {
  3770.                     #if defined DEBUG
  3771.                         printf(DEBUG_CODE_4, ip, password);
  3772.                     #endif
  3773.                     ac_ipTables[ac_i][1] = 0;
  3774.                     ac_KickWithCode(INVALID_PLAYER_ID, ip, 1, 42, 1);
  3775.                 }
  3776.                 #if defined OnCheatWarning
  3777.                     else OnCheatWarning(INVALID_PLAYER_ID, ip, 1, 42, 1, ac_ipTables[ac_i][1]);
  3778.                 #endif
  3779.                 ac_i = -1;
  3780.                 break;
  3781.             }
  3782.         }
  3783.         if(ac_i != -1 && !success)
  3784.         {
  3785.             ac_ipTables[ac_ip_index][0] = ac_current_ip;
  3786.             if(++ac_ipTables[ac_ip_index][1] > AC_MAX_RCON_LOGIN_ATTEMPT)
  3787.             {
  3788.                 #undef AC_MAX_RCON_LOGIN_ATTEMPT
  3789.                 #if defined DEBUG
  3790.                     printf(DEBUG_CODE_4, ip, password, ac_ipTables[ac_ip_index][1]);
  3791.                 #endif
  3792.                 ac_ipTables[ac_ip_index][1] = 0;
  3793.                 ac_KickWithCode(INVALID_PLAYER_ID, ip, 1, 42, 2);
  3794.             }
  3795.             #if defined OnCheatWarning
  3796.                 else OnCheatWarning(INVALID_PLAYER_ID, ip, 1, 42, 2, ac_ipTables[ac_ip_index][1]);
  3797.             #endif
  3798.             if(++ac_ip_index >= sizeof ac_ipTables) ac_ip_index = 0;
  3799.             ac_ipTables[ac_ip_index][1] = 0;
  3800.         }
  3801.     }
  3802.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  3803.         && defined ac_OnRconLoginAttempt
  3804.         return ac_OnRconLoginAttempt(ip, password, success);
  3805.     #else
  3806.         return 1;
  3807.     #endif
  3808. }
  3809.  
  3810. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  3811.     #if defined _ALS_OnRconLoginAttempt
  3812.         #undef OnRconLoginAttempt
  3813.     #else
  3814.         #define _ALS_OnRconLoginAttempt
  3815.     #endif
  3816.     #define OnRconLoginAttempt ac_OnRconLoginAttempt
  3817.     #if defined ac_OnRconLoginAttempt
  3818.         forward ac_OnRconLoginAttempt(ip[], password[], success);
  3819.     #endif
  3820. #endif
  3821.  
  3822. #if defined _inc_y_hooks || defined _INC_y_hooks
  3823.     hook OnPlayerUpdate(playerid)
  3824. #else
  3825.     public OnPlayerUpdate(playerid)
  3826. #endif
  3827. {
  3828.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] > 0) return 0;
  3829.     new ac_gtc = GetTickCount(), ac_gpp;
  3830.     if(!IsPlayerNPC(playerid))
  3831.     {
  3832.         new ac_w, ac_sa = GetPlayerState(playerid);
  3833.         if(ac_sa != PLAYER_STATE_SPECTATING && (ac_w = GetPlayerWeapon(playerid)) != -1)
  3834.         {
  3835.             ac_gpp = GetPlayerPing(playerid);
  3836.             new ac_a = GetPlayerAmmo(playerid), ac_s = ac_wSlot[ac_w];
  3837.             if(ACInfo[playerid][acSet][3] != -1)
  3838.             {
  3839.                 if(ACInfo[playerid][acSet][3] == ac_w)
  3840.                 {
  3841.                     ACInfo[playerid][acSet][3] =
  3842.                     ACInfo[playerid][acSetWeapon][ac_s] = -1;
  3843.                     ACInfo[playerid][acWeapon][ac_s] = ac_w;
  3844.                 }
  3845.                 else if(ACInfo[playerid][acGiveAmmo][ac_wSlot[ACInfo[playerid][acSet][3]]] == 0 ||
  3846.                 ac_wSlot[ACInfo[playerid][acSet][3]] != ac_s && ac_gtc > ACInfo[playerid][acGtc][2] + ac_gpp) ACInfo[playerid][acSet][3] = -1;
  3847.                 else if(!(PLAYER_STATE_DRIVER <= ac_sa <= PLAYER_STATE_PASSENGER) && ac_gtc > ACInfo[playerid][acGtc][2] + ac_gpp)
  3848.                 {
  3849.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][0])
  3850.                     {
  3851.                         if(++ACInfo[playerid][acNOPCount][0] > AC_MAX_NOP_WARNINGS)
  3852.                         {
  3853.                             #if defined DEBUG
  3854.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerArmedWeapon");
  3855.                                 printf("[Nex-AC debug] AC weapon: %d, weaponid: %d", ACInfo[playerid][acSet][3], ac_w);
  3856.                             #endif
  3857.                             #if defined OnCheatDetected
  3858.                                 ac_KickWithCode(playerid, "", 0, 52, 1);
  3859.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  3860.                                 ACInfo[playerid][acSetWeapon][ac_s] = ACInfo[playerid][acSet][3] = -1;
  3861.                             #else
  3862.                                 return ac_KickWithCode(playerid, "", 0, 52, 1);
  3863.                             #endif
  3864.                         }
  3865.                         #if defined OnNOPWarning
  3866.                             else OnNOPWarning(playerid, 1, ACInfo[playerid][acNOPCount][0]);
  3867.                         #endif
  3868.                     }
  3869.                     else if(++ACInfo[playerid][acNOPCount][0] > AC_MAX_NOP_WARNINGS)
  3870.                     {
  3871.                         ACInfo[playerid][acSetWeapon][ac_s] =
  3872.                         ACInfo[playerid][acSet][3] = -1;
  3873.                     }
  3874.                 }
  3875.             }
  3876.             if(ACInfo[playerid][acGiveAmmo][ac_s] != -65535)
  3877.             {
  3878.                 if(ACInfo[playerid][acGiveAmmo][ac_s] == ac_a ||
  3879.                 ACInfo[playerid][acGiveAmmo][ac_s] > ac_a && ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_s] + ac_gpp)
  3880.                 {
  3881.                     ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  3882.                     ACInfo[playerid][acAmmo][ac_s] = ac_a;
  3883.                 }
  3884.                 else if(ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_s] + ac_gpp)
  3885.                 {
  3886.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][1])
  3887.                     {
  3888.                         if(++ACInfo[playerid][acNOPCount][1] > AC_MAX_NOP_WARNINGS)
  3889.                         {
  3890.                             #if defined DEBUG
  3891.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerAmmo");
  3892.                                 printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  3893.                                 ACInfo[playerid][acGiveAmmo][ac_s], ac_a, ac_w);
  3894.                             #endif
  3895.                             #if defined OnCheatDetected
  3896.                                 ac_KickWithCode(playerid, "", 0, 52, 2);
  3897.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  3898.                                 ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  3899.                             #else
  3900.                                 return ac_KickWithCode(playerid, "", 0, 52, 2);
  3901.                             #endif
  3902.                         }
  3903.                         #if defined OnNOPWarning
  3904.                             else OnNOPWarning(playerid, 2, ACInfo[playerid][acNOPCount][1]);
  3905.                         #endif
  3906.                     }
  3907.                     else if(++ACInfo[playerid][acNOPCount][1] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acGiveAmmo][ac_s] = -65535;
  3908.                 }
  3909.             }
  3910.             #if AC_USE_AMMUNATIONS || AC_USE_TUNING_GARAGES
  3911.                 new ac_money = bad_GetPlayerMoney(playerid);
  3912.             #endif
  3913.             #if AC_USE_AMMUNATIONS
  3914.                 if(ACInfo[playerid][acSet][10] != -1)
  3915.                 {
  3916.                     if(ac_money < ACInfo[playerid][acMoney] &&
  3917.                     ACInfo[playerid][acSet][10] <= ACInfo[playerid][acMoney] - ac_money) ACInfo[playerid][acSet][10] = -1;
  3918.                     else if(ac_gtc > ACInfo[playerid][acGtc][15] + ac_gpp)
  3919.                     {
  3920.                         if(ACInfo[playerid][acACAllow][15])
  3921.                         {
  3922.                             if(++ACInfo[playerid][acCheatCount][10] > AC_MAX_NOP_WARNINGS)
  3923.                             {
  3924.                                 #if defined DEBUG
  3925.                                     printf("[Nex-AC debug] Money: %d, old money: %d, price: %d",
  3926.                                     ac_money, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][10]);
  3927.                                 #endif
  3928.                                 #if defined OnCheatDetected
  3929.                                     ac_KickWithCode(playerid, "", 0, 15, 3);
  3930.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  3931.                                     ACInfo[playerid][acSet][10] = -1;
  3932.                                 #else
  3933.                                     return ac_KickWithCode(playerid, "", 0, 15, 3);
  3934.                                 #endif
  3935.                             }
  3936.                             #if defined OnCheatWarning
  3937.                                 else OnCheatWarning(playerid, "", 0, 15, 3, ACInfo[playerid][acCheatCount][10]);
  3938.                             #endif
  3939.                         }
  3940.                         else if(++ACInfo[playerid][acCheatCount][10] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][10] = -1;
  3941.                     }
  3942.                 }
  3943.             #endif
  3944.             new ac_i = GetPlayerInterior(playerid), Float:ac_pX, Float:ac_pY, Float:ac_pZ, Float:ac_tmp;
  3945.             GetPlayerPos(playerid, ac_pX, ac_pY, ac_pZ);
  3946.             if(ACInfo[playerid][acLastWeapon] != ac_w)
  3947.             {
  3948.                 if(ACInfo[playerid][acWeapon][ac_s] != ac_w && ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp)
  3949.                 {
  3950.                     #if AC_USE_PICKUP_WEAPONS
  3951.                         #if defined Streamer_GetDistanceToItem\
  3952.                             && defined Streamer_GetIntData
  3953.                         if(ACInfo[playerid][acLastPickup] > MAX_PICKUPS) Streamer_GetDistanceToItem(ac_pX, ac_pY, ac_pZ, STREAMER_TYPE_PICKUP, ACInfo[playerid][acLastPickup] - MAX_PICKUPS, ac_tmp);
  3954.                         if(0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS && ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
  3955.                         ac_a <= (3 <= ac_s <= 5 ? ACInfo[playerid][acAmmo][ac_s] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) &&
  3956.                         IsPlayerInRangeOfPoint(playerid, 15.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
  3957.                         ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]) ||
  3958.                         ACInfo[playerid][acLastPickup] > MAX_PICKUPS &&
  3959.                         Streamer_GetIntData(STREAMER_TYPE_PICKUP, ACInfo[playerid][acLastPickup] - MAX_PICKUPS, E_STREAMER_EXTRA_ID) == ac_w + 100 &&
  3960.                         ac_a <= (3 <= ac_s <= 5 ? ACInfo[playerid][acAmmo][ac_s] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) && floatcmp(ac_tmp, 15.0) <= 0)
  3961.                         {
  3962.                             ACInfo[playerid][acWeapon][ac_s] = ac_w;
  3963.                             ACInfo[playerid][acAmmo][ac_s] = ac_a;
  3964.                         }
  3965.                         #else
  3966.                         if(0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS && ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
  3967.                         ac_a <= (3 <= ac_s <= 5 ? ACInfo[playerid][acAmmo][ac_s] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) &&
  3968.                         IsPlayerInRangeOfPoint(playerid, 15.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
  3969.                         ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]))
  3970.                         {
  3971.                             ACInfo[playerid][acWeapon][ac_s] = ac_w;
  3972.                             ACInfo[playerid][acAmmo][ac_s] = ac_a;
  3973.                         }
  3974.                         #endif
  3975.                         else
  3976.                         {
  3977.                     #endif
  3978.                         #if AC_USE_AMMUNATIONS
  3979.                             if(22 <= ac_w <= 32 && ac_InAmmuNation(playerid, ac_i))
  3980.                             {
  3981.                                 ACInfo[playerid][acCheatCount][10] = 0;
  3982.                                 if(ACInfo[playerid][acSet][10] != -1) ACInfo[playerid][acSet][10] += ac_AmmuNationInfo[ac_w - 22][0];
  3983.                                 else ACInfo[playerid][acSet][10] = ac_AmmuNationInfo[ac_w - 22][0];
  3984.                                 if(3 <= ac_s <= 5) ACInfo[playerid][acAmmo][ac_s] += ac_AmmuNationInfo[ac_w - 22][1];
  3985.                                 else ACInfo[playerid][acAmmo][ac_s] = ac_AmmuNationInfo[ac_w - 22][1];
  3986.                                 ACInfo[playerid][acWeapon][ac_s] = ac_w;
  3987.                                 ACInfo[playerid][acGtc][15] = ac_gtc + 2650;
  3988.                             }
  3989.                             else
  3990.                             {
  3991.                         #endif
  3992.                             if(ac_w == 40 || ac_w == 46 && ACInfo[playerid][acVeh] > 0 && ACInfo[playerid][acParachute] > 0)
  3993.                             {
  3994.                                 ACInfo[playerid][acWeapon][ac_s] = ac_w;
  3995.                                 ACInfo[playerid][acAmmo][ac_s] = ac_a;
  3996.                                 ACInfo[playerid][acParachute] = 0;
  3997.                             }
  3998.                             else if(ACInfo[playerid][acACAllow][15] && ACInfo[playerid][acSetWeapon][ac_s] == -1)
  3999.                             {
  4000.                                 #if defined DEBUG
  4001.                                     printf("[Nex-AC debug] AC weaponid: %d, AC ammo: %d, weaponid: %d, ammo: %d",
  4002.                                     ACInfo[playerid][acWeapon][ac_s], ACInfo[playerid][acAmmo][ac_s], ac_w, ac_a);
  4003.                                 #endif
  4004.                                 #if defined OnCheatDetected
  4005.                                     ac_KickWithCode(playerid, "", 0, 15, 1);
  4006.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4007.                                     ACInfo[playerid][acWeapon][ac_s] = ac_w;
  4008.                                     ACInfo[playerid][acAmmo][ac_s] = ac_a;
  4009.                                 #else
  4010.                                     return ac_KickWithCode(playerid, "", 0, 15, 1);
  4011.                                 #endif
  4012.                             }
  4013.                         #if AC_USE_AMMUNATIONS
  4014.                             }
  4015.                         #endif
  4016.                     #if AC_USE_PICKUP_WEAPONS
  4017.                         }
  4018.                     #endif
  4019.                 }
  4020.             }
  4021.             else if(ACInfo[playerid][acAmmo][ac_s] != ac_a)
  4022.             {
  4023.                 switch(ac_w)
  4024.                 {
  4025.                     case 16..18, 35..37, 39, 41..43:
  4026.                     {
  4027.                         if(ac_sa != PLAYER_STATE_DRIVER && ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp)
  4028.                         {
  4029.                             if(ACInfo[playerid][acACAllow][16] &&
  4030.                             (ACInfo[playerid][acAmmo][ac_s] == 0 || ac_a > ACInfo[playerid][acAmmo][ac_s] ||
  4031.                             ac_a < 0 < ACInfo[playerid][acAmmo][ac_s]))
  4032.                             {
  4033.                                 #if defined DEBUG
  4034.                                     printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  4035.                                     ACInfo[playerid][acAmmo][ac_s], ac_a, ac_w);
  4036.                                 #endif
  4037.                                 #if defined OnCheatDetected
  4038.                                     ac_KickWithCode(playerid, "", 0, 16, 1);
  4039.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4040.                                 #else
  4041.                                     return ac_KickWithCode(playerid, "", 0, 16, 1);
  4042.                                 #endif
  4043.                             }
  4044.                             ACInfo[playerid][acAmmo][ac_s] = ac_a;
  4045.                         }
  4046.                     }
  4047.                 }
  4048.             }
  4049.             GetPlayerHealth(playerid, ac_tmp);
  4050.             new ac_health = floatround(ac_tmp, floatround_tozero);
  4051.             if(ACInfo[playerid][acSet][1] != -1)
  4052.             {
  4053.                 if(ACInfo[playerid][acSet][1] > 255)
  4054.                 {
  4055.                     ac_health += 256 * (((ACInfo[playerid][acSet][1] - (ACInfo[playerid][acSet][1] % 256)) / 256) - 1);
  4056.                     if(ACInfo[playerid][acSet][1] > ac_health + 255) ac_health += 256;
  4057.                 }
  4058.                 if(ACInfo[playerid][acSet][1] == ac_health || ACInfo[playerid][acDmgRes] ||
  4059.                 ACInfo[playerid][acSet][1] > ac_health && ac_gtc > ACInfo[playerid][acGtc][3] + ac_gpp)
  4060.                 {
  4061.                     ACInfo[playerid][acSet][1] = -1;
  4062.                     ACInfo[playerid][acDmgRes] = 0;
  4063.                 }
  4064.                 else if(ac_gtc > ACInfo[playerid][acGtc][3] + ac_gpp)
  4065.                 {
  4066.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][3])
  4067.                     {
  4068.                         if(++ACInfo[playerid][acNOPCount][3] > AC_MAX_NOP_WARNINGS)
  4069.                         {
  4070.                             #if defined DEBUG
  4071.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerHealth");
  4072.                                 printf("[Nex-AC debug] AC health: %d, health: %d", ACInfo[playerid][acSet][1], ac_health);
  4073.                             #endif
  4074.                             #if defined OnCheatDetected
  4075.                                 ac_KickWithCode(playerid, "", 0, 52, 3);
  4076.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4077.                                 ACInfo[playerid][acSet][1] = -1;
  4078.                             #else
  4079.                                 return ac_KickWithCode(playerid, "", 0, 52, 3);
  4080.                             #endif
  4081.                         }
  4082.                         #if defined OnNOPWarning
  4083.                             else OnNOPWarning(playerid, 3, ACInfo[playerid][acNOPCount][3]);
  4084.                         #endif
  4085.                     }
  4086.                     else if(++ACInfo[playerid][acNOPCount][3] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][1] = -1;
  4087.                 }
  4088.             }
  4089.             else if(ACInfo[playerid][acACAllow][12])
  4090.             {
  4091.                 if(ACInfo[playerid][acHealth] > 255)
  4092.                 {
  4093.                     ac_health += 256 * (((ACInfo[playerid][acHealth] - (ACInfo[playerid][acHealth] % 256)) / 256) - 1);
  4094.                     if(ACInfo[playerid][acHealth] > ac_health + 255) ac_health += 256;
  4095.                 }
  4096.                 if(ac_health > ACInfo[playerid][acHealth])
  4097.                 {
  4098.                     #if AC_USE_RESTAURANTS
  4099.                         if(ac_health > ACInfo[playerid][acHealth] + 70 || !ac_InRestaurant(playerid, ac_i))
  4100.                         {
  4101.                     #endif
  4102.                         #if AC_USE_VENDING_MACHINES
  4103.                             if(ac_health > ACInfo[playerid][acHealth] + 35 || !ac_NearVendingMachine(playerid, ac_i))
  4104.                             {
  4105.                         #endif
  4106.                             #if defined DEBUG
  4107.                                 printf("[Nex-AC debug] AC health: %d, health: %d", ACInfo[playerid][acHealth], ac_health);
  4108.                             #endif
  4109.                             #if defined OnCheatDetected
  4110.                                 ac_KickWithCode(playerid, "", 0, 12);
  4111.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4112.                             #else
  4113.                                 return ac_KickWithCode(playerid, "", 0, 12);
  4114.                             #endif
  4115.                         #if AC_USE_VENDING_MACHINES
  4116.                             }
  4117.                         #endif
  4118.                     #if AC_USE_RESTAURANTS
  4119.                         }
  4120.                     #endif
  4121.                 }
  4122.             }
  4123.             GetPlayerArmour(playerid, ac_tmp);
  4124.             new ac_armour = floatround(ac_tmp, floatround_tozero);
  4125.             if(ACInfo[playerid][acSet][2] != -1)
  4126.             {
  4127.                 if(ACInfo[playerid][acSet][2] > 255)
  4128.                 {
  4129.                     ac_armour += 256 * (((ACInfo[playerid][acSet][2] - (ACInfo[playerid][acSet][2] % 256)) / 256) - 1);
  4130.                     if(ACInfo[playerid][acSet][2] > ac_armour + 255) ac_armour += 256;
  4131.                 }
  4132.                 if(ACInfo[playerid][acSet][2] == ac_armour || ACInfo[playerid][acDmgRes] ||
  4133.                 ACInfo[playerid][acSet][2] > ac_armour && ac_gtc > ACInfo[playerid][acGtc][5] + ac_gpp)
  4134.                 {
  4135.                     ACInfo[playerid][acSet][2] = -1;
  4136.                     ACInfo[playerid][acDmgRes] = 0;
  4137.                 }
  4138.                 else if(ac_gtc > ACInfo[playerid][acGtc][5] + ac_gpp)
  4139.                 {
  4140.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][5])
  4141.                     {
  4142.                         if(++ACInfo[playerid][acNOPCount][5] > AC_MAX_NOP_WARNINGS)
  4143.                         {
  4144.                             #if defined DEBUG
  4145.                                 printf(DEBUG_CODE_5, playerid, "SetPlayerArmour");
  4146.                                 printf("[Nex-AC debug] AC armour: %d, armour: %d", ACInfo[playerid][acSet][2], ac_armour);
  4147.                             #endif
  4148.                             #if defined OnCheatDetected
  4149.                                 ac_KickWithCode(playerid, "", 0, 52, 4);
  4150.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4151.                                 ACInfo[playerid][acSet][2] = -1;
  4152.                             #else
  4153.                                 return ac_KickWithCode(playerid, "", 0, 52, 4);
  4154.                             #endif
  4155.                         }
  4156.                         #if defined OnNOPWarning
  4157.                             else OnNOPWarning(playerid, 4, ACInfo[playerid][acNOPCount][5]);
  4158.                         #endif
  4159.                     }
  4160.                     else if(++ACInfo[playerid][acNOPCount][5] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][2] = -1;
  4161.                 }
  4162.             }
  4163.             else if(ACInfo[playerid][acACAllow][13])
  4164.             {
  4165.                 if(ACInfo[playerid][acArmour] > 255)
  4166.                 {
  4167.                     ac_armour += 256 * (((ACInfo[playerid][acArmour] - (ACInfo[playerid][acArmour] % 256)) / 256) - 1);
  4168.                     if(ACInfo[playerid][acArmour] > ac_armour + 255) ac_armour += 256;
  4169.                 }
  4170.                 if(ac_armour > ACInfo[playerid][acArmour])
  4171.                 {
  4172.                     #if AC_USE_AMMUNATIONS
  4173.                         if(ac_InAmmuNation(playerid, ac_i))
  4174.                         {
  4175.                             ACInfo[playerid][acCheatCount][10] = 0;
  4176.                             if(ACInfo[playerid][acSet][10] != -1) ACInfo[playerid][acSet][10] += 200;
  4177.                             else ACInfo[playerid][acSet][10] = 200;
  4178.                             ACInfo[playerid][acGtc][15] = ac_gtc + 2650;
  4179.                         }
  4180.                         else
  4181.                         {
  4182.                     #endif
  4183.                         #if defined DEBUG
  4184.                             printf("[Nex-AC debug] AC armour: %d, armour: %d", ACInfo[playerid][acArmour], ac_armour);
  4185.                         #endif
  4186.                         #if defined OnCheatDetected
  4187.                             ac_KickWithCode(playerid, "", 0, 13);
  4188.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4189.                         #else
  4190.                             return ac_KickWithCode(playerid, "", 0, 13);
  4191.                         #endif
  4192.                     #if AC_USE_AMMUNATIONS
  4193.                         }
  4194.                     #endif
  4195.                 }
  4196.             }
  4197.             if(ac_health < ACInfo[playerid][acHealth] || ac_armour < ACInfo[playerid][acArmour])
  4198.             {
  4199.                 ACInfo[playerid][acVehDmgRes] = false;
  4200.                 ACInfo[playerid][acCheatCount][9] = ACInfo[playerid][acDmgRes] = 0;
  4201.             }
  4202.             else if(ACInfo[playerid][acACAllow][19] &&
  4203.             ACInfo[playerid][acDmgRes] && ac_gtc > ACInfo[playerid][acGtc][14] + ac_gpp)
  4204.             {
  4205.                 ACInfo[playerid][acDmgRes] = 0;
  4206.                 ACInfo[playerid][acVehDmgRes] = false;
  4207.                 if(++ACInfo[playerid][acCheatCount][9] > AC_MAX_GODMODE_WARNINGS)
  4208.                 {
  4209.                     #undef AC_MAX_GODMODE_WARNINGS
  4210.                     #if defined DEBUG
  4211.                         printf("[Nex-AC debug] AC health: %d, health: %d, AC armour: %d, armour: %d",
  4212.                         ACInfo[playerid][acHealth], ac_health, ACInfo[playerid][acArmour], ac_armour);
  4213.                     #endif
  4214.                     #if defined OnCheatDetected
  4215.                         ac_KickWithCode(playerid, "", 0, 19);
  4216.                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4217.                         ACInfo[playerid][acCheatCount][9] = 0;
  4218.                     #else
  4219.                         return ac_KickWithCode(playerid, "", 0, 19);
  4220.                     #endif
  4221.                 }
  4222.                 #if defined OnCheatWarning
  4223.                     else OnCheatWarning(playerid, "", 0, 19, 0, ACInfo[playerid][acCheatCount][9]);
  4224.                 #endif
  4225.             }
  4226.             #if AC_USE_TUNING_GARAGES
  4227.             if(ACInfo[playerid][acSet][12] != -1)
  4228.             {
  4229.                 if(ac_money < ACInfo[playerid][acMoney] &&
  4230.                 ACInfo[playerid][acSet][12] <= ACInfo[playerid][acMoney] - ac_money) ACInfo[playerid][acSet][12] = -1;
  4231.                 else if(ac_gtc > ACInfo[playerid][acGtc][17] + ac_gpp)
  4232.                 {
  4233.                     if(ACInfo[playerid][acACAllow][23])
  4234.                     {
  4235.                         if(++ACInfo[playerid][acCheatCount][12] > AC_MAX_NOP_WARNINGS)
  4236.                         {
  4237.                             #if defined DEBUG
  4238.                                 printf("[Nex-AC debug] Money: %d, old money: %d, component price: %d",
  4239.                                 ac_money, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][12]);
  4240.                             #endif
  4241.                             #if defined OnCheatDetected
  4242.                                 ac_KickWithCode(playerid, "", 0, 23, 3);
  4243.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4244.                                 ACInfo[playerid][acSet][12] = -1;
  4245.                             #else
  4246.                                 return ac_KickWithCode(playerid, "", 0, 23, 3);
  4247.                             #endif
  4248.                         }
  4249.                         #if defined OnCheatWarning
  4250.                             else OnCheatWarning(playerid, "", 0, 23, 3, ACInfo[playerid][acCheatCount][12]);
  4251.                         #endif
  4252.                     }
  4253.                     else if(++ACInfo[playerid][acCheatCount][12] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][12] = -1;
  4254.                 }
  4255.             }
  4256.             #endif
  4257.             if(ACInfo[playerid][acSet][0] != -1 && ac_gtc > ACInfo[playerid][acGtc][0] + ac_gpp)
  4258.             {
  4259.                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][2] && ac_i != ACInfo[playerid][acSet][0])
  4260.                 {
  4261.                     if(++ACInfo[playerid][acNOPCount][2] > AC_MAX_NOP_WARNINGS)
  4262.                     {
  4263.                         #if defined DEBUG
  4264.                             printf(DEBUG_CODE_5, playerid, "SetPlayerInterior");
  4265.                             printf("[Nex-AC debug] AC interior: %d, interiorid: %d", ACInfo[playerid][acSet][0], ac_i);
  4266.                         #endif
  4267.                         #if defined OnCheatDetected
  4268.                             ac_KickWithCode(playerid, "", 0, 52, 5);
  4269.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4270.                             ACInfo[playerid][acSet][0] = -1;
  4271.                         #else
  4272.                             return ac_KickWithCode(playerid, "", 0, 52, 5);
  4273.                         #endif
  4274.                     }
  4275.                     #if defined OnNOPWarning
  4276.                         else OnNOPWarning(playerid, 5, ACInfo[playerid][acNOPCount][2]);
  4277.                     #endif
  4278.                 }
  4279.                 else if(++ACInfo[playerid][acNOPCount][2] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][0] = -1;
  4280.             }
  4281.             if(ACInfo[playerid][acSet][6] != -1 && ac_gtc > ACInfo[playerid][acGtc][12] + ac_gpp)
  4282.             {
  4283.                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][8])
  4284.                 {
  4285.                     if(++ACInfo[playerid][acNOPCount][8] > AC_MAX_NOP_WARNINGS)
  4286.                     {
  4287.                         #if defined DEBUG
  4288.                             printf(DEBUG_CODE_5, playerid, "TogglePlayerSpectating");
  4289.                         #endif
  4290.                         #if defined OnCheatDetected
  4291.                             ac_KickWithCode(playerid, "", 0, 52, 6);
  4292.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4293.                             ACInfo[playerid][acSet][6] = -1;
  4294.                         #else
  4295.                             return ac_KickWithCode(playerid, "", 0, 52, 6);
  4296.                         #endif
  4297.                     }
  4298.                     #if defined OnNOPWarning
  4299.                         else OnNOPWarning(playerid, 6, ACInfo[playerid][acNOPCount][8]);
  4300.                     #endif
  4301.                 }
  4302.                 else if(++ACInfo[playerid][acNOPCount][8] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][6] = -1;
  4303.             }
  4304.             if(ACInfo[playerid][acSet][7] != -1 && ac_gtc > ACInfo[playerid][acGtc][13] + ac_gpp)
  4305.             {
  4306.                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][9])
  4307.                 {
  4308.                     if(++ACInfo[playerid][acNOPCount][9] > AC_MAX_NOP_WARNINGS)
  4309.                     {
  4310.                         #if defined DEBUG
  4311.                             printf(DEBUG_CODE_5, playerid, "SpawnPlayer");
  4312.                             printf("[Nex-AC debug] acSet[7]: %d", ACInfo[playerid][acSet][7]);
  4313.                         #endif
  4314.                         #if defined OnCheatDetected
  4315.                             ac_KickWithCode(playerid, "", 0, 52, 7);
  4316.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4317.                             ACInfo[playerid][acSet][7] = -1;
  4318.                         #else
  4319.                             return ac_KickWithCode(playerid, "", 0, 52, 7);
  4320.                         #endif
  4321.                     }
  4322.                     #if defined OnNOPWarning
  4323.                         else OnNOPWarning(playerid, 7, ACInfo[playerid][acNOPCount][9]);
  4324.                     #endif
  4325.                 }
  4326.                 else if(++ACInfo[playerid][acNOPCount][9] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][7] = -1;
  4327.             }
  4328.             new ac_vehid = GetPlayerVehicleID(playerid);
  4329.             if(ACInfo[playerid][acSet][11] != -1 && ac_vehid > 0 && ac_gtc > ACInfo[playerid][acGtc][8] + ac_gpp)
  4330.             {
  4331.                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][11])
  4332.                 {
  4333.                     new Float:ac_vX, Float:ac_vY, Float:ac_vZ;
  4334.                     GetVehicleVelocity(ac_vehid, ac_vX, ac_vY, ac_vZ);
  4335.                     if(ac_GetSpeed(ac_vX, ac_vY, ac_vZ) <= 30)
  4336.                     {
  4337.                         #if defined DEBUG
  4338.                             printf(DEBUG_CODE_5, playerid, "RemovePlayerFromVehicle");
  4339.                             printf("[Nex-AC debug] Veh model: %d", GetVehicleModel(ac_vehid));
  4340.                         #endif
  4341.                         #if defined OnCheatDetected
  4342.                             ac_KickWithCode(playerid, "", 0, 52, 8);
  4343.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4344.                             ACInfo[playerid][acSet][11] = -1;
  4345.                         #else
  4346.                             return ac_KickWithCode(playerid, "", 0, 52, 8);
  4347.                         #endif
  4348.                     }
  4349.                 }
  4350.                 else ACInfo[playerid][acSet][11] = -1;
  4351.             }
  4352.             ac_s = GetPlayerVehicleSeat(playerid);
  4353.             if(ACInfo[playerid][acSet][9] != -1)
  4354.             {
  4355.                 if(ACInfo[playerid][acSet][9] == ac_vehid &&
  4356.                 (ACInfo[playerid][acSet][5] == ac_s || ACInfo[playerid][acSet][5] == -1))
  4357.                 {
  4358.                     if(ACInfo[playerid][acVeh] > 0)
  4359.                     {
  4360.                         if(ac_IsAnAircraft(GetVehicleModel(ACInfo[playerid][acVeh]))) ACInfo[playerid][acParachute] = 2;
  4361.                         if(ACVehInfo[ACInfo[playerid][acVeh]][acDriver] == playerid) ACVehInfo[ACInfo[playerid][acVeh]][acDriver] = INVALID_PLAYER_ID;
  4362.                     }
  4363.                     if(ac_s == 0)
  4364.                     {
  4365.                         ACVehInfo[ac_vehid][acDriver] = playerid;
  4366.                         GetVehicleZAngle(ac_vehid, ACVehInfo[ac_vehid][acZAngle]);
  4367.                         ACInfo[playerid][acSetVehHealth] = -1.0;
  4368.                     }
  4369.                     ACInfo[playerid][acEnterVeh] =
  4370.                     ACInfo[playerid][acCheatCount][11] = 0;
  4371.                     ACInfo[playerid][acVehDmgRes] = false;
  4372.                     ACInfo[playerid][acSet][11] =
  4373.                     ACInfo[playerid][acSet][9] =
  4374.                     ACInfo[playerid][acSet][8] = -1;
  4375.                     ACInfo[playerid][acSeat] = ac_s;
  4376.                 }
  4377.                 else if(ac_gtc > ACInfo[playerid][acGtc][1] + ac_gpp)
  4378.                 {
  4379.                     if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][7] &&
  4380.                     ACInfo[playerid][acSet][5] != -1 && ACVehInfo[ACInfo[playerid][acSet][9]][acSpawned])
  4381.                     {
  4382.                         if(++ACInfo[playerid][acNOPCount][7] > AC_MAX_NOP_WARNINGS)
  4383.                         {
  4384.                             #if defined DEBUG
  4385.                                 printf(DEBUG_CODE_5, playerid, "PutPlayerInVehicle");
  4386.                                 printf("[Nex-AC debug] AC veh: %d, veh: %d, AC seat: %d, seatid: %d",
  4387.                                 ACInfo[playerid][acSet][9], ac_vehid, ACInfo[playerid][acSet][5], ac_s);
  4388.                             #endif
  4389.                             #if defined OnCheatDetected
  4390.                                 ac_KickWithCode(playerid, "", 0, 52, 9);
  4391.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4392.                                 ACInfo[playerid][acSet][9] = -1;
  4393.                             #else
  4394.                                 return ac_KickWithCode(playerid, "", 0, 52, 9);
  4395.                             #endif
  4396.                         }
  4397.                         #if defined OnNOPWarning
  4398.                             else OnNOPWarning(playerid, 9, ACInfo[playerid][acNOPCount][7]);
  4399.                         #endif
  4400.                     }
  4401.                     else if(++ACInfo[playerid][acNOPCount][7] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][9] = -1;
  4402.                 }
  4403.             }
  4404.             else
  4405.             {
  4406.                 new Float:ac_dist_set = 25000.0;
  4407.                 if(ACInfo[playerid][acSet][8] != -1)
  4408.                 {
  4409.                     ac_dist_set = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acSetPosX], ACInfo[playerid][acSetPosY], (ACInfo[playerid][acTpToZ] ? ac_pZ : ACInfo[playerid][acSetPosZ]));
  4410.                     if(floatcmp(ac_dist_set, 15.0) == -1)
  4411.                     {
  4412.                         ACInfo[playerid][acSet][8] = -1;
  4413.                         ACInfo[playerid][acGtc][11] = 0;
  4414.                         ACInfo[playerid][acTpToZ] = false;
  4415.                         ACInfo[playerid][acPosX] = ac_pX;
  4416.                         ACInfo[playerid][acPosY] = ac_pY;
  4417.                         ACInfo[playerid][acPosZ] = ac_pZ;
  4418.                     }
  4419.                     else if(ac_gtc > ACInfo[playerid][acGtc][11] + ac_gpp)
  4420.                     {
  4421.                         if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][10])
  4422.                         {
  4423.                             if(++ACInfo[playerid][acNOPCount][10] > AC_MAX_NOP_WARNINGS)
  4424.                             {
  4425.                                 #if defined DEBUG
  4426.                                     printf(DEBUG_CODE_5, playerid, "SetPlayerPos");
  4427.                                     printf("[Nex-AC debug] Dist: %f, acSet[8]: %d", ac_dist_set, ACInfo[playerid][acSet][8]);
  4428.                                 #endif
  4429.                                 #if defined OnCheatDetected
  4430.                                     ac_KickWithCode(playerid, "", 0, 52, 10);
  4431.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4432.                                     ACInfo[playerid][acTpToZ] = false;
  4433.                                     ACInfo[playerid][acSet][8] = -1;
  4434.                                 #else
  4435.                                     return ac_KickWithCode(playerid, "", 0, 52, 10);
  4436.                                 #endif
  4437.                             }
  4438.                             #if defined OnNOPWarning
  4439.                                 else OnNOPWarning(playerid, 10, ACInfo[playerid][acNOPCount][10]);
  4440.                             #endif
  4441.                         }
  4442.                         else if(++ACInfo[playerid][acNOPCount][10] > AC_MAX_NOP_WARNINGS)
  4443.                         {
  4444.                             ACInfo[playerid][acTpToZ] = false;
  4445.                             ACInfo[playerid][acSet][8] = -1;
  4446.                         }
  4447.                     }
  4448.                 }
  4449.                 new Float:ac_vX, Float:ac_vY, Float:ac_vZ, ac_specact = GetPlayerSpecialAction(playerid),
  4450.                 Float:ac_dist = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  4451.                 if(ac_vehid > 0)
  4452.                 {
  4453.                     if(ACInfo[playerid][acVeh] > 0)
  4454.                     {
  4455.                         if(ACInfo[playerid][acVeh] != ac_vehid)
  4456.                         {
  4457.                             if(ACInfo[playerid][acACAllow][4])
  4458.                             {
  4459.                                 #if defined DEBUG
  4460.                                     printf("[Nex-AC debug] AC veh: %d, veh: %d", ACInfo[playerid][acVeh], ac_vehid);
  4461.                                 #endif
  4462.                                 #if defined OnCheatDetected
  4463.                                     ac_KickWithCode(playerid, "", 0, 4, 2);
  4464.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4465.                                 #else
  4466.                                     return ac_KickWithCode(playerid, "", 0, 4, 2);
  4467.                                 #endif
  4468.                             }
  4469.                         }
  4470.                         else if(ACInfo[playerid][acACAllow][50] && ACInfo[playerid][acSeat] != ac_s)
  4471.                         {
  4472.                             #if defined DEBUG
  4473.                                 printf("[Nex-AC debug] AC seat: %d, seatid: %d, veh: %d", ACInfo[playerid][acSeat], ac_s, ac_vehid);
  4474.                             #endif
  4475.                             #if defined OnCheatDetected
  4476.                                 ac_KickWithCode(playerid, "", 0, 50);
  4477.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4478.                             #else
  4479.                                 return ac_KickWithCode(playerid, "", 0, 50);
  4480.                             #endif
  4481.                         }
  4482.                     }
  4483.                     if(ac_sa == PLAYER_STATE_DRIVER)
  4484.                     {
  4485.                         if(ACInfo[playerid][acACAllow][32] &&
  4486.                         ACVehInfo[ac_vehid][acDriver] != INVALID_PLAYER_ID && ACVehInfo[ac_vehid][acDriver] != playerid)
  4487.                         {
  4488.                             #if defined DEBUG
  4489.                                 printf("[Nex-AC debug] AC driver: %d, driver: %d, veh: %d",
  4490.                                 ACVehInfo[ac_vehid][acDriver], playerid, ac_vehid);
  4491.                             #endif
  4492.                             #if defined OnCheatDetected
  4493.                                 ac_KickWithCode(playerid, "", 0, 32);
  4494.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4495.                             #else
  4496.                                 return SetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  4497.                             #endif
  4498.                         }
  4499.                         new Float:ac_vHealth;
  4500.                         GetVehicleHealth(ac_vehid, ac_vHealth);
  4501.                         if(floatcmp(ACInfo[playerid][acSetVehHealth], -1.0) != 0)
  4502.                         {
  4503.                             if(floatcmp(ACInfo[playerid][acSetVehHealth], ac_vHealth) == 0 ||
  4504.                             floatcmp(ACInfo[playerid][acSetVehHealth], ac_vHealth) == 1 &&
  4505.                             ac_gtc > ACInfo[playerid][acGtc][4] + ac_gpp)
  4506.                             {
  4507.                                 ACInfo[playerid][acSetVehHealth] = -1.0;
  4508.                                 ACInfo[playerid][acVehDmgRes] = false;
  4509.                             }
  4510.                             else if(ac_gtc > ACInfo[playerid][acGtc][4] + ac_gpp)
  4511.                             {
  4512.                                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][4])
  4513.                                 {
  4514.                                     if(++ACInfo[playerid][acNOPCount][4] > AC_MAX_NOP_WARNINGS)
  4515.                                     {
  4516.                                         #if defined DEBUG
  4517.                                             printf(DEBUG_CODE_5, playerid, "SetVehicleHealth");
  4518.                                             printf("[Nex-AC debug] AC veh health: %f, veh health: %f, veh: %d",
  4519.                                             ACInfo[playerid][acSetVehHealth], ac_vHealth, ac_vehid);
  4520.                                         #endif
  4521.                                         #if defined OnCheatDetected
  4522.                                             ac_KickWithCode(playerid, "", 0, 52, 11);
  4523.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4524.                                             ACInfo[playerid][acSetVehHealth] = -1.0;
  4525.                                         #else
  4526.                                             return ac_KickWithCode(playerid, "", 0, 52, 11);
  4527.                                         #endif
  4528.                                     }
  4529.                                     #if defined OnNOPWarning
  4530.                                         else OnNOPWarning(playerid, 11, ACInfo[playerid][acNOPCount][4]);
  4531.                                     #endif
  4532.                                 }
  4533.                                 else if(++ACInfo[playerid][acNOPCount][4] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSetVehHealth] = -1.0;
  4534.                             }
  4535.                         }
  4536.                         else if(ACInfo[playerid][acACAllow][11] &&
  4537.                         floatcmp(ac_vHealth, ACVehInfo[ac_vehid][acHealth]) == 1 &&
  4538.                         !ACInfo[playerid][acModShop] && ac_vHealth)
  4539.                         {
  4540.                             #if AC_USE_PAYNSPRAY
  4541.                                 if(!ac_InPayNSpray(playerid, ac_i))
  4542.                                 {
  4543.                             #endif
  4544.                                 #if defined DEBUG
  4545.                                     printf("[Nex-AC debug] AC veh health: %f, veh health: %f, veh: %d, playerid: %d",
  4546.                                     ACVehInfo[ac_vehid][acHealth], ac_vHealth, ac_vehid, playerid);
  4547.                                 #endif
  4548.                                 #if defined OnCheatDetected
  4549.                                     ac_KickWithCode(playerid, "", 0, 11);
  4550.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4551.                                 #endif
  4552.                                 SetVehicleHealth(ac_vehid, ACVehInfo[ac_vehid][acHealth]);
  4553.                             #if AC_USE_PAYNSPRAY
  4554.                                 }
  4555.                             #endif
  4556.                         }
  4557.                         if(ACInfo[playerid][acVehDmgRes])
  4558.                         {
  4559.                             if(floatcmp(ac_vHealth, ACVehInfo[ac_vehid][acHealth]) == -1)
  4560.                             {
  4561.                                 ACInfo[playerid][acVehDmgRes] = false;
  4562.                                 ACInfo[playerid][acCheatCount][11] = ACInfo[playerid][acDmgRes] = 0;
  4563.                             }
  4564.                             else if(ACInfo[playerid][acACAllow][20] && ac_gtc > ACInfo[playerid][acGtc][16] + ac_gpp)
  4565.                             {
  4566.                                 ACInfo[playerid][acDmgRes] = 0;
  4567.                                 ACInfo[playerid][acVehDmgRes] = false;
  4568.                                 if(++ACInfo[playerid][acCheatCount][11] > AC_MAX_GODMODE_VEH_WARNINGS)
  4569.                                 {
  4570.                                     #undef AC_MAX_GODMODE_VEH_WARNINGS
  4571.                                     #if defined DEBUG
  4572.                                         printf("[Nex-AC debug] AC veh health: %f, veh health: %f, veh: %d",
  4573.                                         ACVehInfo[ac_vehid][acHealth], ac_vHealth, ac_vehid);
  4574.                                     #endif
  4575.                                     #if defined OnCheatDetected
  4576.                                         ac_KickWithCode(playerid, "", 0, 20);
  4577.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4578.                                         ACInfo[playerid][acCheatCount][11] = 0;
  4579.                                     #else
  4580.                                         return ac_KickWithCode(playerid, "", 0, 20);
  4581.                                     #endif
  4582.                                 }
  4583.                                 #if defined OnCheatWarning
  4584.                                     else OnCheatWarning(playerid, "", 0, 20, 0, ACInfo[playerid][acCheatCount][11]);
  4585.                                 #endif
  4586.                             }
  4587.                         }
  4588.                         GetVehicleVelocity(ac_vehid, ac_vX, ac_vY, ac_vZ);
  4589.                         new Float:ac_zAngle, ac_vsp = ac_GetSpeed(ac_vX, ac_vY, ac_vZ);
  4590.                         GetVehicleZAngle(ac_vehid, ac_zAngle);
  4591.                         if(floatcmp(ac_dist, 0.8) == 1 && ac_gtc > ACInfo[playerid][acGtc][11] + ac_gpp)
  4592.                         {
  4593.                             if(floatcmp(ac_dist, 80.0) >= 0 &&
  4594.                             floatcmp(ac_dist, floatadd(ACVehInfo[ac_vehid][acPosDiff], floatmul(floatdiv(ac_dist, 2.6), 1.8))) == 1 &&
  4595.                             floatcmp(ac_dist_set, 80.0) >= 0 &&
  4596.                             floatcmp(ac_dist_set, floatadd(ACVehInfo[ac_vehid][acPosDiff], floatmul(floatdiv(ac_dist_set, 2.6), 1.8))) == 1)
  4597.                             {
  4598.                                 if(ACInfo[playerid][acACAllow][3] &&
  4599.                                 (floatcmp(ACInfo[playerid][acPosZ], -95.0) == 1 || floatcmp(VectorSize(floatsub(ac_pX, ACInfo[playerid][acPosX]), floatsub(ac_pY, ACInfo[playerid][acPosY]), 0.0), 80.0) >= 0))
  4600.                                 {
  4601.                                     #if defined DEBUG
  4602.                                         printf("[Nex-AC debug] Dist: %f, dist set: %f, old pos diff: %f, speed: %d, veh: %d",
  4603.                                         ac_dist, ac_dist_set, ACVehInfo[ac_vehid][acPosDiff], ac_vsp, ac_vehid);
  4604.                                     #endif
  4605.                                     #if defined OnCheatDetected
  4606.                                         ac_KickWithCode(playerid, "", 0, 3, 2);
  4607.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4608.                                     #else
  4609.                                         return ac_KickWithCode(playerid, "", 0, 3, 2);
  4610.                                     #endif
  4611.                                 }
  4612.                             }
  4613.                             else if(ACInfo[playerid][acACAllow][1] && ac_vsp < 12)
  4614.                             {
  4615.                                 if(++ACInfo[playerid][acCheatCount][2] > AC_MAX_AIR_VEH_WARNINGS)
  4616.                                 {
  4617.                                     #undef AC_MAX_AIR_VEH_WARNINGS
  4618.                                     #if defined DEBUG
  4619.                                         printf("[Nex-AC debug] Speed: %d, dist: %f, veh: %d", ac_vsp, ac_dist, ac_vehid);
  4620.                                     #endif
  4621.                                     #if defined OnCheatDetected
  4622.                                         ac_KickWithCode(playerid, "", 0, 1);
  4623.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4624.                                         ACInfo[playerid][acCheatCount][2] = 0;
  4625.                                     #else
  4626.                                         return ac_KickWithCode(playerid, "", 0, 1);
  4627.                                     #endif
  4628.                                 }
  4629.                                 #if defined OnCheatWarning
  4630.                                     else OnCheatWarning(playerid, "", 0, 1, 0, ACInfo[playerid][acCheatCount][2]);
  4631.                                 #endif
  4632.                             }
  4633.                         }
  4634.                         if(ac_gtc > ACInfo[playerid][acGtc][9] + ac_gpp)
  4635.                         {
  4636.                             ac_i = GetVehicleModel(ac_vehid);
  4637.                             new ac_spDiff = ac_vsp - ac_GetSpeed(ACVehInfo[ac_vehid][acVelX], ACVehInfo[ac_vehid][acVelY], ACVehInfo[ac_vehid][acVelZ]);
  4638.                             if(ACInfo[playerid][acACAllow][10])
  4639.                             {
  4640.                                 if(ac_spDiff > 270)
  4641.                                 {
  4642.                                     #if defined DEBUG
  4643.                                         printf("[Nex-AC debug] Speed: %d, old speed: %d, veh model: %d",
  4644.                                         ac_vsp, ac_vsp - ac_spDiff, ac_i);
  4645.                                     #endif
  4646.                                     #if defined OnCheatDetected
  4647.                                         ac_KickWithCode(playerid, "", 0, 10, 3);
  4648.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4649.                                     #else
  4650.                                         return ac_KickWithCode(playerid, "", 0, 10, 3);
  4651.                                     #endif
  4652.                                 }
  4653.                                 else if(ac_spDiff >= 20 &&
  4654.                                 ACVehInfo[ac_vehid][acSpeedDiff] <= ac_spDiff && floatcmp(ACVehInfo[ac_vehid][acHealth], ac_vHealth) <= 0 &&
  4655.                                 !((ac_i == 432 || ac_i == 449 || 537 <= ac_i <= 538) && ac_spDiff < 65 ||
  4656.                                 ac_IsABicycle(ac_i) && floatcmp(floatabs(ac_vX), 0.3) <= 0 && floatcmp(floatabs(ac_vY), 0.3) <= 0 && floatcmp(floatabs(ac_vZ), 0.3) <= 0 ||
  4657.                                 !(ac_IsABicycle(ac_i) || ac_i == 449 || 537 <= ac_i <= 538) && floatcmp(ACVehInfo[ac_vehid][acHealth], 250.0) == -1))
  4658.                                 {
  4659.                                     ACInfo[playerid][acCheatCount][16] += (1 * AC_SPEEDHACK_VEH_RESET_DELAY);
  4660.                                     if(ACInfo[playerid][acCheatCount][16] > AC_MAX_SPEEDHACK_VEH_WARNINGS)
  4661.                                     {
  4662.                                         #undef AC_MAX_SPEEDHACK_VEH_WARNINGS
  4663.                                         #undef AC_SPEEDHACK_VEH_RESET_DELAY
  4664.                                         #if defined DEBUG
  4665.                                             printf("[Nex-AC debug] Speed: %d, old speed: %d, veh model: %d",
  4666.                                             ac_vsp, ac_vsp - ac_spDiff, ac_i);
  4667.                                         #endif
  4668.                                         #if defined OnCheatDetected
  4669.                                             ac_KickWithCode(playerid, "", 0, 10, 1);
  4670.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4671.                                             ACInfo[playerid][acCheatCount][16] = 0;
  4672.                                         #else
  4673.                                             return ac_KickWithCode(playerid, "", 0, 10, 1);
  4674.                                         #endif
  4675.                                     }
  4676.                                     #if defined OnCheatWarning
  4677.                                         else OnCheatWarning(playerid, "", 0, 10, 1, ACInfo[playerid][acCheatCount][16]);
  4678.                                     #endif
  4679.                                 }
  4680.                             }
  4681.                             if(ACInfo[playerid][acACAllow][25] &&
  4682.                             ac_vsp > 15 && ac_abs(ac_spDiff) < 25 &&
  4683.                             floatround(floatabs(floatsub(ac_zAngle, ACVehInfo[ac_vehid][acZAngle]))) == 180 &&
  4684.                             (floatcmp(ac_vX, 0.0) == -1) != (floatcmp(ACVehInfo[ac_vehid][acVelX], 0.0) == -1) &&
  4685.                             (floatcmp(ac_vY, 0.0) == -1) != (floatcmp(ACVehInfo[ac_vehid][acVelY], 0.0) == -1) &&
  4686.                             (floatcmp(ac_vZ, 0.0) == -1) != (floatcmp(ACVehInfo[ac_vehid][acVelZ], 0.0) == -1))
  4687.                             {
  4688.                                 #undef ac_abs
  4689.                                 #if defined DEBUG
  4690.                                     printf("[Nex-AC debug] Speed: %d, speed diff: %d, z angle: %f, old z angle: %f, veh: %d",
  4691.                                     ac_vsp, ac_spDiff, ac_zAngle, ACVehInfo[ac_vehid][acZAngle], ac_vehid);
  4692.                                 #endif
  4693.                                 #if defined OnCheatDetected
  4694.                                     ac_KickWithCode(playerid, "", 0, 25);
  4695.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4696.                                 #else
  4697.                                     return ac_KickWithCode(playerid, "", 0, 25);
  4698.                                 #endif
  4699.                             }
  4700.                             if(ac_IsAnAircraft(ac_i))
  4701.                             {
  4702.                                 if(ACInfo[playerid][acACAllow][10] && (ac_vsp = ac_GetSpeed(ac_vX, ac_vY)) > 270)
  4703.                                 {
  4704.                                     #if defined DEBUG
  4705.                                         printf("[Nex-AC debug] Speed (x, y): %d, veh model: %d", ac_vsp, ac_i);
  4706.                                     #endif
  4707.                                     #if defined OnCheatDetected
  4708.                                         ac_KickWithCode(playerid, "", 0, 10, 2);
  4709.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4710.                                     #else
  4711.                                         return ac_KickWithCode(playerid, "", 0, 10, 2);
  4712.                                     #endif
  4713.                                 }
  4714.                             }
  4715.                             else if(ACInfo[playerid][acACAllow][8])
  4716.                             {
  4717.                                 new Float:ac_zDiff = floatsub(ac_pZ, ACInfo[playerid][acPosZ]);
  4718.                                 if(floatcmp(ac_vZ, 0.1) >= 0 && floatcmp(ac_vZ, ACVehInfo[ac_vehid][acVelZ]) == 1 &&
  4719.                                 floatcmp(floatabs(floatsub(ACInfo[playerid][acPosX], ac_pX)), floatdiv(ac_zDiff, 2.0)) == -1 &&
  4720.                                 floatcmp(floatabs(floatsub(ACInfo[playerid][acPosY], ac_pY)), floatdiv(ac_zDiff, 2.0)) == -1)
  4721.                                 {
  4722.                                     if(++ACInfo[playerid][acCheatCount][3] > (ac_IsABicycle(ac_i) ? AC_MAX_FLYHACK_BIKE_WARNINGS : AC_MAX_FLYHACK_VEH_WARNINGS))
  4723.                                     {
  4724.                                         #undef AC_MAX_FLYHACK_BIKE_WARNINGS
  4725.                                         #if defined DEBUG
  4726.                                             printf("[Nex-AC debug] Vel z: %f, old vel z: %f, pos diff x, y, z: %f, %f, %f, veh: %d",
  4727.                                             ac_vZ, ACVehInfo[ac_vehid][acVelZ], floatsub(ACInfo[playerid][acPosX], ac_pX), floatsub(ACInfo[playerid][acPosY], ac_pY), ac_zDiff, ac_vehid);
  4728.                                         #endif
  4729.                                         #if defined OnCheatDetected
  4730.                                             ac_KickWithCode(playerid, "", 0, 8, 1);
  4731.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4732.                                             ACInfo[playerid][acCheatCount][3] = 0;
  4733.                                         #else
  4734.                                             return ac_KickWithCode(playerid, "", 0, 8, 1);
  4735.                                         #endif
  4736.                                     }
  4737.                                     #if defined OnCheatWarning
  4738.                                         else OnCheatWarning(playerid, "", 0, 8, 1, ACInfo[playerid][acCheatCount][3]);
  4739.                                     #endif
  4740.                                 }
  4741.                                 else ACInfo[playerid][acCheatCount][3] = 0;
  4742.                             }
  4743.                             ACVehInfo[ac_vehid][acSpeedDiff] = ac_spDiff;
  4744.                         }
  4745.                         ACVehInfo[ac_vehid][acPosX] = ac_pX;
  4746.                         ACVehInfo[ac_vehid][acPosY] = ac_pY;
  4747.                         ACVehInfo[ac_vehid][acPosZ] = ac_pZ;
  4748.                         ACVehInfo[ac_vehid][acVelX] = ac_vX;
  4749.                         ACVehInfo[ac_vehid][acVelY] = ac_vY;
  4750.                         ACVehInfo[ac_vehid][acVelZ] = ac_vZ;
  4751.                         ACVehInfo[ac_vehid][acPosDiff] = ac_dist;
  4752.                         if(floatcmp(ACInfo[playerid][acSetVehHealth], -1.0) == 0) ACVehInfo[ac_vehid][acHealth] = ac_vHealth;
  4753.                         ACVehInfo[ac_vehid][acZAngle] = ac_zAngle;
  4754.                     }
  4755.                     ACInfo[playerid][acSeat] = ac_s;
  4756.                 }
  4757.                 else
  4758.                 {
  4759.                     GetPlayerVelocity(playerid, ac_vX, ac_vY, ac_vZ);
  4760.                     ac_s = ac_GetSpeed(ac_vX, ac_vY, ac_vZ);
  4761.                     if(ACInfo[playerid][acAnim] != (ac_sa = GetPlayerAnimationIndex(playerid)))
  4762.                     {
  4763.                         if(ac_sa == -1)
  4764.                         {
  4765.                             if(ACInfo[playerid][acACAllow][24])
  4766.                             {
  4767.                                 #if defined OnCheatDetected
  4768.                                     ac_KickWithCode(playerid, "", 0, 24);
  4769.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4770.                                 #else
  4771.                                     return ac_KickWithCode(playerid, "", 0, 24);
  4772.                                 #endif
  4773.                             }
  4774.                         }
  4775.                         else if(ACInfo[playerid][acACAllow][30] && !ac_PedAnims)
  4776.                         {
  4777.                             ac_i = GetPlayerSkin(playerid);
  4778.                             if(ac_sa == 1231 && ac_w != 46 && 1 <= ac_i <= 311 && ac_i != 74)
  4779.                             {
  4780.                                 if(++ACInfo[playerid][acCheatCount][19] > AC_MAX_CJ_RUN_WARNINGS)
  4781.                                 {
  4782.                                     #undef AC_MAX_CJ_RUN_WARNINGS
  4783.                                     #if defined DEBUG
  4784.                                         printf("[Nex-AC debug] Skin: %d, old anim: %d, weaponid: %d",
  4785.                                         ac_i, ACInfo[playerid][acAnim], ac_w);
  4786.                                     #endif
  4787.                                     #if defined OnCheatDetected
  4788.                                         ac_KickWithCode(playerid, "", 0, 30);
  4789.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4790.                                         ACInfo[playerid][acCheatCount][19] = 0;
  4791.                                     #else
  4792.                                         return ac_KickWithCode(playerid, "", 0, 30);
  4793.                                     #endif
  4794.                                 }
  4795.                                 #if defined OnCheatWarning
  4796.                                     else OnCheatWarning(playerid, "", 0, 30, 0, ACInfo[playerid][acCheatCount][19]);
  4797.                                 #endif
  4798.                             }
  4799.                             else ACInfo[playerid][acCheatCount][19] = 0;
  4800.                         }
  4801.                     }
  4802.                     else if(ACInfo[playerid][acACAllow][7])
  4803.                     {
  4804.                         if(ac_sa == 157 || ac_sa == 159 || ac_sa == 161 || ac_sa == 1058)
  4805.                         {
  4806.                             if(++ACInfo[playerid][acCheatCount][15] > AC_MAX_FLYHACK_WARNINGS)
  4807.                             {
  4808.                                 #if defined DEBUG
  4809.                                     printf("[Nex-AC debug] Anim: %d, old anim: %d, old veh: %d",
  4810.                                     ac_sa, ACInfo[playerid][acAnim], ACInfo[playerid][acVeh]);
  4811.                                 #endif
  4812.                                 #if defined OnCheatDetected
  4813.                                     ac_KickWithCode(playerid, "", 0, 7, 2);
  4814.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4815.                                     ACInfo[playerid][acCheatCount][15] = 0;
  4816.                                 #else
  4817.                                     return ac_KickWithCode(playerid, "", 0, 7, 2);
  4818.                                 #endif
  4819.                             }
  4820.                             #if defined OnCheatWarning
  4821.                                 else OnCheatWarning(playerid, "", 0, 7, 2, ACInfo[playerid][acCheatCount][15]);
  4822.                             #endif
  4823.                         }
  4824.                         else if(1538 <= ac_sa <= 1544 && ac_s > 36 && ACInfo[playerid][acSpeed] < ac_s)
  4825.                         {
  4826.                             if(++ACInfo[playerid][acCheatCount][15] > AC_MAX_FLYHACK_WARNINGS)
  4827.                             {
  4828.                                 #if defined DEBUG
  4829.                                     printf("[Nex-AC debug] Speed: %d, old speed: %d, anim: %d",
  4830.                                     ac_s, ACInfo[playerid][acSpeed], ac_sa);
  4831.                                 #endif
  4832.                                 #if defined OnCheatDetected
  4833.                                     ac_KickWithCode(playerid, "", 0, 7, 3);
  4834.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4835.                                     ACInfo[playerid][acCheatCount][15] = 0;
  4836.                                 #else
  4837.                                     return ac_KickWithCode(playerid, "", 0, 7, 3);
  4838.                                 #endif
  4839.                             }
  4840.                             #if defined OnCheatWarning
  4841.                                 else OnCheatWarning(playerid, "", 0, 7, 3, ACInfo[playerid][acCheatCount][15]);
  4842.                             #endif
  4843.                         }
  4844.                         else if(958 <= ac_sa <= 979 &&
  4845.                         (floatcmp(ac_vZ, 0.08) == 1 || floatcmp(floatadd(floatmul(ac_vX, ac_vX), floatmul(ac_vY, ac_vY)), 0.9) == 1))
  4846.                         {
  4847.                             if(++ACInfo[playerid][acCheatCount][15] > AC_MAX_FLYHACK_WARNINGS)
  4848.                             {
  4849.                                 #undef AC_MAX_FLYHACK_WARNINGS
  4850.                                 #if defined DEBUG
  4851.                                     printf("[Nex-AC debug] Anim: %d, old anim: %d, weaponid: %d, spec act: %d",
  4852.                                     ac_sa, ACInfo[playerid][acAnim], ac_w, ac_specact);
  4853.                                 #endif
  4854.                                 #if defined OnCheatDetected
  4855.                                     ac_KickWithCode(playerid, "", 0, 7, 1);
  4856.                                     if(ACInfo[playerid][acKicked] > 0) return 0;
  4857.                                     ACInfo[playerid][acCheatCount][15] = 0;
  4858.                                 #else
  4859.                                     return ac_KickWithCode(playerid, "", 0, 7, 1);
  4860.                                 #endif
  4861.                             }
  4862.                             #if defined OnCheatWarning
  4863.                                 else OnCheatWarning(playerid, "", 0, 7, 1, ACInfo[playerid][acCheatCount][15]);
  4864.                             #endif
  4865.                         }
  4866.                         else ACInfo[playerid][acCheatCount][15] = 0;
  4867.                     }
  4868.                     if(ACInfo[playerid][acSet][4] != -1)
  4869.                     {
  4870.                         if(ac_specact == ACInfo[playerid][acSet][4]) ACInfo[playerid][acSet][4] = -1;
  4871.                         else if(ac_gtc > ACInfo[playerid][acGtc][6] + ac_gpp)
  4872.                         {
  4873.                             if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][6] &&
  4874.                             ac_specact != SPECIAL_ACTION_DUCK &&
  4875.                             !(SPECIAL_ACTION_ENTER_VEHICLE <= ac_specact <= SPECIAL_ACTION_EXIT_VEHICLE))
  4876.                             {
  4877.                                 if(++ACInfo[playerid][acNOPCount][6] > AC_MAX_NOP_WARNINGS)
  4878.                                 {
  4879.                                     #if defined DEBUG
  4880.                                         printf(DEBUG_CODE_5, playerid, "SetPlayerSpecialAction");
  4881.                                         printf("[Nex-AC debug] AC spec act: %d, spec act: %d", ACInfo[playerid][acSet][4], ac_specact);
  4882.                                     #endif
  4883.                                     #if defined OnCheatDetected
  4884.                                         ac_KickWithCode(playerid, "", 0, 52, 12);
  4885.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  4886.                                         ACInfo[playerid][acSet][4] = -1;
  4887.                                     #else
  4888.                                         return ac_KickWithCode(playerid, "", 0, 52, 12);
  4889.                                     #endif
  4890.                                 }
  4891.                                 #if defined OnNOPWarning
  4892.                                     else OnNOPWarning(playerid, 12, ACInfo[playerid][acNOPCount][6]);
  4893.                                 #endif
  4894.                             }
  4895.                             else if(++ACInfo[playerid][acNOPCount][6] > AC_MAX_NOP_WARNINGS) ACInfo[playerid][acSet][4] = -1;
  4896.                             #undef AC_MAX_NOP_WARNINGS
  4897.                         }
  4898.                     }
  4899.                     else if(ac_specact != ACInfo[playerid][acSpecAct])
  4900.                     {
  4901.                         if(ac_specact == ACInfo[playerid][acNextSpecAct]) ACInfo[playerid][acNextSpecAct] = -1;
  4902.                         else if(ACInfo[playerid][acACAllow][18])
  4903.                         {
  4904.                             switch(ac_specact)
  4905.                             {
  4906.                                 case SPECIAL_ACTION_NONE:
  4907.                                 {
  4908.                                     switch(ACInfo[playerid][acSpecAct])
  4909.                                     {
  4910.                                         case SPECIAL_ACTION_USECELLPHONE, SPECIAL_ACTION_CUFFED, SPECIAL_ACTION_CARRY:
  4911.                                         {
  4912.                                             #if defined OnCheatDetected
  4913.                                                 ac_KickWithCode(playerid, "", 0, 18, 1);
  4914.                                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4915.                                             #else
  4916.                                                 return ac_KickWithCode(playerid, "", 0, 18, 1);
  4917.                                             #endif
  4918.                                         }
  4919.                                     }
  4920.                                 }
  4921.                                 case SPECIAL_ACTION_DUCK:
  4922.                                 {
  4923.                                     if(ACInfo[playerid][acSpecAct] > SPECIAL_ACTION_NONE &&
  4924.                                     !(SPECIAL_ACTION_DRINK_BEER <= ACInfo[playerid][acSpecAct] <= SPECIAL_ACTION_CUFFED))
  4925.                                     {
  4926.                                         #if defined DEBUG
  4927.                                             printf("[Nex-AC debug] AC spec act: %d, spec act: %d", ACInfo[playerid][acSpecAct], ac_specact);
  4928.                                         #endif
  4929.                                         #if defined OnCheatDetected
  4930.                                             ac_KickWithCode(playerid, "", 0, 18, 2);
  4931.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4932.                                         #else
  4933.                                             return ac_KickWithCode(playerid, "", 0, 18, 2);
  4934.                                         #endif
  4935.                                     }
  4936.                                 }
  4937.                                 case SPECIAL_ACTION_USEJETPACK:
  4938.                                 {
  4939.                                     if(floatcmp((ac_tmp = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acDropJpX], ACInfo[playerid][acDropJpY], ACInfo[playerid][acDropJpZ])), 15.0) == 1)
  4940.                                     {
  4941.                                         #if defined DEBUG
  4942.                                             printf("[Nex-AC debug] AC spec act: %d, spec act: %d, dist: %f",
  4943.                                             ACInfo[playerid][acSpecAct], ac_specact, ac_tmp);
  4944.                                         #endif
  4945.                                         #if defined OnCheatDetected
  4946.                                             ac_KickWithCode(playerid, "", 0, 18, 3);
  4947.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4948.                                         #else
  4949.                                             return ac_KickWithCode(playerid, "", 0, 18, 3);
  4950.                                         #endif
  4951.                                     }
  4952.                                     else ACInfo[playerid][acNextSpecAct] = ACInfo[playerid][acSpecAct];
  4953.                                     ACInfo[playerid][acDropJpX] = ACInfo[playerid][acDropJpY] = ACInfo[playerid][acDropJpZ] = 25000.0;
  4954.                                 }
  4955.                                 case SPECIAL_ACTION_ENTER_VEHICLE:
  4956.                                 {
  4957.                                     switch(ACInfo[playerid][acSpecAct])
  4958.                                     {
  4959.                                         case SPECIAL_ACTION_DANCE1, SPECIAL_ACTION_DANCE2, SPECIAL_ACTION_DANCE3, SPECIAL_ACTION_DANCE4, SPECIAL_ACTION_USECELLPHONE, 68:
  4960.                                         {
  4961.                                             #if defined OnCheatDetected
  4962.                                                 ac_KickWithCode(playerid, "", 0, 18, 4);
  4963.                                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  4964.                                             #else
  4965.                                                 return ac_KickWithCode(playerid, "", 0, 18, 4);
  4966.                                             #endif
  4967.                                         }
  4968.                                     }
  4969.                                 }
  4970.                                 default:
  4971.                                 {
  4972.                                     if(!((SPECIAL_ACTION_DRINK_BEER <= ac_specact <= SPECIAL_ACTION_CUFFED &&
  4973.                                     ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_DUCK ||
  4974.                                     ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_ENTER_VEHICLE) &&
  4975.                                     ac_specact == ACInfo[playerid][acLastSpecAct]) &&
  4976.                                     (ACInfo[playerid][acVeh] == 0 || ac_specact != SPECIAL_ACTION_EXIT_VEHICLE &&
  4977.                                     !(SPECIAL_ACTION_CUFFED <= ac_specact <= SPECIAL_ACTION_CARRY) &&
  4978.                                     ac_specact != SPECIAL_ACTION_USECELLPHONE))
  4979.                                     {
  4980.                                         #if defined DEBUG
  4981.                                             printf("[Nex-AC debug] AC spec act: %d, spec act: %d, Last spec act: %d, old veh: %d",
  4982.                                             ACInfo[playerid][acSpecAct], ac_specact, ACInfo[playerid][acLastSpecAct], ACInfo[playerid][acVeh]);
  4983.                                         #endif
  4984.                                         #if defined OnCheatDetected
  4985.                                             ac_KickWithCode(playerid, "", 0, 18, 5);
  4986.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  4987.                                         #else
  4988.                                             return ac_KickWithCode(playerid, "", 0, 18, 5);
  4989.                                         #endif
  4990.                                     }
  4991.                                 }
  4992.                             }
  4993.                         }
  4994.                         ACInfo[playerid][acLastSpecAct] = ACInfo[playerid][acSpecAct];
  4995.                     }
  4996.                     if(!IsVehicleStreamedIn(GetPlayerSurfingVehicleID(playerid), playerid) &&
  4997.                     GetPlayerSurfingObjectID(playerid) == INVALID_OBJECT_ID)
  4998.                     {
  4999.                         if(floatcmp(ac_dist, 0.7) == 1)
  5000.                         {
  5001.                             if(floatcmp(ac_dist, 40.0) >= 0 && floatcmp(ac_dist_set, 40.0) >= 0)
  5002.                             {
  5003.                                 if(ACInfo[playerid][acACAllow][2] && !ACInfo[playerid][acIntEnterExits] &&
  5004.                                 (floatcmp(ACInfo[playerid][acPosZ], -95.0) == 1 || floatcmp(VectorSize(floatsub(ac_pX, ACInfo[playerid][acPosX]), floatsub(ac_pY, ACInfo[playerid][acPosY]), 0.0), 80.0) >= 0))
  5005.                                 {
  5006.                                     #if defined DEBUG
  5007.                                         printf("[Nex-AC debug] Dist: %f, dist set: %f, speed: %d, pos x, y, z: %f, %f, %f",
  5008.                                         ac_dist, ac_dist_set, ac_s, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  5009.                                     #endif
  5010.                                     #if defined OnCheatDetected
  5011.                                         ac_KickWithCode(playerid, "", 0, 2, 2);
  5012.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  5013.                                     #else
  5014.                                         return ac_KickWithCode(playerid, "", 0, 2, 2);
  5015.                                     #endif
  5016.                                 }
  5017.                             }
  5018.                             else if(floatcmp(ac_s, floatmul(ac_dist, (floatcmp(ac_dist, 1.0) == -1 ? 14.0 : 5.0))) <= 0 &&
  5019.                             ac_gtc > ACInfo[playerid][acGtc][11] + ac_gpp)
  5020.                             {
  5021.                                 if(ac_s < 3 && floatcmp(ac_dist, 15.0) >= 0)
  5022.                                 {
  5023.                                     if(ACInfo[playerid][acACAllow][2])
  5024.                                     {
  5025.                                         #if defined DEBUG
  5026.                                             printf("[Nex-AC debug] Speed: %d, dist: %f", ac_s, ac_dist);
  5027.                                         #endif
  5028.                                         #if defined OnCheatDetected
  5029.                                             ac_KickWithCode(playerid, "", 0, 2, 3);
  5030.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  5031.                                         #else
  5032.                                             return ac_KickWithCode(playerid, "", 0, 2, 3);
  5033.                                         #endif
  5034.                                     }
  5035.                                 }
  5036.                                 else if(ACInfo[playerid][acACAllow][0] && (ac_s || floatcmp(ac_dist, 3.0) >= 0))
  5037.                                 {
  5038.                                     if(++ACInfo[playerid][acCheatCount][1] > AC_MAX_AIR_WARNINGS)
  5039.                                     {
  5040.                                         #undef AC_MAX_AIR_WARNINGS
  5041.                                         #if defined DEBUG
  5042.                                             printf("[Nex-AC debug] Speed: %d, dist: %f", ac_s, ac_dist);
  5043.                                         #endif
  5044.                                         #if defined OnCheatDetected
  5045.                                             ac_KickWithCode(playerid, "", 0, 0);
  5046.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  5047.                                             ACInfo[playerid][acCheatCount][1] = 0;
  5048.                                         #else
  5049.                                             return ac_KickWithCode(playerid, "", 0, 0);
  5050.                                         #endif
  5051.                                     }
  5052.                                     #if defined OnCheatWarning
  5053.                                         else OnCheatWarning(playerid, "", 0, 0, 0, ACInfo[playerid][acCheatCount][1]);
  5054.                                     #endif
  5055.                                 }
  5056.                             }
  5057.                         }
  5058.                         if(ac_gtc > ACInfo[playerid][acGtc][10] + ac_gpp)
  5059.                         {
  5060.                             if(ACInfo[playerid][acACAllow][9] && ACInfo[playerid][acSpeed] < ac_s)
  5061.                             {
  5062.                                 if(ac_s > 530)
  5063.                                 {
  5064.                                     #if defined DEBUG
  5065.                                         printf("[Nex-AC debug] Speed: %d, old speed: %d", ac_s, ACInfo[playerid][acSpeed]);
  5066.                                     #endif
  5067.                                     #if defined OnCheatDetected
  5068.                                         ac_KickWithCode(playerid, "", 0, 9, 1);
  5069.                                         if(ACInfo[playerid][acKicked] > 0) return 0;
  5070.                                     #else
  5071.                                         return ac_KickWithCode(playerid, "", 0, 9, 1);
  5072.                                     #endif
  5073.                                 }
  5074.                                 else if((ac_s > 257 || (ac_i = ac_GetSpeed(ac_vX, ac_vY)) > 128) &&
  5075.                                 ACInfo[playerid][acHealth] <= ac_health)
  5076.                                 {
  5077.                                     if(++ACInfo[playerid][acCheatCount][17] > AC_MAX_SPEEDHACK_WARNINGS)
  5078.                                     {
  5079.                                         #undef AC_MAX_SPEEDHACK_WARNINGS
  5080.                                         #if defined DEBUG
  5081.                                             printf("[Nex-AC debug] Speed: %d, speed x, y: %d, old speed: %d",
  5082.                                             ac_s, ac_i, ACInfo[playerid][acSpeed]);
  5083.                                         #endif
  5084.                                         #if defined OnCheatDetected
  5085.                                             ac_KickWithCode(playerid, "", 0, 9, 2);
  5086.                                             if(ACInfo[playerid][acKicked] > 0) return 0;
  5087.                                             ACInfo[playerid][acCheatCount][17] = 0;
  5088.                                         #else
  5089.                                             return ac_KickWithCode(playerid, "", 0, 9, 2);
  5090.                                         #endif
  5091.                                     }
  5092.                                     #if defined OnCheatWarning
  5093.                                         else OnCheatWarning(playerid, "", 0, 9, 2, ACInfo[playerid][acCheatCount][17]);
  5094.                                     #endif
  5095.                                 }
  5096.                                 else ACInfo[playerid][acCheatCount][17] = 0;
  5097.                             }
  5098.                             ACInfo[playerid][acSpeed] = ac_s;
  5099.                         }
  5100.                     }
  5101.                     else ACInfo[playerid][acSpeed] = ac_s;
  5102.                     ACInfo[playerid][acAnim] = ac_sa;
  5103.                 }
  5104.                 ACInfo[playerid][acSpecAct] = ac_specact;
  5105.                 ACInfo[playerid][acHealth] = ac_health;
  5106.                 ACInfo[playerid][acArmour] = ac_armour;
  5107.             }
  5108.             ACInfo[playerid][acVeh] = ac_vehid;
  5109.             if(ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp) ACInfo[playerid][acLastWeapon] = ac_w;
  5110.             ACInfo[playerid][acPosX] = ac_pX;
  5111.             ACInfo[playerid][acPosY] = ac_pY;
  5112.             ACInfo[playerid][acPosZ] = ac_pZ;
  5113.         }
  5114.     }
  5115.     ac_gpp = 1;
  5116.     ACInfo[playerid][acUpdateTime] = ac_gtc;
  5117.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5118.         && defined ac_OnPlayerUpdate
  5119.         ac_gpp = ac_OnPlayerUpdate(playerid);
  5120.     #endif
  5121.     if(ACInfo[playerid][acACAllow][33] && ac_gpp) return ACInfo[playerid][acUnFrozen];
  5122.     return ac_gpp;
  5123. }
  5124.  
  5125. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5126.     #if defined _ALS_OnPlayerUpdate
  5127.         #undef OnPlayerUpdate
  5128.     #else
  5129.         #define _ALS_OnPlayerUpdate
  5130.     #endif
  5131.     #define OnPlayerUpdate ac_OnPlayerUpdate
  5132.     #if defined ac_OnPlayerUpdate
  5133.         forward ac_OnPlayerUpdate(playerid);
  5134.     #endif
  5135. #endif
  5136.  
  5137. #if defined _inc_y_hooks || defined _INC_y_hooks
  5138.     hook OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  5139. #else
  5140.     public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  5141. #endif
  5142. {
  5143.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] > 0) return 0;
  5144.     if(!IsPlayerNPC(playerid))
  5145.     {
  5146.         if((newkeys & KEY_SECONDARY_ATTACK) && ACInfo[playerid][acSpecAct] == SPECIAL_ACTION_USEJETPACK &&
  5147.         GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_USEJETPACK)
  5148.         {
  5149.             ACInfo[playerid][acDropJpX] = ACInfo[playerid][acPosX];
  5150.             ACInfo[playerid][acDropJpY] = ACInfo[playerid][acPosY];
  5151.             ACInfo[playerid][acDropJpZ] = ACInfo[playerid][acPosZ];
  5152.         }
  5153.         new ac_w = GetPlayerWeapon(playerid);
  5154.         if((newkeys & KEY_CROUCH) && (24 <= ac_w <= 25 || 33 <= ac_w <= 34)) ACInfo[playerid][acCheatCount][14] = 0;
  5155.     }
  5156.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5157.         && defined ac_OnPlayerKeyStateChange
  5158.         return ac_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
  5159.     #else
  5160.         return 1;
  5161.     #endif
  5162. }
  5163.  
  5164. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5165.     #if defined _ALS_OnPlayerKeyStateChange
  5166.         #undef OnPlayerKeyStateChange
  5167.     #else
  5168.         #define _ALS_OnPlayerKeyStateChange
  5169.     #endif
  5170.     #define OnPlayerKeyStateChange ac_OnPlayerKeyStateChange
  5171.     #if defined ac_OnPlayerKeyStateChange
  5172.         forward ac_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
  5173.     #endif
  5174. #endif
  5175.  
  5176. #if defined _inc_y_hooks || defined _INC_y_hooks
  5177.     hook OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  5178. #else
  5179.     public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  5180. #endif
  5181. {
  5182.     if(ACInfo[playerid][acKicked] > 0) return 1;
  5183.     new ac_gtc = GetTickCount();
  5184.     if(ACInfo[playerid][acACAllow][49])
  5185.     {
  5186.         if(ac_gtc < ACInfo[playerid][acCall][2] + ac_Mtfc[2][0]) ac_FloodDetect(playerid, 2);
  5187.         else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5188.         else ACInfo[playerid][acFloodCount][2] = ACInfo[playerid][acFloodCount][27] = 0;
  5189.     }
  5190.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][2] = ac_gtc;
  5191.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5192.         && defined ac_OnPlayerClickMap
  5193.         return ac_OnPlayerClickMap(playerid, fX, fY, fZ);
  5194.     #else
  5195.         return 0;
  5196.     #endif
  5197. }
  5198.  
  5199. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5200.     #if defined _ALS_OnPlayerClickMap
  5201.         #undef OnPlayerClickMap
  5202.     #else
  5203.         #define _ALS_OnPlayerClickMap
  5204.     #endif
  5205.     #define OnPlayerClickMap ac_OnPlayerClickMap
  5206.     #if defined ac_OnPlayerClickMap
  5207.         forward ac_OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ);
  5208.     #endif
  5209. #endif
  5210.  
  5211. #if defined _inc_y_hooks || defined _INC_y_hooks
  5212.     hook OnPlayerClickPlayer(playerid, clickedplayerid, source)
  5213. #else
  5214.     public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  5215. #endif
  5216. {
  5217.     if(ACInfo[playerid][acKicked] > 0) return 1;
  5218.     new ac_gtc = GetTickCount();
  5219.     if(ACInfo[playerid][acACAllow][49])
  5220.     {
  5221.         if(ac_gtc < ACInfo[playerid][acCall][3] + ac_Mtfc[3][0])
  5222.         {
  5223.             ac_FloodDetect(playerid, 3);
  5224.             return 1;
  5225.         }
  5226.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5227.         else ACInfo[playerid][acFloodCount][3] = ACInfo[playerid][acFloodCount][27] = 0;
  5228.     }
  5229.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][3] = ac_gtc;
  5230.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5231.         && defined ac_OnPlayerClickPlayer
  5232.         return ac_OnPlayerClickPlayer(playerid, clickedplayerid, source);
  5233.     #else
  5234.         return 0;
  5235.     #endif
  5236. }
  5237.  
  5238. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5239.     #if defined _ALS_OnPlayerClickPlayer
  5240.         #undef OnPlayerClickPlayer
  5241.     #else
  5242.         #define _ALS_OnPlayerClickPlayer
  5243.     #endif
  5244.     #define OnPlayerClickPlayer ac_OnPlayerClickPlayer
  5245.     #if defined ac_OnPlayerClickPlayer
  5246.         forward ac_OnPlayerClickPlayer(playerid, clickedplayerid, source);
  5247.     #endif
  5248. #endif
  5249.  
  5250. #if defined _inc_y_hooks || defined _INC_y_hooks
  5251.     hook OnPlayerClickTextDraw(playerid, Text:clickedid)
  5252. #else
  5253.     public OnPlayerClickTextDraw(playerid, Text:clickedid)
  5254. #endif
  5255. {
  5256.     if(ACInfo[playerid][acKicked] > 0) return 1;
  5257.     new ac_gtc = GetTickCount();
  5258.     if(ACInfo[playerid][acACAllow][49])
  5259.     {
  5260.         if(ac_gtc < ACInfo[playerid][acCall][4] + ac_Mtfc[4][0])
  5261.         {
  5262.             ac_FloodDetect(playerid, 4);
  5263.             return 1;
  5264.         }
  5265.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5266.         else ACInfo[playerid][acFloodCount][4] = ACInfo[playerid][acFloodCount][27] = 0;
  5267.     }
  5268.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][4] = ac_gtc;
  5269.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5270.         && defined ac_OnPlayerClickTextDraw
  5271.         return ac_OnPlayerClickTextDraw(playerid, clickedid);
  5272.     #else
  5273.         return 0;
  5274.     #endif
  5275. }
  5276.  
  5277. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5278.     #if defined _ALS_OnPlayerClickTextDraw
  5279.         #undef OnPlayerClickTextDraw
  5280.     #else
  5281.         #define _ALS_OnPlayerClickTextDraw
  5282.     #endif
  5283.     #define OnPlayerClickTextDraw ac_OnPlayerClickTextDraw
  5284.     #if defined ac_OnPlayerClickTextDraw
  5285.         forward ac_OnPlayerClickTextDraw(playerid, Text:clickedid);
  5286.     #endif
  5287. #endif
  5288.  
  5289. #if defined _inc_y_hooks || defined _INC_y_hooks
  5290.     hook OnPlayerCommandText(playerid, cmdtext[])
  5291. #else
  5292.     public OnPlayerCommandText(playerid, cmdtext[])
  5293. #endif
  5294. {
  5295.     if(ACInfo[playerid][acKicked] > 0) return 1;
  5296.     if(!IsPlayerNPC(playerid))
  5297.     {
  5298.         new ac_gtc = GetTickCount();
  5299.         if(ACInfo[playerid][acACAllow][49])
  5300.         {
  5301.             if(ac_gtc < ACInfo[playerid][acCall][5] + ac_Mtfc[5][0])
  5302.             {
  5303.                 ac_FloodDetect(playerid, 5);
  5304.                 return 1;
  5305.             }
  5306.             if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5307.             else ACInfo[playerid][acFloodCount][5] = ACInfo[playerid][acFloodCount][27] = 0;
  5308.         }
  5309.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][5] = ac_gtc;
  5310.     }
  5311.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5312.         && defined ac_OnPlayerCommandText
  5313.         return ac_OnPlayerCommandText(playerid, cmdtext);
  5314.     #else
  5315.         return 0;
  5316.     #endif
  5317. }
  5318.  
  5319. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5320.     #if defined _ALS_OnPlayerCommandText
  5321.         #undef OnPlayerCommandText
  5322.     #else
  5323.         #define _ALS_OnPlayerCommandText
  5324.     #endif
  5325.     #define OnPlayerCommandText ac_OnPlayerCommandText
  5326.     #if defined ac_OnPlayerCommandText
  5327.         forward ac_OnPlayerCommandText(playerid, cmdtext[]);
  5328.     #endif
  5329. #endif
  5330.  
  5331. #if defined _inc_y_hooks || defined _INC_y_hooks
  5332.     hook OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  5333. #else
  5334.     public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  5335. #endif
  5336. {
  5337.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] > 0) return 0;
  5338.     new ac_gtc = GetTickCount();
  5339.     if(ACInfo[playerid][acACAllow][49])
  5340.     {
  5341.         if(ac_gtc < ACInfo[playerid][acCall][6] + ac_Mtfc[6][0]) ac_FloodDetect(playerid, 6);
  5342.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5343.         else ACInfo[playerid][acFloodCount][6] = ACInfo[playerid][acFloodCount][27] = 0;
  5344.     }
  5345.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][6] = ac_gtc;
  5346.     new ac_model = GetVehicleModel(vehicleid);
  5347.     if(ACInfo[playerid][acACAllow][44] && !(569 <= ac_model <= 570) && !IsVehicleStreamedIn(vehicleid, playerid))
  5348.     {
  5349.         #if defined DEBUG
  5350.             printf("[Nex-AC debug] Veh: %d, veh model: %d, ispassenger: %d", vehicleid, ac_model, ispassenger);
  5351.         #endif
  5352.         return ac_KickWithCode(playerid, "", 0, 44, 1);
  5353.     }
  5354.     new ac_doors, ac_tmp;
  5355.     GetVehicleParamsEx(vehicleid, ac_tmp, ac_tmp, ac_tmp, ac_doors, ac_tmp, ac_tmp, ac_tmp);
  5356.     if(ispassenger || ac_doors != VEHICLE_PARAMS_ON)
  5357.     {
  5358.         if(ACInfo[playerid][acEnterVeh] != vehicleid)
  5359.         {
  5360.             ACInfo[playerid][acEnterVeh] = vehicleid;
  5361.             if(ac_model == 570 || ac_IsABoat(ac_model)) ACInfo[playerid][acEnterVehTime] = 0;
  5362.             else ACInfo[playerid][acEnterVehTime] = ac_gtc;
  5363.         }
  5364.     }
  5365.     else ACInfo[playerid][acEnterVeh] = 0;
  5366.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5367.         && defined ac_OnPlayerEnterVehicle
  5368.         return ac_OnPlayerEnterVehicle(playerid, vehicleid, ispassenger);
  5369.     #else
  5370.         return 1;
  5371.     #endif
  5372. }
  5373.  
  5374. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5375.     #if defined _ALS_OnPlayerEnterVehicle
  5376.         #undef OnPlayerEnterVehicle
  5377.     #else
  5378.         #define _ALS_OnPlayerEnterVehicle
  5379.     #endif
  5380.     #define OnPlayerEnterVehicle ac_OnPlayerEnterVehicle
  5381.     #if defined ac_OnPlayerEnterVehicle
  5382.         forward ac_OnPlayerEnterVehicle(playerid, vehicleid, ispassenger);
  5383.     #endif
  5384. #endif
  5385.  
  5386. #if defined _inc_y_hooks || defined _INC_y_hooks
  5387.     hook OnPlayerExitVehicle(playerid, vehicleid)
  5388. #else
  5389.     public OnPlayerExitVehicle(playerid, vehicleid)
  5390. #endif
  5391. {
  5392.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] > 0) return 0;
  5393.     new ac_gtc = GetTickCount();
  5394.     if(ACInfo[playerid][acACAllow][49])
  5395.     {
  5396.         if(ac_gtc < ACInfo[playerid][acCall][7] + ac_Mtfc[7][0]) ac_FloodDetect(playerid, 7);
  5397.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5398.         else ACInfo[playerid][acFloodCount][7] = ACInfo[playerid][acFloodCount][27] = 0;
  5399.     }
  5400.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][7] = ac_gtc;
  5401.     if(ACInfo[playerid][acACAllow][44] && !IsVehicleStreamedIn(vehicleid, playerid))
  5402.     {
  5403.         #if defined DEBUG
  5404.             printf("[Nex-AC debug] Veh: %d, veh model: %d", vehicleid, GetVehicleModel(vehicleid));
  5405.         #endif
  5406.         return ac_KickWithCode(playerid, "", 0, 44, 5);
  5407.     }
  5408.     if(ac_IsAnAircraft(GetVehicleModel(ACInfo[playerid][acVeh]))) ACInfo[playerid][acParachute] = 1;
  5409.     else if(ACInfo[playerid][acParachute] != 2) ACInfo[playerid][acParachute] = 0;
  5410.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5411.         && defined ac_OnPlayerExitVehicle
  5412.         return ac_OnPlayerExitVehicle(playerid, vehicleid);
  5413.     #else
  5414.         return 1;
  5415.     #endif
  5416. }
  5417.  
  5418. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5419.     #if defined _ALS_OnPlayerExitVehicle
  5420.         #undef OnPlayerExitVehicle
  5421.     #else
  5422.         #define _ALS_OnPlayerExitVehicle
  5423.     #endif
  5424.     #define OnPlayerExitVehicle ac_OnPlayerExitVehicle
  5425.     #if defined ac_OnPlayerExitVehicle
  5426.         forward ac_OnPlayerExitVehicle(playerid, vehicleid);
  5427.     #endif
  5428. #endif
  5429.  
  5430. #if defined OnPlayerPickUpDynamicPickup\
  5431.     && defined Streamer_GetDistanceToItem\
  5432.     && defined Streamer_GetIntData
  5433.     #if defined _inc_y_hooks || defined _INC_y_hooks
  5434.         #if defined STREAMER_ENABLE_TAGS
  5435.             hook OnPlayerPickUpDynPickup(playerid, STREAMER_TAG_PICKUP pickupid)
  5436.         #else
  5437.             hook OnPlayerPickUpDynPickup(playerid, pickupid)
  5438.         #endif
  5439.     #else
  5440.         #if defined STREAMER_ENABLE_TAGS
  5441.             public OnPlayerPickUpDynamicPickup(playerid, STREAMER_TAG_PICKUP pickupid)
  5442.         #else
  5443.             public OnPlayerPickUpDynamicPickup(playerid, pickupid)
  5444.         #endif
  5445.     #endif
  5446.     {
  5447.         if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] > 0) return 0;
  5448.         new ac_i = GetTickCount();
  5449.         if(ACInfo[playerid][acACAllow][49])
  5450.         {
  5451.             if(ac_i < ACInfo[playerid][acCall][8] + ac_Mtfc[8][0]) ac_FloodDetect(playerid, 8);
  5452.             else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5453.             else ACInfo[playerid][acFloodCount][8] = ACInfo[playerid][acFloodCount][27] = 0;
  5454.         }
  5455.         if(ACInfo[playerid][acACAllow][6])
  5456.         {
  5457.             new Float:ac_x, Float:ac_y, Float:ac_z, Float:ac_dist, Float:ac_dist_set;
  5458.             GetPlayerPos(playerid, ac_x, ac_y, ac_z);
  5459.             Streamer_GetDistanceToItem(ac_x, ac_y, ac_z, STREAMER_TYPE_PICKUP, pickupid, ac_dist);
  5460.             Streamer_GetDistanceToItem(ACInfo[playerid][acSetPosX], ACInfo[playerid][acSetPosY], (ACInfo[playerid][acTpToZ] ? ac_z : ACInfo[playerid][acSetPosZ]), STREAMER_TYPE_PICKUP, pickupid, ac_dist_set);
  5461.             if(floatcmp(ac_dist, 15.0) == 1 && (ACInfo[playerid][acSet][8] == -1 || floatcmp(ac_dist_set, 15.0) == 1))
  5462.             {
  5463.                 #if defined DEBUG
  5464.                     printf("[Nex-AC debug] Pickupid: %d, dist: %f, dist set: %f, acSet[8]: %d, playerid: %d",
  5465.                     _:pickupid, ac_dist, ac_dist_set, ACInfo[playerid][acSet][8], playerid);
  5466.                 #endif
  5467.                 #if defined OnCheatDetected
  5468.                     ac_KickWithCode(playerid, "", 0, 6, 2);
  5469.                 #endif
  5470.                 return 0;
  5471.             }
  5472.         }
  5473.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][8] = ac_i;
  5474.         #if AC_USE_PICKUP_WEAPONS
  5475.             switch((ac_i = Streamer_GetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID)))
  5476.             {
  5477.                 case 2: ACInfo[playerid][acSpecAct] = SPECIAL_ACTION_USEJETPACK;
  5478.                 case 3: ACInfo[playerid][acHealth] = 100;
  5479.                 case 4: ACInfo[playerid][acArmour] = 100;
  5480.                 default:
  5481.                 {
  5482.                     if(ac_i > 100)
  5483.                     {
  5484.                         ac_i -= 100;
  5485.                         new ac_s = ac_wSlot[ac_i];
  5486.                         if(ACInfo[playerid][acWeapon][ac_s] == ac_i ||
  5487.                         3 <= ac_s <= 5 && ACInfo[playerid][acWeapon][ac_s] > 0) ACInfo[playerid][acAmmo][ac_s] += ac_pAmmo[ac_i];
  5488.                     }
  5489.                 }
  5490.             }
  5491.         #endif
  5492.         ACInfo[playerid][acLastPickup] = _:pickupid + MAX_PICKUPS;
  5493.         #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5494.             && defined ac_OnPlayerPickUpDynamicPickup
  5495.             return ac_OnPlayerPickUpDynamicPickup(playerid, pickupid);
  5496.         #else
  5497.             return 1;
  5498.         #endif
  5499.     }
  5500.  
  5501.     #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5502.         #if defined _ALS_OnPlayerPickUpDynamicPicku\
  5503.             || defined _ALS_OnPlayerPickUpDynPickup\
  5504.             || defined _ALS_OnPlayerPickUpDynamicPick || defined _ALS_OnPlayerPickUpDynamicPUp
  5505.             #undef OnPlayerPickUpDynamicPickup
  5506.         #else
  5507.             #define _ALS_OnPlayerPickUpDynPickup
  5508.         #endif
  5509.         #define OnPlayerPickUpDynamicPickup ac_OnPlayerPickUpDynamicPickup
  5510.         #if defined ac_OnPlayerPickUpDynamicPickup
  5511.             #if defined STREAMER_ENABLE_TAGS
  5512.                 forward ac_OnPlayerPickUpDynamicPickup(playerid, STREAMER_TAG_PICKUP pickupid);
  5513.             #else
  5514.                 forward ac_OnPlayerPickUpDynamicPickup(playerid, pickupid);
  5515.             #endif
  5516.         #endif
  5517.     #endif
  5518. #endif
  5519.  
  5520. #if defined _inc_y_hooks || defined _INC_y_hooks
  5521.     hook OnPlayerPickUpPickup(playerid, pickupid)
  5522. #else
  5523.     public OnPlayerPickUpPickup(playerid, pickupid)
  5524. #endif
  5525. {
  5526.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] > 0 || !(0 <= pickupid < MAX_PICKUPS)) return 0;
  5527.     #if defined Streamer_GetItemStreamerID\
  5528.         && defined IsValidDynamicPickup
  5529.         #if defined STREAMER_ENABLE_TAGS
  5530.             new STREAMER_TAG_PICKUP streamerid = STREAMER_TAG_PICKUP Streamer_GetItemStreamerID(playerid, STREAMER_TYPE_PICKUP, pickupid);
  5531.         #else
  5532.             new streamerid = Streamer_GetItemStreamerID(playerid, STREAMER_TYPE_PICKUP, pickupid);
  5533.         #endif
  5534.         if(!IsValidDynamicPickup(streamerid))
  5535.         {
  5536.     #endif
  5537.         new ac_i = GetTickCount();
  5538.         if(ACInfo[playerid][acACAllow][49])
  5539.         {
  5540.             if(ac_i < ACInfo[playerid][acCall][8] + ac_Mtfc[8][0]) ac_FloodDetect(playerid, 8);
  5541.             else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5542.             else ACInfo[playerid][acFloodCount][8] = ACInfo[playerid][acFloodCount][27] = 0;
  5543.         }
  5544.         if(ACInfo[playerid][acACAllow][6])
  5545.         {
  5546.             new Float:ac_dist = GetPlayerDistanceFromPoint(playerid, ACPickInfo[pickupid][acPosX], ACPickInfo[pickupid][acPosY], ACPickInfo[pickupid][acPosZ]),
  5547.             Float:ac_dist_set = VectorSize(floatsub(ACInfo[playerid][acSetPosX], ACPickInfo[pickupid][acPosX]), floatsub(ACInfo[playerid][acSetPosY], ACPickInfo[pickupid][acPosY]), floatsub((ACInfo[playerid][acTpToZ] ? ACPickInfo[pickupid][acPosZ] : ACInfo[playerid][acSetPosZ]), ACPickInfo[pickupid][acPosZ]));
  5548.             if(floatcmp(ac_dist, 15.0) == 1 && (ACInfo[playerid][acSet][8] == -1 || floatcmp(ac_dist_set, 15.0) == 1))
  5549.             {
  5550.                 #if defined DEBUG
  5551.                     printf("[Nex-AC debug] Pickupid: %d, dist: %f, dist set: %f, playerid: %d",
  5552.                     pickupid, ac_dist, ac_dist_set, playerid);
  5553.                 #endif
  5554.                 #if defined OnCheatDetected
  5555.                     ac_KickWithCode(playerid, "", 0, 6, 1);
  5556.                 #endif
  5557.                 return 0;
  5558.             }
  5559.         }
  5560.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][8] = ac_i;
  5561.         #if AC_USE_PICKUP_WEAPONS
  5562.             switch(ACPickInfo[pickupid][acType])
  5563.             {
  5564.                 case 1:
  5565.                 {
  5566.                     ac_i = ACPickInfo[pickupid][acWeapon];
  5567.                     new ac_s = ac_wSlot[ac_i];
  5568.                     if(ACInfo[playerid][acWeapon][ac_s] == ac_i ||
  5569.                     3 <= ac_s <= 5 && ACInfo[playerid][acWeapon][ac_s] > 0) ACInfo[playerid][acAmmo][ac_s] += ac_pAmmo[ac_i];
  5570.                 }
  5571.                 case 2: ACInfo[playerid][acSpecAct] = SPECIAL_ACTION_USEJETPACK;
  5572.                 case 3: ACInfo[playerid][acHealth] = 100;
  5573.                 case 4: ACInfo[playerid][acArmour] = 100;
  5574.             }
  5575.         #endif
  5576.         ACInfo[playerid][acLastPickup] = pickupid;
  5577.     #if defined Streamer_GetItemStreamerID\
  5578.         && defined IsValidDynamicPickup
  5579.         }
  5580.     #endif
  5581.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5582.         && defined ac_OnPlayerPickUpPickup
  5583.         #if defined Streamer_GetItemStreamerID\
  5584.             && defined IsValidDynamicPickup
  5585.             if(IsValidDynamicPickup(streamerid) ||
  5586.             !ACPickInfo[pickupid][acIsStatic]) return ac_OnPlayerPickUpPickup(playerid, pickupid);
  5587.         #else
  5588.             if(!ACPickInfo[pickupid][acIsStatic]) return ac_OnPlayerPickUpPickup(playerid, pickupid);
  5589.         #endif
  5590.         return 1;
  5591.     #else
  5592.         return 1;
  5593.     #endif
  5594. }
  5595.  
  5596. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5597.     #if defined _ALS_OnPlayerPickUpPickup
  5598.         #undef OnPlayerPickUpPickup
  5599.     #else
  5600.         #define _ALS_OnPlayerPickUpPickup
  5601.     #endif
  5602.     #define OnPlayerPickUpPickup ac_OnPlayerPickUpPickup
  5603.     #if defined ac_OnPlayerPickUpPickup
  5604.         forward ac_OnPlayerPickUpPickup(playerid, pickupid);
  5605.     #endif
  5606. #endif
  5607.  
  5608. #if defined _inc_y_hooks || defined _INC_y_hooks
  5609.     hook OnPlayerRequestClass(playerid, classid)
  5610. #else
  5611.     public OnPlayerRequestClass(playerid, classid)
  5612. #endif
  5613. {
  5614.     if(ACInfo[playerid][acKicked] > 0) return 0;
  5615.     if(!IsPlayerNPC(playerid))
  5616.     {
  5617.         new ac_gtc = GetTickCount();
  5618.         if(ACInfo[playerid][acACAllow][49])
  5619.         {
  5620.             if(ac_gtc < ACInfo[playerid][acCall][9] + ac_Mtfc[9][0]) ac_FloodDetect(playerid, 9);
  5621.             else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5622.             else ACInfo[playerid][acFloodCount][9] = ACInfo[playerid][acFloodCount][27] = 0;
  5623.         }
  5624.         if(ACInfo[playerid][acDead]) ACInfo[playerid][acSpawned] = false;
  5625.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][9] = ac_gtc;
  5626.         ACInfo[playerid][acSpawnPosX] = ac_ClassPos[classid][0];
  5627.         ACInfo[playerid][acSpawnPosY] = ac_ClassPos[classid][1];
  5628.         ACInfo[playerid][acSpawnPosZ] = ac_ClassPos[classid][2];
  5629.         ACInfo[playerid][acSpawnWeapon1] = ac_ClassWeapon[classid][0][0];
  5630.         ACInfo[playerid][acSpawnAmmo1] = ac_ClassWeapon[classid][0][1];
  5631.         ACInfo[playerid][acSpawnWeapon2] = ac_ClassWeapon[classid][1][0];
  5632.         ACInfo[playerid][acSpawnAmmo2] = ac_ClassWeapon[classid][1][1];
  5633.         ACInfo[playerid][acSpawnWeapon3] = ac_ClassWeapon[classid][2][0];
  5634.         ACInfo[playerid][acSpawnAmmo3] = ac_ClassWeapon[classid][2][1];
  5635.     }
  5636.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5637.         && defined ac_OnPlayerRequestClass
  5638.         return ac_OnPlayerRequestClass(playerid, classid);
  5639.     #else
  5640.         return 1;
  5641.     #endif
  5642. }
  5643.  
  5644. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5645.     #if defined _ALS_OnPlayerRequestClass
  5646.         #undef OnPlayerRequestClass
  5647.     #else
  5648.         #define _ALS_OnPlayerRequestClass
  5649.     #endif
  5650.     #define OnPlayerRequestClass ac_OnPlayerRequestClass
  5651.     #if defined ac_OnPlayerRequestClass
  5652.         forward ac_OnPlayerRequestClass(playerid, classid);
  5653.     #endif
  5654. #endif
  5655.  
  5656. #if defined _inc_y_hooks || defined _INC_y_hooks
  5657.     hook OnPlayerSelectedMenuRow(playerid, row)
  5658. #else
  5659.     public OnPlayerSelectedMenuRow(playerid, row)
  5660. #endif
  5661. {
  5662.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] > 0) return 0;
  5663.     new ac_gtc = GetTickCount();
  5664.     if(ACInfo[playerid][acACAllow][49])
  5665.     {
  5666.         if(ac_gtc < ACInfo[playerid][acCall][10] + ac_Mtfc[10][0]) ac_FloodDetect(playerid, 10);
  5667.         else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5668.         else ACInfo[playerid][acFloodCount][10] = ACInfo[playerid][acFloodCount][27] = 0;
  5669.     }
  5670.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][10] = ac_gtc;
  5671.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5672.         && defined ac_OnPlayerSelectedMenuRow
  5673.         return ac_OnPlayerSelectedMenuRow(playerid, row);
  5674.     #else
  5675.         return 1;
  5676.     #endif
  5677. }
  5678.  
  5679. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5680.     #if defined _ALS_OnPlayerSelectedMenuRow
  5681.         #undef OnPlayerSelectedMenuRow
  5682.     #else
  5683.         #define _ALS_OnPlayerSelectedMenuRow
  5684.     #endif
  5685.     #define OnPlayerSelectedMenuRow ac_OnPlayerSelectedMenuRow
  5686.     #if defined ac_OnPlayerSelectedMenuRow
  5687.         forward ac_OnPlayerSelectedMenuRow(playerid, row);
  5688.     #endif
  5689. #endif
  5690.  
  5691. #if defined _inc_y_hooks || defined _INC_y_hooks
  5692.     hook OnPlayerStateChange(playerid, newstate, oldstate)
  5693. #else
  5694.     public OnPlayerStateChange(playerid, newstate, oldstate)
  5695. #endif
  5696. {
  5697.     if(ACInfo[playerid][acKicked] > 0) return 0;
  5698.     if(!IsPlayerNPC(playerid))
  5699.     {
  5700.         new ac_i = GetTickCount(), ac_s = GetPlayerPing(playerid);
  5701.         if(ACInfo[playerid][acACAllow][49])
  5702.         {
  5703.             if(ac_i < ACInfo[playerid][acCall][11] + ac_Mtfc[11][0])
  5704.             {
  5705.                 if(newstate != PLAYER_STATE_ONFOOT || oldstate != PLAYER_STATE_SPAWNED)
  5706.                 {
  5707.                     new ac_model;
  5708.                     if(oldstate == PLAYER_STATE_DRIVER) ac_model = GetVehicleModel(ACInfo[playerid][acVeh]);
  5709.                     else if(newstate == PLAYER_STATE_DRIVER) ac_model = GetVehicleModel(GetPlayerVehicleID(playerid));
  5710.                     if(!ac_IsABoat(ac_model)) ac_FloodDetect(playerid, 11);
  5711.                 }
  5712.             }
  5713.             else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  5714.             else ACInfo[playerid][acFloodCount][11] = ACInfo[playerid][acFloodCount][27] = 0;
  5715.         }
  5716.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][11] = ac_i;
  5717.         switch(oldstate)
  5718.         {
  5719.             case PLAYER_STATE_NONE, PLAYER_STATE_WASTED:
  5720.             {
  5721.                 if(ACInfo[playerid][acACAllow][48] && !(PLAYER_STATE_SPAWNED <= newstate <= PLAYER_STATE_SPECTATING))
  5722.                 {
  5723.                     #if defined DEBUG
  5724.                         printf("[Nex-AC debug] Newstate: %d, oldstate: %d", newstate, oldstate);
  5725.                     #endif
  5726.                     ac_KickWithCode(playerid, "", 0, 48, 2);
  5727.                 }
  5728.             }
  5729.             case PLAYER_STATE_DRIVER:
  5730.             {
  5731.                 new ac_t;
  5732.                 if(ACVehInfo[ACInfo[playerid][acVeh]][acDriver] == playerid) ACVehInfo[ACInfo[playerid][acVeh]][acDriver] = INVALID_PLAYER_ID;
  5733.                 GetPlayerWeaponData(playerid, 4, ac_t, ac_t);
  5734.                 if(ac_t < ACInfo[playerid][acAmmo][4] &&
  5735.                 !(ac_t < 0 <= ACInfo[playerid][acAmmo][4])) ACInfo[playerid][acAmmo][4] = ac_t;
  5736.                 ac_t = GetVehicleModel(ACInfo[playerid][acVeh]);
  5737.                 if(1 <= ACInfo[playerid][acHealth] < 5 && ac_IsABike(ac_t)) ACInfo[playerid][acHealth] = 5;
  5738.                 new Float:ac_x, Float:ac_y, Float:ac_z;
  5739.                 GetPlayerPos(playerid, ac_x, ac_y, ac_z);
  5740.                 if(ACInfo[playerid][acACAllow][2] && newstate == PLAYER_STATE_ONFOOT &&
  5741.                 (floatcmp(ACInfo[playerid][acPosZ], -95.0) == 1 || floatcmp(VectorSize(floatsub(ac_x, ACInfo[playerid][acPosX]), floatsub(ac_y, ACInfo[playerid][acPosY]), 0.0), 80.0) >= 0) &&
  5742.                 ac_i > ACInfo[playerid][acGtc][11] + ac_s)
  5743.                 {
  5744.                     if(!ac_IsAnAircraft(ac_t)) ac_z = ACInfo[playerid][acPosZ];
  5745.                     if(floatcmp((ac_x = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ac_z)), 50.0) >= 0)
  5746.                     {
  5747.                         #if defined DEBUG
  5748.                             printf("[Nex-AC debug] Veh model: %d, dist: %f", ac_t, ac_x);
  5749.                         #endif
  5750.                         ac_KickWithCode(playerid, "", 0, 2, 4);
  5751.                     }
  5752.                 }
  5753.                 GetPlayerVelocity(playerid, ac_x, ac_y, ac_z);
  5754.                 ACInfo[playerid][acSpeed] = ac_GetSpeed(ac_x, ac_y, ac_z);
  5755.                 if(ACInfo[playerid][acSet][8] == 3) ACInfo[playerid][acSet][8] = -1;
  5756.                 ACInfo[playerid][acGtc][10] = ac_i + 800;
  5757.             }
  5758.             case PLAYER_STATE_PASSENGER:
  5759.             {
  5760.                 new Float:ac_x, Float:ac_y, Float:ac_z;
  5761.                 GetPlayerPos(playerid, ac_x, ac_y, ac_z);
  5762.                 if(ACInfo[playerid][acACAllow][2] && newstate == PLAYER_STATE_ONFOOT &&
  5763.                 (floatcmp(ACInfo[playerid][acPosZ], -95.0) == 1 || floatcmp(VectorSize(floatsub(ac_x, ACInfo[playerid][acPosX]), floatsub(ac_y, ACInfo[playerid][acPosY]), 0.0), 80.0) >= 0) &&
  5764.                 ac_i > ACInfo[playerid][acGtc][11] + ac_s)
  5765.                 {
  5766.                     ac_s = ACVehInfo[ACInfo[playerid][acVeh]][acDriver];
  5767.                     if(ac_s == INVALID_PLAYER_ID || ac_i < ACInfo[ac_s][acUpdateTime] + 2000)
  5768.                     {
  5769.                         new ac_model = GetVehicleModel(ACInfo[playerid][acVeh]);
  5770.                         ac_x = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  5771.                         if(!(ac_model == 449 || 537 <= ac_model <= 538 || 569 <= ac_model <= 570) && floatcmp(ac_x, 50.0) >= 0)
  5772.                         {
  5773.                             #if defined DEBUG
  5774.                                 if(ac_s == INVALID_PLAYER_ID) printf("[Nex-AC debug] Veh model: %d, dist: %f", ac_model, ac_x);
  5775.                                 else printf("[Nex-AC debug] Veh model: %d, driver AFK time: %d, dist: %f", ac_model, ac_i - ACInfo[ac_s][acUpdateTime], ac_x);
  5776.                             #endif
  5777.                             ac_KickWithCode(playerid, "", 0, 2, 5);
  5778.                         }
  5779.                     }
  5780.                 }
  5781.                 GetPlayerVelocity(playerid, ac_x, ac_y, ac_z);
  5782.                 ACInfo[playerid][acSpeed] = ac_GetSpeed(ac_x, ac_y, ac_z);
  5783.                 ACInfo[playerid][acGtc][10] = ac_i + 800;
  5784.             }
  5785.         }
  5786.         switch(newstate)
  5787.         {
  5788.             case PLAYER_STATE_ONFOOT:
  5789.             {
  5790.                 ACInfo[playerid][acSet][11] = -1;
  5791.                 if(PLAYER_STATE_DRIVER <= oldstate <= PLAYER_STATE_PASSENGER) GetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  5792.             }
  5793.             case PLAYER_STATE_DRIVER, PLAYER_STATE_PASSENGER:
  5794.             {
  5795.                 ACInfo[playerid][acSet][11] = -1;
  5796.                 ACInfo[playerid][acCheatCount][3] =
  5797.                 ACInfo[playerid][acCheatCount][4] = 0;
  5798.                 new ac_vehid = GetPlayerVehicleID(playerid);
  5799.                 ac_s = GetVehicleModel(ac_vehid);
  5800.                 if(ACInfo[playerid][acSet][9] == -1)
  5801.                 {
  5802.                     if(ACInfo[playerid][acACAllow][4])
  5803.                     {
  5804.                         if(ACInfo[playerid][acEnterVeh] != ac_vehid || ac_i < ACInfo[playerid][acEnterVehTime] + 300)
  5805.                         {
  5806.                             #if defined DEBUG
  5807.                                 printf("[Nex-AC debug] Entered veh: %d, veh: %d, veh model: %d, enter time: %d",
  5808.                                 ACInfo[playerid][acEnterVeh], ac_vehid, ac_s, ac_i - ACInfo[playerid][acEnterVehTime]);
  5809.                             #endif
  5810.                             ac_KickWithCode(playerid, "", 0, 4, 1);
  5811.                         }
  5812.                         else
  5813.                         {
  5814.                             new Float:ac_dist = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  5815.                             if(newstate == PLAYER_STATE_DRIVER)
  5816.                             {
  5817.                                 if(floatcmp(ac_dist, 25.0) == 1 || ac_s != 577 && ac_s != 592 && floatcmp(ac_dist, 15.0) == 1)
  5818.                                 {
  5819.                                     #if defined DEBUG
  5820.                                         printf("[Nex-AC debug] Veh model: %d, dist: %f", ac_s, ac_dist);
  5821.                                     #endif
  5822.                                     ac_KickWithCode(playerid, "", 0, 4, 3);
  5823.                                 }
  5824.                             }
  5825.                             else if(!(ac_s == 449 || 537 <= ac_s <= 538 || 569 <= ac_s <= 570) &&
  5826.                             (floatcmp(ac_dist, 80.0) == 1 || ac_i >= ACInfo[playerid][acUpdateTime] + 1500 && floatcmp(ac_dist, 30.0) == 1))
  5827.                             {
  5828.                                 #if defined DEBUG
  5829.                                     printf("[Nex-AC debug] Veh model: %d, AFK time: %d, dist: %f", ac_s, ac_i - ACInfo[playerid][acUpdateTime], ac_dist);
  5830.                                 #endif
  5831.                                 ac_KickWithCode(playerid, "", 0, 4, 4);
  5832.                             }
  5833.                         }
  5834.                     }
  5835.                     if(newstate == PLAYER_STATE_DRIVER && ACInfo[playerid][acKicked] < 1)
  5836.                     {
  5837.                         ACVehInfo[ac_vehid][acDriver] = playerid;
  5838.                         GetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
  5839.                         ACInfo[playerid][acSetVehHealth] = -1.0;
  5840.                         ACInfo[playerid][acCheatCount][11] = 0;
  5841.                         ACInfo[playerid][acVehDmgRes] = false;
  5842.                     }
  5843.                     ACInfo[playerid][acEnterVeh] = 0;
  5844.                 }
  5845.                 if(ACInfo[playerid][acACAllow][44])
  5846.                 {
  5847.                     ac_i = GetPlayerVehicleSeat(playerid);
  5848.                     if(ac_s < 400)
  5849.                     {
  5850.                         #if defined DEBUG
  5851.                             printf("[Nex-AC debug] Veh model: %d, seatid: %d", ac_s, ac_i);
  5852.                         #endif
  5853.                         ac_KickWithCode(playerid, "", 0, 44, 2);
  5854.                     }
  5855.                     else if(ACInfo[playerid][acSet][9] == -1)
  5856.                     {
  5857.                         new ac_maxseats = ac_GetMaxPassengers(ac_s);
  5858.                         if(newstate == PLAYER_STATE_DRIVER)
  5859.                         {
  5860.                             if(ac_i != 0 || ac_maxseats == 15)
  5861.                             {
  5862.                                 #if defined DEBUG
  5863.                                     printf("[Nex-AC debug] Veh model: %d, seatid: %d", ac_s, ac_i);
  5864.                                 #endif
  5865.                                 ac_KickWithCode(playerid, "", 0, 44, 3);
  5866.                             }
  5867.                         }
  5868.                         else if(ac_i < 1 || ac_maxseats == 15 || ac_i > ac_maxseats && ac_s != 431 && ac_s != 437 && ac_s != 570)
  5869.                         {
  5870.                             #if defined DEBUG
  5871.                                 printf("[Nex-AC debug] Veh model: %d, max seats: %d, seatid: %d", ac_s, ac_maxseats, ac_i);
  5872.                             #endif
  5873.                             ac_KickWithCode(playerid, "", 0, 44, 4);
  5874.                         }
  5875.                     }
  5876.                 }
  5877.             }
  5878.             case PLAYER_STATE_SPAWNED:
  5879.             {
  5880.                 ACInfo[playerid][acPosX] = ACInfo[playerid][acSpawnPosX];
  5881.                 ACInfo[playerid][acPosY] = ACInfo[playerid][acSpawnPosY];
  5882.                 ACInfo[playerid][acPosZ] = ACInfo[playerid][acSpawnPosZ];
  5883.             }
  5884.             case PLAYER_STATE_SPECTATING:
  5885.             {
  5886.                 if(ACInfo[playerid][acACAllow][21] && !ACInfo[playerid][acSpec] &&
  5887.                 ACInfo[playerid][acSet][6] == -1) ac_KickWithCode(playerid, "", 0, 21);
  5888.                 if(ACInfo[playerid][acKicked] < 1)
  5889.                 {
  5890.                     ACInfo[playerid][acHealth] = 100;
  5891.                     ACInfo[playerid][acSet][6] = -1;
  5892.                     ACInfo[playerid][acSpec] = true;
  5893.                 }
  5894.             }
  5895.         }
  5896.     }
  5897.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  5898.         && defined ac_OnPlayerStateChange
  5899.         return ac_OnPlayerStateChange(playerid, newstate, oldstate);
  5900.     #else
  5901.         return 1;
  5902.     #endif
  5903. }
  5904.  
  5905. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  5906.     #if defined _ALS_OnPlayerStateChange
  5907.         #undef OnPlayerStateChange
  5908.     #else
  5909.         #define _ALS_OnPlayerStateChange
  5910.     #endif
  5911.     #define OnPlayerStateChange ac_OnPlayerStateChange
  5912.     #if defined ac_OnPlayerStateChange
  5913.         forward ac_OnPlayerStateChange(playerid, newstate, oldstate);
  5914.     #endif
  5915. #endif
  5916.  
  5917. #if defined _inc_y_hooks || defined _INC_y_hooks
  5918.     hook OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  5919. #else
  5920.     public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  5921. #endif
  5922. {
  5923.     if(ACInfo[playerid][acKicked] > 0 || ACInfo[playerid][acDead]) return 0;
  5924.     if(ACInfo[playerid][acACAllow][22] && !ac_LagCompMode)
  5925.     {
  5926.         #if defined OnCheatDetected
  5927.             ac_KickWithCode(playerid, "", 0, 22);
  5928.         #endif
  5929.         return 0;
  5930.     }
  5931.     if(ACInfo[playerid][acACAllow][47] &&
  5932.     (!(BULLET_HIT_TYPE_NONE <= hittype <= BULLET_HIT_TYPE_PLAYER_OBJECT) ||
  5933.     hittype == BULLET_HIT_TYPE_PLAYER && !(0 <= hitid < MAX_PLAYERS) ||
  5934.     hittype == BULLET_HIT_TYPE_VEHICLE && !(1 <= hitid < MAX_VEHICLES) ||
  5935.     hittype == BULLET_HIT_TYPE_OBJECT && !(1 <= hitid < MAX_OBJECTS) ||
  5936.     hittype == BULLET_HIT_TYPE_PLAYER_OBJECT && !(1 <= hitid < MAX_OBJECTS) ||
  5937.     weaponid != 38 && !(22 <= weaponid <= 34)))
  5938.     {
  5939.         #if defined DEBUG
  5940.             printf("[Nex-AC debug] Hittype: %d, hitid: %d, weaponid: %d", hittype, hitid, weaponid);
  5941.         #endif
  5942.         return ac_KickWithCode(playerid, "", 0, 47, 1);
  5943.     }
  5944.     new Float:ac_oX, Float:ac_oY, Float:ac_oZ, Float:ac_hX, Float:ac_hY, Float:ac_hZ;
  5945.     GetPlayerLastShotVectors(playerid, ac_oX, ac_oY, ac_oZ, ac_hX, ac_hY, ac_hZ);
  5946.     if(ACInfo[playerid][acACAllow][34])
  5947.     {
  5948.         new Float:ac_dist = GetPlayerDistanceFromPoint(playerid, ac_oX, ac_oY, ac_oZ);
  5949.         if(floatcmp(ac_dist, 50.0) == 1 || floatcmp(ac_dist, 15.0) == 1 && !IsPlayerInAnyVehicle(playerid) &&
  5950.         GetPlayerSurfingVehicleID(playerid) == INVALID_VEHICLE_ID && GetPlayerSurfingObjectID(playerid) == INVALID_OBJECT_ID)
  5951.         {
  5952.             if(++ACInfo[playerid][acCheatCount][5] > AC_MAX_AFK_GHOST_WARNINGS)
  5953.             {
  5954.                 #undef AC_MAX_AFK_GHOST_WARNINGS
  5955.                 #if defined DEBUG
  5956.                     printf("[Nex-AC debug] Dist: %f", ac_dist);
  5957.                 #endif
  5958.                 #if defined OnCheatDetected
  5959.                     ac_KickWithCode(playerid, "", 0, 34);
  5960.                     if(ACInfo[playerid][acKicked] > 0) return 0;
  5961.                     ACInfo[playerid][acCheatCount][5] = 0;
  5962.                 #else
  5963.                     return ac_KickWithCode(playerid, "", 0, 34);
  5964.                 #endif
  5965.             }
  5966.             #if defined OnCheatWarning
  5967.                 else OnCheatWarning(playerid, "", 0, 34, 0, ACInfo[playerid][acCheatCount][5]);
  5968.             #endif
  5969.         }
  5970.         else ACInfo[playerid][acCheatCount][5] = 0;
  5971.     }
  5972.     new ac_gtc = GetTickCount(), ac_gpp = GetPlayerPing(playerid);
  5973.     if(ACInfo[playerid][acACAllow][29])
  5974.     {
  5975.         new Float:ac_pX, Float:ac_pY, Float:ac_pZ;
  5976.         GetPlayerPos(playerid, ac_pX, ac_pY, ac_pZ);
  5977.         if(hittype > BULLET_HIT_TYPE_NONE &&
  5978.         (floatcmp(fX, 0.0) == 0 && floatcmp(fY, 0.0) == 0 && floatcmp(fZ, 0.0) == 0 ||
  5979.         floatcmp(ac_oX, ac_pX) == 0 || floatcmp(ac_oY, ac_pY) == 0 || floatcmp(floatabs(floatsub(ac_oZ, ac_pZ)), 0.01) == -1))
  5980.         {
  5981.             if(++ACInfo[playerid][acCheatCount][13] > AC_MAX_SILENT_AIM_WARNINGS)
  5982.             {
  5983.                 #undef AC_MAX_SILENT_AIM_WARNINGS
  5984.                 #if defined DEBUG
  5985.                     printf("[Nex-AC debug] Hittype: %d, weaponid: %d, pZ: %f, oZ: %f, fX, fY, fZ: %f, %f, %f",
  5986.                     hittype, weaponid, ac_pZ, ac_oZ, fX, fY, fZ);
  5987.                 #endif
  5988.                 #if defined OnCheatDetected
  5989.                     ac_KickWithCode(playerid, "", 0, 29, 1);
  5990.                     if(ACInfo[playerid][acKicked] > 0) return 0;
  5991.                     ACInfo[playerid][acCheatCount][13] = 0;
  5992.                 #else
  5993.                     return ac_KickWithCode(playerid, "", 0, 29, 1);
  5994.                 #endif
  5995.             }
  5996.             #if defined OnCheatWarning
  5997.                 else OnCheatWarning(playerid, "", 0, 29, 1, ACInfo[playerid][acCheatCount][13]);
  5998.             #endif
  5999.         }
  6000.         else
  6001.         {
  6002.             ACInfo[playerid][acCheatCount][13] = 0;
  6003.             if(hittype == BULLET_HIT_TYPE_PLAYER && hitid != INVALID_PLAYER_ID &&
  6004.             !ACInfo[hitid][acDead] && ac_gtc > ACInfo[hitid][acSetPosTime] + ac_gpp &&
  6005.             ac_gtc < ACInfo[hitid][acUpdateTime] + 1500)
  6006.             {
  6007.                 new Float:ac_dist = GetPlayerDistanceFromPoint(hitid, ac_hX, ac_hY, ac_hZ);
  6008.                 if(floatcmp(ac_dist, 50.0) == 1 || floatcmp(ac_dist, 20.0) == 1 && !IsPlayerInAnyVehicle(hitid) &&
  6009.                 GetPlayerSurfingVehicleID(hitid) == INVALID_VEHICLE_ID && GetPlayerSurfingObjectID(hitid) == INVALID_OBJECT_ID)
  6010.                 {
  6011.                     if(++ACInfo[playerid][acCheatCount][6] > AC_MAX_PRO_AIM_WARNINGS)
  6012.                     {
  6013.                         #undef AC_MAX_PRO_AIM_WARNINGS
  6014.                         #if defined DEBUG
  6015.                             printf("[Nex-AC debug] Dist: %f", ac_dist);
  6016.                         #endif
  6017.                         #if defined OnCheatDetected
  6018.                             ac_KickWithCode(playerid, "", 0, 29, 2);
  6019.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  6020.                             ACInfo[playerid][acCheatCount][6] = 0;
  6021.                         #else
  6022.                             return ac_KickWithCode(playerid, "", 0, 29, 2);
  6023.                         #endif
  6024.                     }
  6025.                     #if defined OnCheatWarning
  6026.                         else OnCheatWarning(playerid, "", 0, 29, 2, ACInfo[playerid][acCheatCount][6]);
  6027.                     #endif
  6028.                 }
  6029.                 else ACInfo[playerid][acCheatCount][6] = 0;
  6030.             }
  6031.         }
  6032.     }
  6033.     new ac_i, ac_t, bool:ac_ur, bool:ac_ur2;
  6034.     switch(hittype)
  6035.     {
  6036.         case BULLET_HIT_TYPE_PLAYER:
  6037.         {
  6038.             if(hitid != INVALID_PLAYER_ID && !IsPlayerNPC(hitid) &&
  6039.             ACInfo[hitid][acACAllow][19] && ACInfo[hitid][acUnFrozen] &&
  6040.             !ACInfo[hitid][acDead] && ac_gtc > ACInfo[hitid][acSetPosTime] + ac_gpp &&
  6041.             IsPlayerInRangeOfPoint(hitid, ac_wRange[weaponid - 22], ac_oX, ac_oY, ac_oZ) &&
  6042.             !(SPECIAL_ACTION_ENTER_VEHICLE <= GetPlayerSpecialAction(hitid) <= SPECIAL_ACTION_EXIT_VEHICLE))
  6043.             {
  6044.                 ac_t = GetPlayerTeam(playerid);
  6045.                 if(ac_t == NO_TEAM || ac_t != GetPlayerTeam(hitid))
  6046.                 {
  6047.                     ac_i = GetPlayerInterior(hitid);
  6048.                     #if AC_USE_RESTAURANTS
  6049.                         if(!ac_InRestaurant(hitid, ac_i))
  6050.                         {
  6051.                     #endif
  6052.                         #if AC_USE_AMMUNATIONS
  6053.                             if(!ac_InAmmuNation(hitid, ac_i))
  6054.                             {
  6055.                         #endif
  6056.                             #if AC_USE_CASINOS
  6057.                                 if(!ac_InCasino(hitid, ac_i))
  6058.                                 {
  6059.                             #endif
  6060.                                 ac_ur = true;
  6061.                             #if AC_USE_CASINOS
  6062.                                 }
  6063.                             #endif
  6064.                         #if AC_USE_AMMUNATIONS
  6065.                             }
  6066.                         #endif
  6067.                     #if AC_USE_RESTAURANTS
  6068.                         }
  6069.                     #endif
  6070.                 }
  6071.             }
  6072.         }
  6073.         case BULLET_HIT_TYPE_VEHICLE:
  6074.         {
  6075.             if(hitid != INVALID_VEHICLE_ID)
  6076.             {
  6077.                 ac_i = ACVehInfo[hitid][acDriver];
  6078.                 if(ac_i != INVALID_PLAYER_ID && ACInfo[ac_i][acACAllow][20] && ACInfo[ac_i][acUnFrozen] &&
  6079.                 ac_gtc > ACInfo[ac_i][acSetPosTime] + ac_gpp && floatcmp(ACVehInfo[hitid][acHealth], 250.0) >= 0)
  6080.                 {
  6081.                     ac_t = GetPlayerTeam(playerid);
  6082.                     if(!ac_VehFriendlyFire || ac_t == NO_TEAM || ac_t != GetPlayerTeam(ac_i))
  6083.                     {
  6084.                         ac_t = GetVehicleModel(hitid);
  6085.                         new Float:ac_wX, Float:ac_wY, Float:ac_wZ;
  6086.                         GetVehicleModelInfo(ac_t, VEHICLE_MODEL_INFO_WHEELSFRONT, ac_hX, ac_hY, ac_hZ);
  6087.                         GetVehicleModelInfo(ac_t, VEHICLE_MODEL_INFO_WHEELSREAR, ac_oX, ac_oY, ac_oZ);
  6088.                         GetVehicleModelInfo(ac_t, VEHICLE_MODEL_INFO_WHEELSMID, ac_wX, ac_wY, ac_wZ);
  6089.                         if(floatcmp(VectorSize(floatsub(ac_hX, fX), floatsub(ac_hY, fY), floatsub(ac_hZ, fZ)), 1.2) == 1 &&
  6090.                         floatcmp(VectorSize(floatsub(-ac_hX, fX), floatsub(ac_hY, fY), floatsub(ac_hZ, fZ)), 1.2) == 1 &&
  6091.                         floatcmp(VectorSize(floatsub(ac_oX, fX), floatsub(ac_oY, fY), floatsub(ac_oZ, fZ)), 1.2) == 1 &&
  6092.                         floatcmp(VectorSize(floatsub(-ac_oX, fX), floatsub(ac_oY, fY), floatsub(ac_oZ, fZ)), 1.2) == 1 &&
  6093.                         (!ac_wX && !ac_wY && !ac_wZ || floatcmp(VectorSize(floatsub(ac_wX, fX), floatsub(ac_wY, fY), floatsub(ac_wZ, fZ)), 1.2) == 1 &&
  6094.                         floatcmp(VectorSize(floatsub(-ac_wX, fX), floatsub(ac_wY, fY), floatsub(ac_wZ, fZ)), 1.2) == 1)) ac_ur2 = true;
  6095.                     }
  6096.                 }
  6097.             }
  6098.         }
  6099.     }
  6100.     if((ac_t = GetPlayerState(playerid)) != PLAYER_STATE_DRIVER)
  6101.     {
  6102.         new ac_s = GetPlayerWeapon(playerid);
  6103.         if(ACInfo[playerid][acACAllow][47] && ac_t != PLAYER_STATE_PASSENGER)
  6104.         {
  6105.             if(ac_s != weaponid)
  6106.             {
  6107.                 if(++ACInfo[playerid][acCheatCount][18] > AC_MAX_FAKE_WEAPON_WARNINGS)
  6108.                 {
  6109.                     #undef AC_MAX_FAKE_WEAPON_WARNINGS
  6110.                     #if defined DEBUG
  6111.                         printf("[Nex-AC debug] Armed weapon: %d, weaponid: %d, state: %d", ac_s, weaponid, ac_t);
  6112.                     #endif
  6113.                     ac_KickWithCode(playerid, "", 0, 47, 2);
  6114.                     #if defined OnCheatDetected
  6115.                         ACInfo[playerid][acCheatCount][18] = 0;
  6116.                     #endif
  6117.                 }
  6118.                 #if defined OnCheatWarning
  6119.                     else OnCheatWarning(playerid, "", 0, 47, 2, ACInfo[playerid][acCheatCount][18]);
  6120.                 #endif
  6121.                 return 0;
  6122.             }
  6123.             else ACInfo[playerid][acCheatCount][18] = 0;
  6124.         }
  6125.         ac_s = ac_wSlot[weaponid];
  6126.         if(ACInfo[playerid][acACAllow][26])
  6127.         {
  6128.             ac_i = ac_gtc - ACInfo[playerid][acShotTime];
  6129.             if(ACInfo[playerid][acLastShot] == weaponid)
  6130.             {
  6131.                 if(weaponid != 38 && ac_t != PLAYER_STATE_PASSENGER)
  6132.                 {
  6133.                     if(ac_gtc < ACInfo[playerid][acReloadTime] + 110)
  6134.                     {
  6135.                         #if defined DEBUG
  6136.                             printf("[Nex-AC debug] Weaponid: %d, Reload time: %d, state: %d",
  6137.                             weaponid, ac_gtc - ACInfo[playerid][acReloadTime], ac_t);
  6138.                         #endif
  6139.                         #if defined OnCheatDetected
  6140.                             ac_KickWithCode(playerid, "", 0, 26, 4);
  6141.                             if(ACInfo[playerid][acKicked] > 0) return 0;
  6142.                             ACInfo[playerid][acReloadTime] = 0;
  6143.                         #else
  6144.                             return ac_KickWithCode(playerid, "", 0, 26, 4);
  6145.                         #endif
  6146.                     }
  6147.                     else if(ac_i < 30 || ac_i < 50 && weaponid != 32 && !(28 <= weaponid <= 29))
  6148.                     {
  6149.                         if(++ACInfo[playerid][acCheatCount][8] > AC_MAX_RAPID_FIRE_WARNINGS)
  6150.                         {
  6151.                             #undef AC_MAX_RAPID_FIRE_WARNINGS
  6152.                             #if defined DEBUG
  6153.                                 printf("[Nex-AC debug] Fire rate: %d, weaponid: %d", ac_i, weaponid);
  6154.                             #endif
  6155.                             #if defined OnCheatDetected
  6156.                                 ac_KickWithCode(playerid, "", 0, 26, 1);
  6157.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  6158.                                 ACInfo[playerid][acCheatCount][8] = 0;
  6159.                             #else
  6160.                                 return ac_KickWithCode(playerid, "", 0, 26, 1);
  6161.                             #endif
  6162.                         }
  6163.                         #if defined OnCheatWarning
  6164.                             else OnCheatWarning(playerid, "", 0, 26, 1, ACInfo[playerid][acCheatCount][8]);
  6165.                         #endif
  6166.                     }
  6167.                     else ACInfo[playerid][acCheatCount][8] = 0;
  6168.                     if(weaponid == 25 && ac_i < 600 || (weaponid == 24 || 33 <= weaponid <= 34) && ac_i < 380)
  6169.                     {
  6170.                         if(++ACInfo[playerid][acCheatCount][14] > AC_MAX_AUTO_C_WARNINGS)
  6171.                         {
  6172.                             #undef AC_MAX_AUTO_C_WARNINGS
  6173.                             #if defined DEBUG
  6174.                                 printf("[Nex-AC debug] Fire rate: %d, weaponid: %d", ac_i, weaponid);
  6175.                             #endif
  6176.                             #if defined OnCheatDetected
  6177.                                 ac_KickWithCode(playerid, "", 0, 26, 2);
  6178.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  6179.                                 ACInfo[playerid][acCheatCount][14] = 0;
  6180.                             #else
  6181.                                 return ac_KickWithCode(playerid, "", 0, 26, 2);
  6182.                             #endif
  6183.                         }
  6184.                         #if defined OnCheatWarning
  6185.                             else OnCheatWarning(playerid, "", 0, 26, 2, ACInfo[playerid][acCheatCount][14]);
  6186.                         #endif
  6187.                     }
  6188.                 }
  6189.             }
  6190.             else if(ac_i < 30)
  6191.             {
  6192.                 #if defined DEBUG
  6193.                     printf("[Nex-AC debug] Fire rate: %d, weaponid: %d, last weapon: %d",
  6194.                     ac_i, weaponid, ACInfo[playerid][acLastShot]);
  6195.                 #endif
  6196.                 #if defined OnCheatDetected
  6197.                     ac_KickWithCode(playerid, "", 0, 26, 3);
  6198.                     if(ACInfo[playerid][acKicked] > 0) return 0;
  6199.                 #else
  6200.                     return ac_KickWithCode(playerid, "", 0, 26, 3);
  6201.                 #endif
  6202.             }
  6203.             if(GetPlayerWeaponState(playerid) == WEAPONSTATE_LAST_BULLET) ACInfo[playerid][acReloadTime] = ac_gtc;
  6204.         }
  6205.         if(ACInfo[playerid][acACAllow][17] && ac_t != PLAYER_STATE_PASSENGER &&
  6206.         ACInfo[playerid][acGiveAmmo][ac_s] == -65535 && ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp)
  6207.         {
  6208.             ac_t = GetPlayerAmmo(playerid);
  6209.             if(ACInfo[playerid][acAmmo][ac_s] == 0)
  6210.             {
  6211.                 #if defined DEBUG
  6212.                     printf("[Nex-AC debug] Weaponid: %d, AC ammo: %d, ammo: %d", weaponid, ACInfo[playerid][acAmmo][ac_s], ac_t);
  6213.                 #endif
  6214.                 #if defined OnCheatDetected
  6215.                     ac_KickWithCode(playerid, "", 0, 17, 1);
  6216.                     if(ACInfo[playerid][acKicked] > 0) return 0;
  6217.                     ACInfo[playerid][acAmmo][ac_s] = ac_t;
  6218.                 #else
  6219.                     return ac_KickWithCode(playerid, "", 0, 17, 1);
  6220.                 #endif
  6221.             }
  6222.             if(ACInfo[playerid][acAmmo][ac_s] < ac_t)
  6223.             {
  6224.                 switch(weaponid)
  6225.                 {
  6226.                     case 38:
  6227.                     {
  6228.                         if(++ACInfo[playerid][acCheatCount][7] > 8)
  6229.                         {
  6230.                             #if defined DEBUG
  6231.                                 printf("[Nex-AC debug] Weaponid: %d, AC ammo: %d, ammo: %d, acCheatCount[7]: %d",
  6232.                                 weaponid, ACInfo[playerid][acAmmo][ac_s], ac_t, ACInfo[playerid][acCheatCount][7]);
  6233.                             #endif
  6234.                             #if defined OnCheatDetected
  6235.                                 ac_KickWithCode(playerid, "", 0, 17, 2);
  6236.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  6237.                                 ACInfo[playerid][acCheatCount][7] = 0;
  6238.                                 ACInfo[playerid][acAmmo][ac_s] = ac_t;
  6239.                             #else
  6240.                                 return ac_KickWithCode(playerid, "", 0, 17, 2);
  6241.                             #endif
  6242.                         }
  6243.                         #if defined OnCheatWarning
  6244.                             else OnCheatWarning(playerid, "", 0, 17, 2, ACInfo[playerid][acCheatCount][7]);
  6245.                         #endif
  6246.                     }
  6247.                     default:
  6248.                     {
  6249.                         if(ac_t - ACInfo[playerid][acAmmo][ac_s] > 5)
  6250.                         {
  6251.                             #if defined DEBUG
  6252.                                 printf("[Nex-AC debug] Weaponid: %d, AC ammo: %d, ammo: %d",
  6253.                                 weaponid, ACInfo[playerid][acAmmo][ac_s], ac_t);
  6254.                             #endif
  6255.                             #if defined OnCheatDetected
  6256.                                 ac_KickWithCode(playerid, "", 0, 17, 3);
  6257.                                 if(ACInfo[playerid][acKicked] > 0) return 0;
  6258.                                 ACInfo[playerid][acCheatCount][7] = 0;
  6259.                                 ACInfo[playerid][acAmmo][ac_s] = ac_t;
  6260.                             #else
  6261.                                 return ac_KickWithCode(playerid, "", 0, 17, 3);
  6262.                             #endif
  6263.                         }
  6264.                     }
  6265.                 }
  6266.             }
  6267.             else ACInfo[playerid][acCheatCount][7] = 0;
  6268.         }
  6269.         if(ACInfo[playerid][acAmmo][ac_s] != 0)
  6270.         {
  6271.             ACInfo[playerid][acAmmo][ac_s]--;
  6272.             if(ACInfo[playerid][acAmmo][ac_s] == 0 &&
  6273.             ACInfo[playerid][acSet][3] == weaponid) ACInfo[playerid][acSet][3] = ACInfo[playerid][acSetWeapon][ac_s] = -1;
  6274.         }
  6275.         if(ACInfo[playerid][acAmmo][ac_s] < -32768) ACInfo[playerid][acAmmo][ac_s] += 65536;
  6276.     }
  6277.     ACInfo[playerid][acLastShot] = weaponid;
  6278.     ACInfo[playerid][acShotTime] = ac_gtc;
  6279.     ac_i = 1;
  6280.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6281.         && defined ac_OnPlayerWeaponShot
  6282.         ac_i = ac_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, fX, fY, fZ);
  6283.     #endif
  6284.     if(ac_i)
  6285.     {
  6286.         if(ac_ur)
  6287.         {
  6288.             if(ACInfo[hitid][acArmour] > 0) ACInfo[hitid][acDmgRes] = 2;
  6289.             else ACInfo[hitid][acDmgRes] = 1;
  6290.             ACInfo[hitid][acGtc][14] = ac_gtc + 165;
  6291.         }
  6292.         if(ac_ur2)
  6293.         {
  6294.             ACInfo[ACVehInfo[hitid][acDriver]][acVehDmgRes] = true;
  6295.             ACInfo[ACVehInfo[hitid][acDriver]][acGtc][16] = ac_gtc + 165;
  6296.         }
  6297.     }
  6298.     return ac_i;
  6299. }
  6300.  
  6301. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6302.     #if defined _ALS_OnPlayerWeaponShot
  6303.         #undef OnPlayerWeaponShot
  6304.     #else
  6305.         #define _ALS_OnPlayerWeaponShot
  6306.     #endif
  6307.     #define OnPlayerWeaponShot ac_OnPlayerWeaponShot
  6308.     #if defined ac_OnPlayerWeaponShot
  6309.         forward ac_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);
  6310.     #endif
  6311. #endif
  6312.  
  6313. #if defined _inc_y_hooks || defined _INC_y_hooks
  6314.     hook OnVehicleMod(playerid, vehicleid, componentid)
  6315. #else
  6316.     public OnVehicleMod(playerid, vehicleid, componentid)
  6317. #endif
  6318. {
  6319.     if(ACInfo[playerid][acKicked] > 0) return 0;
  6320.     new ac_i = GetTickCount();
  6321.     if(ACInfo[playerid][acACAllow][49])
  6322.     {
  6323.         if(ac_i < ACInfo[playerid][acCall][12] + ac_Mtfc[12][0]) return ac_FloodDetect(playerid, 12);
  6324.         if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6325.         else ACInfo[playerid][acFloodCount][12] = ACInfo[playerid][acFloodCount][27] = 0;
  6326.     }
  6327.     if(ACInfo[playerid][acACAllow][23] && !ACInfo[playerid][acModShop])
  6328.     {
  6329.         #if defined OnCheatDetected
  6330.             ac_KickWithCode(playerid, "", 0, 23, 2);
  6331.             if(ACInfo[playerid][acKicked] > 0) return 0;
  6332.         #else
  6333.             return ac_KickWithCode(playerid, "", 0, 23, 2);
  6334.         #endif
  6335.     }
  6336.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][12] = ac_i;
  6337.     ACInfo[playerid][acGtc][17] = ac_i + 3250;
  6338.     if(ACInfo[playerid][acACAllow][43] && !ac_IsCompatible((ac_i = GetVehicleModel(vehicleid)), componentid))
  6339.     {
  6340.         #if defined DEBUG
  6341.             printf("[Nex-AC debug] Veh model: %d, componentid: %d", ac_i, componentid);
  6342.         #endif
  6343.         return ac_KickWithCode(playerid, "", 0, 43, 1);
  6344.     }
  6345.     #if AC_USE_TUNING_GARAGES
  6346.         ac_i = componentid - 1000;
  6347.         if(ACInfo[playerid][acSet][12] != -1) ACInfo[playerid][acSet][12] += ac_cPrice[ac_i];
  6348.         else ACInfo[playerid][acSet][12] = ac_cPrice[ac_i];
  6349.         ACInfo[playerid][acCheatCount][12] = 0;
  6350.     #endif
  6351.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6352.         && defined ac_OnVehicleMod
  6353.         return ac_OnVehicleMod(playerid, vehicleid, componentid);
  6354.     #else
  6355.         return 1;
  6356.     #endif
  6357. }
  6358.  
  6359. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6360.     #if defined _ALS_OnVehicleMod
  6361.         #undef OnVehicleMod
  6362.     #else
  6363.         #define _ALS_OnVehicleMod
  6364.     #endif
  6365.     #define OnVehicleMod ac_OnVehicleMod
  6366.     #if defined ac_OnVehicleMod
  6367.         forward ac_OnVehicleMod(playerid, vehicleid, componentid);
  6368.     #endif
  6369. #endif
  6370.  
  6371. #if defined _inc_y_hooks || defined _INC_y_hooks
  6372.     hook OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  6373. #else
  6374.     public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  6375. #endif
  6376. {
  6377.     if(ACInfo[playerid][acKicked] > 0) return 0;
  6378.     new ac_gtc = GetTickCount();
  6379.     if(ACInfo[playerid][acACAllow][49])
  6380.     {
  6381.         if(ac_gtc < ACInfo[playerid][acCall][13] + ac_Mtfc[13][0]) ac_FloodDetect(playerid, 13);
  6382.         else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6383.         else ACInfo[playerid][acFloodCount][13] = ACInfo[playerid][acFloodCount][27] = 0;
  6384.     }
  6385.     if(ACInfo[playerid][acACAllow][43] && !(0 <= paintjobid <= 2) && paintjobid != 255)
  6386.     {
  6387.         #if defined DEBUG
  6388.             printf("[Nex-AC debug] Veh model: %d, paintjobid: %d", GetVehicleModel(vehicleid), paintjobid);
  6389.         #endif
  6390.         ac_KickWithCode(playerid, "", 0, 43, 2);
  6391.     }
  6392.     else if(ACInfo[playerid][acACAllow][23] && !ACInfo[playerid][acModShop]) ac_KickWithCode(playerid, "", 0, 23, 4);
  6393.     if(ACInfo[playerid][acKicked] < 1)
  6394.     {
  6395.         if(paintjobid == 255) ACVehInfo[vehicleid][acPaintJob] = 3;
  6396.         else ACVehInfo[vehicleid][acPaintJob] = paintjobid;
  6397.     }
  6398.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][13] = ac_gtc;
  6399.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6400.         && defined ac_OnVehiclePaintjob
  6401.         return ac_OnVehiclePaintjob(playerid, vehicleid, paintjobid);
  6402.     #else
  6403.         return 1;
  6404.     #endif
  6405. }
  6406.  
  6407. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6408.     #if defined _ALS_OnVehiclePaintjob
  6409.         #undef OnVehiclePaintjob
  6410.     #else
  6411.         #define _ALS_OnVehiclePaintjob
  6412.     #endif
  6413.     #define OnVehiclePaintjob ac_OnVehiclePaintjob
  6414.     #if defined ac_OnVehiclePaintjob
  6415.         forward ac_OnVehiclePaintjob(playerid, vehicleid, paintjobid);
  6416.     #endif
  6417. #endif
  6418.  
  6419. #if defined _inc_y_hooks || defined _INC_y_hooks
  6420.     hook OnVehicleRespray(playerid, vehicleid, color1, color2)
  6421. #else
  6422.     public OnVehicleRespray(playerid, vehicleid, color1, color2)
  6423. #endif
  6424. {
  6425.     if(ACInfo[playerid][acKicked] > 0) return 0;
  6426.     new ac_gtc = GetTickCount();
  6427.     if(ACInfo[playerid][acACAllow][49])
  6428.     {
  6429.         if(ac_gtc < ACInfo[playerid][acCall][14] + ac_Mtfc[14][0]) return ac_FloodDetect(playerid, 14);
  6430.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6431.         else ACInfo[playerid][acFloodCount][14] = ACInfo[playerid][acFloodCount][27] = 0;
  6432.     }
  6433.     #if !AC_USE_TUNING_GARAGES && !AC_USE_PAYNSPRAY
  6434.         if(ACInfo[playerid][acACAllow][23])
  6435.         {
  6436.             #if defined DEBUG
  6437.                 printf("[Nex-AC debug] Veh model: %d, color1: %d, color2: %d", GetVehicleModel(vehicleid), color1, color2);
  6438.             #endif
  6439.             #if defined OnCheatDetected
  6440.                 ac_KickWithCode(playerid, "", 0, 23, 5);
  6441.                 if(ACInfo[playerid][acKicked] > 0) return 0;
  6442.             #else
  6443.                 return ac_KickWithCode(playerid, "", 0, 23, 5);
  6444.             #endif
  6445.         }
  6446.     #endif
  6447.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][14] = ac_gtc;
  6448.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6449.         && defined ac_OnVehicleRespray
  6450.         return ac_OnVehicleRespray(playerid, vehicleid, color1, color2);
  6451.     #else
  6452.         return 1;
  6453.     #endif
  6454. }
  6455.  
  6456. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6457.     #if defined _ALS_OnVehicleRespray
  6458.         #undef OnVehicleRespray
  6459.     #else
  6460.         #define _ALS_OnVehicleRespray
  6461.     #endif
  6462.     #define OnVehicleRespray ac_OnVehicleRespray
  6463.     #if defined ac_OnVehicleRespray
  6464.         forward ac_OnVehicleRespray(playerid, vehicleid, color1, color2);
  6465.     #endif
  6466. #endif
  6467.  
  6468. #if defined _inc_y_hooks || defined _INC_y_hooks
  6469.     hook OnVehicleSpawn(vehicleid)
  6470. #else
  6471.     public OnVehicleSpawn(vehicleid)
  6472. #endif
  6473. {
  6474.     ACVehInfo[vehicleid][acPaintJob] = 3;
  6475.     ACVehInfo[vehicleid][acSpawned] = true;
  6476.     ACVehInfo[vehicleid][acHealth] = 1000.0;
  6477.     ACVehInfo[vehicleid][acSpeedDiff] = 0;
  6478.     ACVehInfo[vehicleid][acPosDiff] =
  6479.     ACVehInfo[vehicleid][acVelX] =
  6480.     ACVehInfo[vehicleid][acVelY] =
  6481.     ACVehInfo[vehicleid][acVelZ] = 0.0;
  6482.     ACVehInfo[vehicleid][acPosX] = ACVehInfo[vehicleid][acSpawnPosX];
  6483.     ACVehInfo[vehicleid][acPosY] = ACVehInfo[vehicleid][acSpawnPosY];
  6484.     ACVehInfo[vehicleid][acPosZ] = ACVehInfo[vehicleid][acSpawnPosZ];
  6485.     ACVehInfo[vehicleid][acZAngle] = ACVehInfo[vehicleid][acSpawnZAngle];
  6486.     ACVehInfo[vehicleid][acDriver] = INVALID_PLAYER_ID;
  6487.     new ac_gtc = GetTickCount() + 800;
  6488.     #if defined foreach
  6489.         foreach(new ac_i : Player)
  6490.         {
  6491.             if(ACInfo[ac_i][acVeh] == vehicleid)
  6492.             {
  6493.                 ACInfo[ac_i][acSetPosTime] =
  6494.                 ACInfo[ac_i][acGtc][11] = ac_gtc;
  6495.             }
  6496.         }
  6497.     #else
  6498.         for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  6499.         {
  6500.             if(IsPlayerInVehicle(ac_i, vehicleid))
  6501.             {
  6502.                 ACInfo[ac_i][acSetPosTime] =
  6503.                 ACInfo[ac_i][acGtc][11] = ac_gtc;
  6504.             }
  6505.         }
  6506.     #endif
  6507.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6508.         && defined ac_OnVehicleSpawn
  6509.         return ac_OnVehicleSpawn(vehicleid);
  6510.     #else
  6511.         return 1;
  6512.     #endif
  6513. }
  6514.  
  6515. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6516.     #if defined _ALS_OnVehicleSpawn
  6517.         #undef OnVehicleSpawn
  6518.     #else
  6519.         #define _ALS_OnVehicleSpawn
  6520.     #endif
  6521.     #define OnVehicleSpawn ac_OnVehicleSpawn
  6522.     #if defined ac_OnVehicleSpawn
  6523.         forward ac_OnVehicleSpawn(vehicleid);
  6524.     #endif
  6525. #endif
  6526.  
  6527. #if defined _inc_y_hooks || defined _INC_y_hooks
  6528.     hook OnVehicleDeath(vehicleid, killerid)
  6529. #else
  6530.     public OnVehicleDeath(vehicleid, killerid)
  6531. #endif
  6532. {
  6533.     if(killerid != INVALID_PLAYER_ID && !IsPlayerNPC(killerid))
  6534.     {
  6535.         new ac_gtc = GetTickCount();
  6536.         if(ACInfo[killerid][acACAllow][49])
  6537.         {
  6538.             if(ac_gtc < ACInfo[killerid][acCall][15] + ac_Mtfc[15][0]) ac_FloodDetect(killerid, 15);
  6539.             else if(ac_gtc < ACInfo[killerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(killerid, 27);
  6540.             else ACInfo[killerid][acFloodCount][15] = ACInfo[killerid][acFloodCount][27] = 0;
  6541.         }
  6542.         ACInfo[killerid][acCall][27] = ACInfo[killerid][acCall][15] = ac_gtc;
  6543.     }
  6544.     new Float:ac_vHealth;
  6545.     GetVehicleHealth(vehicleid, ac_vHealth);
  6546.     if(floatcmp(ac_vHealth, 250.0) == -1) ACVehInfo[vehicleid][acSpawned] = false;
  6547.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6548.         && defined ac_OnVehicleDeath
  6549.         return ac_OnVehicleDeath(vehicleid, killerid);
  6550.     #else
  6551.         return 1;
  6552.     #endif
  6553. }
  6554.  
  6555. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6556.     #if defined _ALS_OnVehicleDeath
  6557.         #undef OnVehicleDeath
  6558.     #else
  6559.         #define _ALS_OnVehicleDeath
  6560.     #endif
  6561.     #define OnVehicleDeath ac_OnVehicleDeath
  6562.     #if defined ac_OnVehicleDeath
  6563.         forward ac_OnVehicleDeath(vehicleid, killerid);
  6564.     #endif
  6565. #endif
  6566.  
  6567. #if defined _inc_y_hooks || defined _INC_y_hooks
  6568.     hook OnPlayerText(playerid, text[])
  6569. #else
  6570.     public OnPlayerText(playerid, text[])
  6571. #endif
  6572. {
  6573.     if(ACInfo[playerid][acKicked] > 0) return 0;
  6574.     if(!IsPlayerNPC(playerid))
  6575.     {
  6576.         new ac_gtc = GetTickCount();
  6577.         if(ACInfo[playerid][acACAllow][49])
  6578.         {
  6579.             if(ac_gtc < ACInfo[playerid][acCall][16] + ac_Mtfc[16][0]) return ac_FloodDetect(playerid, 16);
  6580.             if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6581.             else ACInfo[playerid][acFloodCount][16] = ACInfo[playerid][acFloodCount][27] = 0;
  6582.         }
  6583.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][16] = ac_gtc;
  6584.     }
  6585.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6586.         && defined ac_OnPlayerText
  6587.         return ac_OnPlayerText(playerid, text);
  6588.     #else
  6589.         return 1;
  6590.     #endif
  6591. }
  6592.  
  6593. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6594.     #if defined _ALS_OnPlayerText
  6595.         #undef OnPlayerText
  6596.     #else
  6597.         #define _ALS_OnPlayerText
  6598.     #endif
  6599.     #define OnPlayerText ac_OnPlayerText
  6600.     #if defined ac_OnPlayerText
  6601.         forward ac_OnPlayerText(playerid, text[]);
  6602.     #endif
  6603. #endif
  6604.  
  6605. #if defined _inc_y_hooks || defined _INC_y_hooks
  6606.     hook OnPlayerEnterCheckpoint(playerid)
  6607. #else
  6608.     public OnPlayerEnterCheckpoint(playerid)
  6609. #endif
  6610. {
  6611.     if(ACInfo[playerid][acKicked] > 0) return 0;
  6612.     if(!IsPlayerNPC(playerid))
  6613.     {
  6614.         new ac_gtc = GetTickCount();
  6615.         if(ACInfo[playerid][acACAllow][49])
  6616.         {
  6617.             if(ac_gtc < ACInfo[playerid][acCall][17] + ac_Mtfc[17][0]) ac_FloodDetect(playerid, 17);
  6618.             else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6619.             else ACInfo[playerid][acFloodCount][17] = ACInfo[playerid][acFloodCount][27] = 0;
  6620.         }
  6621.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][17] = ac_gtc;
  6622.     }
  6623.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6624.         && defined ac_OnPlayerEnterCheckpoint
  6625.         return ac_OnPlayerEnterCheckpoint(playerid);
  6626.     #else
  6627.         return 1;
  6628.     #endif
  6629. }
  6630.  
  6631. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6632.     #if defined _ALS_OnPlayerEnterCheckpoint
  6633.         #undef OnPlayerEnterCheckpoint
  6634.     #else
  6635.         #define _ALS_OnPlayerEnterCheckpoint
  6636.     #endif
  6637.     #define OnPlayerEnterCheckpoint ac_OnPlayerEnterCheckpoint
  6638.     #if defined ac_OnPlayerEnterCheckpoint
  6639.         forward ac_OnPlayerEnterCheckpoint(playerid);
  6640.     #endif
  6641. #endif
  6642.  
  6643. #if defined _inc_y_hooks || defined _INC_y_hooks
  6644.     hook OnPlayerLeaveCheckpoint(playerid)
  6645. #else
  6646.     public OnPlayerLeaveCheckpoint(playerid)
  6647. #endif
  6648. {
  6649.     if(ACInfo[playerid][acKicked] > 0) return 0;
  6650.     if(!IsPlayerNPC(playerid))
  6651.     {
  6652.         new ac_gtc = GetTickCount();
  6653.         if(ACInfo[playerid][acACAllow][49])
  6654.         {
  6655.             if(ac_gtc < ACInfo[playerid][acCall][18] + ac_Mtfc[18][0]) ac_FloodDetect(playerid, 18);
  6656.             else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6657.             else ACInfo[playerid][acFloodCount][18] = ACInfo[playerid][acFloodCount][27] = 0;
  6658.         }
  6659.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][18] = ac_gtc;
  6660.     }
  6661.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6662.         && defined ac_OnPlayerLeaveCheckpoint
  6663.         return ac_OnPlayerLeaveCheckpoint(playerid);
  6664.     #else
  6665.         return 1;
  6666.     #endif
  6667. }
  6668.  
  6669. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6670.     #if defined _ALS_OnPlayerLeaveCheckpoint
  6671.         #undef OnPlayerLeaveCheckpoint
  6672.     #else
  6673.         #define _ALS_OnPlayerLeaveCheckpoint
  6674.     #endif
  6675.     #define OnPlayerLeaveCheckpoint ac_OnPlayerLeaveCheckpoint
  6676.     #if defined ac_OnPlayerLeaveCheckpoint
  6677.         forward ac_OnPlayerLeaveCheckpoint(playerid);
  6678.     #endif
  6679. #endif
  6680.  
  6681. #if defined _inc_y_hooks || defined _INC_y_hooks
  6682.     hook OnPlayerRequestSpawn(playerid)
  6683. #else
  6684.     public OnPlayerRequestSpawn(playerid)
  6685. #endif
  6686. {
  6687.     if(ACInfo[playerid][acKicked] > 0) return 0;
  6688.     new ac_i;
  6689.     if(!IsPlayerNPC(playerid))
  6690.     {
  6691.         ac_i = GetTickCount();
  6692.         if(ACInfo[playerid][acACAllow][49])
  6693.         {
  6694.             if(ac_i < ACInfo[playerid][acCall][19] + ac_Mtfc[19][0]) return ac_FloodDetect(playerid, 19);
  6695.             if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6696.             else ACInfo[playerid][acFloodCount][19] = ACInfo[playerid][acFloodCount][27] = 0;
  6697.         }
  6698.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][19] = ac_i;
  6699.     }
  6700.     ac_i = 1;
  6701.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6702.         && defined ac_OnPlayerRequestSpawn
  6703.         ac_i = ac_OnPlayerRequestSpawn(playerid);
  6704.     #endif
  6705.     if(ac_i && !ACInfo[playerid][acSpawned])
  6706.     {
  6707.         ACInfo[playerid][acSet][7] = 3;
  6708.         ACInfo[playerid][acSpawnTime] =
  6709.         ACInfo[playerid][acNOPCount][9] = 0;
  6710.         ACInfo[playerid][acSpawnRes] = 1;
  6711.     }
  6712.     return ac_i;
  6713. }
  6714.  
  6715. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6716.     #if defined _ALS_OnPlayerRequestSpawn
  6717.         #undef OnPlayerRequestSpawn
  6718.     #else
  6719.         #define _ALS_OnPlayerRequestSpawn
  6720.     #endif
  6721.     #define OnPlayerRequestSpawn ac_OnPlayerRequestSpawn
  6722.     #if defined ac_OnPlayerRequestSpawn
  6723.         forward ac_OnPlayerRequestSpawn(playerid);
  6724.     #endif
  6725. #endif
  6726.  
  6727. #if defined _inc_y_hooks || defined _INC_y_hooks
  6728.     hook OnPlayerExitedMenu(playerid)
  6729. #else
  6730.     public OnPlayerExitedMenu(playerid)
  6731. #endif
  6732. {
  6733.     if(!(0 <= playerid < MAX_PLAYERS) || ACInfo[playerid][acKicked] > 0) return 0;
  6734.     new ac_gtc = GetTickCount();
  6735.     if(ACInfo[playerid][acACAllow][49])
  6736.     {
  6737.         if(ac_gtc < ACInfo[playerid][acCall][20] + ac_Mtfc[20][0]) ac_FloodDetect(playerid, 20);
  6738.         else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6739.         else ACInfo[playerid][acFloodCount][20] = ACInfo[playerid][acFloodCount][27] = 0;
  6740.     }
  6741.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][20] = ac_gtc;
  6742.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6743.         && defined ac_OnPlayerExitedMenu
  6744.         return ac_OnPlayerExitedMenu(playerid);
  6745.     #else
  6746.         return 1;
  6747.     #endif
  6748. }
  6749.  
  6750. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6751.     #if defined _ALS_OnPlayerExitedMenu
  6752.         #undef OnPlayerExitedMenu
  6753.     #else
  6754.         #define _ALS_OnPlayerExitedMenu
  6755.     #endif
  6756.     #define OnPlayerExitedMenu ac_OnPlayerExitedMenu
  6757.     #if defined ac_OnPlayerExitedMenu
  6758.         forward ac_OnPlayerExitedMenu(playerid);
  6759.     #endif
  6760. #endif
  6761.  
  6762. #if defined _inc_y_hooks || defined _INC_y_hooks
  6763.     hook OnPlayerEnterRaceCP(playerid)
  6764. #else
  6765.     public OnPlayerEnterRaceCheckpoint(playerid)
  6766. #endif
  6767. {
  6768.     if(ACInfo[playerid][acKicked] > 0) return 0;
  6769.     if(!IsPlayerNPC(playerid))
  6770.     {
  6771.         new ac_gtc = GetTickCount();
  6772.         if(ACInfo[playerid][acACAllow][49])
  6773.         {
  6774.             if(ac_gtc < ACInfo[playerid][acCall][21] + ac_Mtfc[21][0]) ac_FloodDetect(playerid, 21);
  6775.             else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6776.             else ACInfo[playerid][acFloodCount][21] = ACInfo[playerid][acFloodCount][27] = 0;
  6777.         }
  6778.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][21] = ac_gtc;
  6779.     }
  6780.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6781.         && defined ac_OnPlayerEnterRaceCheckpoint
  6782.         return ac_OnPlayerEnterRaceCheckpoint(playerid);
  6783.     #else
  6784.         return 1;
  6785.     #endif
  6786. }
  6787.  
  6788. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6789.     #if defined _ALS_OnPlayerEnterRaceCheckpoin\
  6790.         || defined _ALS_OnPlayerEnterRaceCP
  6791.         #undef OnPlayerEnterRaceCheckpoint
  6792.     #else
  6793.         #define _ALS_OnPlayerEnterRaceCP
  6794.     #endif
  6795.     #define OnPlayerEnterRaceCheckpoint ac_OnPlayerEnterRaceCheckpoint
  6796.     #if defined ac_OnPlayerEnterRaceCheckpoint
  6797.         forward ac_OnPlayerEnterRaceCheckpoint(playerid);
  6798.     #endif
  6799. #endif
  6800.  
  6801. #if defined _inc_y_hooks || defined _INC_y_hooks
  6802.     hook OnPlayerLeaveRaceCP(playerid)
  6803. #else
  6804.     public OnPlayerLeaveRaceCheckpoint(playerid)
  6805. #endif
  6806. {
  6807.     if(ACInfo[playerid][acKicked] > 0) return 0;
  6808.     if(!IsPlayerNPC(playerid))
  6809.     {
  6810.         new ac_gtc = GetTickCount();
  6811.         if(ACInfo[playerid][acACAllow][49])
  6812.         {
  6813.             if(ac_gtc < ACInfo[playerid][acCall][22] + ac_Mtfc[22][0]) ac_FloodDetect(playerid, 22);
  6814.             else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6815.             else ACInfo[playerid][acFloodCount][22] = ACInfo[playerid][acFloodCount][27] = 0;
  6816.         }
  6817.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][22] = ac_gtc;
  6818.     }
  6819.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6820.         && defined ac_OnPlayerLeaveRaceCheckpoint
  6821.         return ac_OnPlayerLeaveRaceCheckpoint(playerid);
  6822.     #else
  6823.         return 1;
  6824.     #endif
  6825. }
  6826.  
  6827. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6828.     #if defined _ALS_OnPlayerLeaveRaceCheckpoin\
  6829.         || defined _ALS_OnPlayerLeaveRaceCP
  6830.         #undef OnPlayerLeaveRaceCheckpoint
  6831.     #else
  6832.         #define _ALS_OnPlayerLeaveRaceCP
  6833.     #endif
  6834.     #define OnPlayerLeaveRaceCheckpoint ac_OnPlayerLeaveRaceCheckpoint
  6835.     #if defined ac_OnPlayerLeaveRaceCheckpoint
  6836.         forward ac_OnPlayerLeaveRaceCheckpoint(playerid);
  6837.     #endif
  6838. #endif
  6839.  
  6840. #if defined _inc_y_hooks || defined _INC_y_hooks
  6841.     hook OnPlayerClickPlayerTD(playerid, PlayerText:playertextid)
  6842. #else
  6843.     public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  6844. #endif
  6845. {
  6846.     if(ACInfo[playerid][acKicked] > 0) return 1;
  6847.     new ac_gtc = GetTickCount();
  6848.     if(ACInfo[playerid][acACAllow][49])
  6849.     {
  6850.         if(ac_gtc < ACInfo[playerid][acCall][23] + ac_Mtfc[23][0])
  6851.         {
  6852.             ac_FloodDetect(playerid, 23);
  6853.             return 1;
  6854.         }
  6855.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6856.         else ACInfo[playerid][acFloodCount][23] = ACInfo[playerid][acFloodCount][27] = 0;
  6857.     }
  6858.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][23] = ac_gtc;
  6859.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6860.         && defined ac_OnPlayerClickPlayerTextDraw
  6861.         return ac_OnPlayerClickPlayerTextDraw(playerid, playertextid);
  6862.     #else
  6863.         return 0;
  6864.     #endif
  6865. }
  6866.  
  6867. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6868.     #if defined _ALS_OnPlayerClickPlayerTextDra\
  6869.         || defined _ALS_OnPlayerClickPlayerTD
  6870.         #undef OnPlayerClickPlayerTextDraw
  6871.     #else
  6872.         #define _ALS_OnPlayerClickPlayerTD
  6873.     #endif
  6874.     #define OnPlayerClickPlayerTextDraw ac_OnPlayerClickPlayerTextDraw
  6875.     #if defined ac_OnPlayerClickPlayerTextDraw
  6876.         forward ac_OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid);
  6877.     #endif
  6878. #endif
  6879.  
  6880. #if defined _inc_y_hooks || defined _INC_y_hooks
  6881.     hook OnVehDamageStatusUpd(vehicleid, playerid)
  6882. #else
  6883.     public OnVehicleDamageStatusUpdate(vehicleid, playerid)
  6884. #endif
  6885. {
  6886.     if(ACInfo[playerid][acKicked] > 0) return 1;
  6887.     new ac_gtc = GetTickCount();
  6888.     if(ACInfo[playerid][acACAllow][49])
  6889.     {
  6890.         if(ac_gtc < ACInfo[playerid][acCall][24] + ac_Mtfc[24][0]) ac_FloodDetect(playerid, 24);
  6891.         else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6892.         else ACInfo[playerid][acFloodCount][24] = ACInfo[playerid][acFloodCount][27] = 0;
  6893.     }
  6894.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][24] = ac_gtc;
  6895.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6896.         && defined ac_OnVehicleDamageStatusUpdate
  6897.         return ac_OnVehicleDamageStatusUpdate(vehicleid, playerid);
  6898.     #else
  6899.         return 0;
  6900.     #endif
  6901. }
  6902.  
  6903. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6904.     #if defined _ALS_OnVehicleDamageStatusUpdat\
  6905.         || defined _ALS_OnVehicleDamageStatusUpd
  6906.         #undef OnVehicleDamageStatusUpdate
  6907.     #else
  6908.         #define _ALS_OnVehicleDamageStatusUpd
  6909.     #endif
  6910.     #define OnVehicleDamageStatusUpdate ac_OnVehicleDamageStatusUpdate
  6911.     #if defined ac_OnVehicleDamageStatusUpdate
  6912.         forward ac_OnVehicleDamageStatusUpdate(vehicleid, playerid);
  6913.     #endif
  6914. #endif
  6915.  
  6916. #if defined _inc_y_hooks || defined _INC_y_hooks
  6917.     hook OnVehicleSirenChange(playerid, vehicleid, newstate)
  6918. #else
  6919.     public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
  6920. #endif
  6921. {
  6922.     if(ACInfo[playerid][acKicked] > 0) return 1;
  6923.     if(!IsPlayerNPC(playerid))
  6924.     {
  6925.         new ac_gtc = GetTickCount();
  6926.         if(ACInfo[playerid][acACAllow][49])
  6927.         {
  6928.             if(ac_gtc < ACInfo[playerid][acCall][25] + ac_Mtfc[25][0]) ac_FloodDetect(playerid, 25);
  6929.             else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6930.             else ACInfo[playerid][acFloodCount][25] = ACInfo[playerid][acFloodCount][27] = 0;
  6931.         }
  6932.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][25] = ac_gtc;
  6933.     }
  6934.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6935.         && defined ac_OnVehicleSirenStateChange
  6936.         return ac_OnVehicleSirenStateChange(playerid, vehicleid, newstate);
  6937.     #else
  6938.         return 0;
  6939.     #endif
  6940. }
  6941.  
  6942. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6943.     #if defined _ALS_OnVehicleSirenStateChange
  6944.         #undef OnVehicleSirenStateChange
  6945.     #else
  6946.         #define _ALS_OnVehicleSirenStateChange
  6947.     #endif
  6948.     #define OnVehicleSirenStateChange ac_OnVehicleSirenStateChange
  6949.     #if defined ac_OnVehicleSirenStateChange
  6950.         forward ac_OnVehicleSirenStateChange(playerid, vehicleid, newstate);
  6951.     #endif
  6952. #endif
  6953.  
  6954. #if defined OnPlayerSelectDynamicObject
  6955.     #if defined _inc_y_hooks || defined _INC_y_hooks
  6956.         #if defined STREAMER_ENABLE_TAGS
  6957.             hook OnPlayerSelectDynObject(playerid, STREAMER_TAG_OBJECT objectid, modelid, Float:x, Float:y, Float:z)
  6958.         #else
  6959.             hook OnPlayerSelectDynObject(playerid, objectid, modelid, Float:x, Float:y, Float:z)
  6960.         #endif
  6961.     #else
  6962.         #if defined STREAMER_ENABLE_TAGS
  6963.             public OnPlayerSelectDynamicObject(playerid, STREAMER_TAG_OBJECT objectid, modelid, Float:x, Float:y, Float:z)
  6964.         #else
  6965.             public OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z)
  6966.         #endif
  6967.     #endif
  6968.     {
  6969.         if(ACInfo[playerid][acKicked] > 0) return 0;
  6970.         new ac_gtc = GetTickCount();
  6971.         if(ACInfo[playerid][acACAllow][49])
  6972.         {
  6973.             if(ac_gtc < ACInfo[playerid][acCall][26] + ac_Mtfc[26][0]) ac_FloodDetect(playerid, 26);
  6974.             else if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  6975.             else ACInfo[playerid][acFloodCount][26] = ACInfo[playerid][acFloodCount][27] = 0;
  6976.         }
  6977.         ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][26] = ac_gtc;
  6978.         #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  6979.             && defined ac_OnPlayerSelectDynamicObject
  6980.             return ac_OnPlayerSelectDynamicObject(playerid, objectid, modelid, x, y, z);
  6981.         #else
  6982.             return 1;
  6983.         #endif
  6984.     }
  6985.  
  6986.     #if !defined _inc_y_hooks && !defined _INC_y_hooks
  6987.         #if defined _ALS_OnPlayerSelectDynamicObjec\
  6988.             || defined _ALS_OnPlayerSelectDynObject || defined _ALS_OnPlayerSelectDynamicObj
  6989.             #undef OnPlayerSelectDynamicObject
  6990.         #else
  6991.             #define _ALS_OnPlayerSelectDynObject
  6992.         #endif
  6993.         #define OnPlayerSelectDynamicObject ac_OnPlayerSelectDynamicObject
  6994.         #if defined ac_OnPlayerSelectDynamicObject
  6995.             #if defined STREAMER_ENABLE_TAGS
  6996.                 forward ac_OnPlayerSelectDynamicObject(playerid, STREAMER_TAG_OBJECT objectid, modelid, Float:x, Float:y, Float:z);
  6997.             #else
  6998.                 forward ac_OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z);
  6999.             #endif
  7000.         #endif
  7001.     #endif
  7002. #endif
  7003.  
  7004. #if defined _inc_y_hooks || defined _INC_y_hooks
  7005.     hook OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
  7006. #else
  7007.     public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
  7008. #endif
  7009. {
  7010.     if(ACInfo[playerid][acKicked] > 0) return 1;
  7011.     new ac_gtc = GetTickCount();
  7012.     if(ACInfo[playerid][acACAllow][49])
  7013.     {
  7014.         if(ac_gtc < ACInfo[playerid][acCall][26] + ac_Mtfc[26][0])
  7015.         {
  7016.             ac_FloodDetect(playerid, 26);
  7017.             return 1;
  7018.         }
  7019.         if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
  7020.         else ACInfo[playerid][acFloodCount][26] = ACInfo[playerid][acFloodCount][27] = 0;
  7021.     }
  7022.     ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][26] = ac_gtc;
  7023.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  7024.         && defined ac_OnPlayerSelectObject
  7025.         return ac_OnPlayerSelectObject(playerid, type, objectid, modelid, fX, fY, fZ);
  7026.     #else
  7027.         return 0;
  7028.     #endif
  7029. }
  7030.  
  7031. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  7032.     #if defined _ALS_OnPlayerSelectObject
  7033.         #undef OnPlayerSelectObject
  7034.     #else
  7035.         #define _ALS_OnPlayerSelectObject
  7036.     #endif
  7037.     #define OnPlayerSelectObject ac_OnPlayerSelectObject
  7038.     #if defined ac_OnPlayerSelectObject
  7039.         forward ac_OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ);
  7040.     #endif
  7041. #endif
  7042.  
  7043. #if defined _inc_y_hooks || defined _INC_y_hooks
  7044.     hook OnUnoccupiedVehicleUpd(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
  7045. #else
  7046.     public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
  7047. #endif
  7048. {
  7049.     if(ACInfo[playerid][acKicked] > 0) return 0;
  7050.     if(ACInfo[playerid][acACAllow][31] &&
  7051.     (floatcmp(new_x, new_x) != 0 || floatcmp(new_y, new_y) != 0 || floatcmp(new_z, new_z) != 0 ||
  7052.     floatcmp(vel_x, vel_x) != 0 || floatcmp(vel_y, vel_y) != 0 || floatcmp(vel_z, vel_z) != 0 ||
  7053.     floatcmp(floatabs(new_x), 25000.0) >= 0 || floatcmp(floatabs(new_y), 25000.0) >= 0 || floatcmp(floatabs(new_z), 25000.0) >= 0 ||
  7054.     floatcmp(floatabs(vel_x), 100.0) >= 0 || floatcmp(floatabs(vel_y), 100.0) >= 0 || floatcmp(floatabs(vel_z), 100.0) >= 0))
  7055.     {
  7056.         #if defined DEBUG
  7057.             printf("[Nex-AC debug] Pos x, y, z: %f, %f, %f, vel x, y, z: %f, %f, %f", new_x, new_y, new_z, vel_x, vel_y, vel_z);
  7058.         #endif
  7059.         return ac_KickWithCode(playerid, "", 0, 31, 2);
  7060.     }
  7061.     new Float:ac_x, Float:ac_y, Float:ac_z, Float:ac_dist = GetVehicleDistanceFromPoint(vehicleid, new_x, new_y, new_z);
  7062.     GetVehiclePos(vehicleid, ac_x, ac_y, ac_z);
  7063.     if(passenger_seat > 0)
  7064.     {
  7065.         new Float:ac_zDiff = floatsub(new_z, ac_z);
  7066.         if(ACInfo[playerid][acACAllow][31] &&
  7067.         ((floatcmp(vel_z, ACVehInfo[vehicleid][acVelZ]) == 1 || floatcmp(ac_zDiff, -0.8) >= 0) &&
  7068.         (floatcmp(floatabs(vel_x), floatabs(ACVehInfo[vehicleid][acVelX])) >= 0 && floatcmp(floatabs(ACVehInfo[vehicleid][acVelX]), 0.3) >= 0 ||
  7069.         floatcmp(floatabs(vel_y), floatabs(ACVehInfo[vehicleid][acVelY])) >= 0 && floatcmp(floatabs(ACVehInfo[vehicleid][acVelY]), 0.3) >= 0) ||
  7070.         floatcmp(ac_zDiff, -5.0) >= 0 && (floatcmp(floatabs(floatsub(new_x, ac_x)), 15.0) >= 0 ||
  7071.         floatcmp(floatabs(floatsub(new_y, ac_y)), 15.0) >= 0)))
  7072.         {
  7073.             if(++ACInfo[playerid][acCheatCount][4] > AC_MAX_CARSHOT_WARNINGS)
  7074.             {
  7075.                 #undef AC_MAX_CARSHOT_WARNINGS
  7076.                 #if defined DEBUG
  7077.                     printf("[Nex-AC debug] Vel x, y: %f, %f, old vel x, y: %f, %f, pos diff z: %f, veh: %d",
  7078.                     vel_x, vel_y, ACVehInfo[vehicleid][acVelX], ACVehInfo[vehicleid][acVelY], ac_zDiff, vehicleid);
  7079.                 #endif
  7080.                 #if defined OnCheatDetected
  7081.                     ac_KickWithCode(playerid, "", 0, 31, 1);
  7082.                     if(ACInfo[playerid][acKicked] > 0) return 0;
  7083.                     ACInfo[playerid][acCheatCount][4] = 0;
  7084.                 #else
  7085.                     return ac_KickWithCode(playerid, "", 0, 31, 1);
  7086.                 #endif
  7087.             }
  7088.             #if defined OnCheatWarning
  7089.                 else OnCheatWarning(playerid, "", 0, 31, 1, ACInfo[playerid][acCheatCount][4]);
  7090.             #endif
  7091.         }
  7092.         else if(ACInfo[playerid][acACAllow][8] &&
  7093.         floatcmp(vel_z, 0.1) >= 0 && floatcmp(vel_z, ACVehInfo[vehicleid][acVelZ]) == 1 &&
  7094.         floatcmp(floatabs(floatsub(ac_x, new_x)), floatdiv(ac_zDiff, 2.0)) == -1 && floatcmp(floatabs(floatsub(ac_y, new_y)), floatdiv(ac_zDiff, 2.0)) == -1)
  7095.         {
  7096.             if(++ACInfo[playerid][acCheatCount][3] > AC_MAX_FLYHACK_VEH_WARNINGS)
  7097.             {
  7098.                 #undef AC_MAX_FLYHACK_VEH_WARNINGS
  7099.                 #if defined DEBUG
  7100.                     printf("[Nex-AC debug] Vel z: %f, old vel z: %f, pos diff x, y, z: %f, %f, %f, veh: %d",
  7101.                     vel_z, ACVehInfo[vehicleid][acVelZ], floatsub(ac_x, new_x), floatsub(ac_y, new_y), ac_zDiff, vehicleid);
  7102.                 #endif
  7103.                 #if defined OnCheatDetected
  7104.                     ac_KickWithCode(playerid, "", 0, 8, 2);
  7105.                     if(ACInfo[playerid][acKicked] > 0) return 0;
  7106.                     ACInfo[playerid][acCheatCount][3] = 0;
  7107.                 #else
  7108.                     return ac_KickWithCode(playerid, "", 0, 8, 2);
  7109.                 #endif
  7110.             }
  7111.             #if defined OnCheatWarning
  7112.                 else OnCheatWarning(playerid, "", 0, 8, 2, ACInfo[playerid][acCheatCount][3]);
  7113.             #endif
  7114.         }
  7115.         else
  7116.         {
  7117.             if(ACInfo[playerid][acCheatCount][4] > 0) ACInfo[playerid][acCheatCount][4]--;
  7118.             ACInfo[playerid][acCheatCount][3] = 0;
  7119.         }
  7120.     }
  7121.     if(ACInfo[playerid][acACAllow][5] &&
  7122.     floatcmp(ac_dist, 15.0) >= 0 && floatcmp(ac_z, -45.0) == 1 &&
  7123.     floatcmp(ac_dist, floatadd(ACVehInfo[vehicleid][acPosDiff], floatmul(floatdiv(ac_dist, 3.0), 1.6))) == 1)
  7124.     {
  7125.         #if defined DEBUG
  7126.             printf("[Nex-AC debug] Dist: %f, old pos diff: %f, pos z: %f, veh: %d, playerid: %d",
  7127.             ac_dist, ACVehInfo[vehicleid][acPosDiff], ac_z, vehicleid, playerid);
  7128.         #endif
  7129.         #if defined OnCheatDetected
  7130.             ac_KickWithCode(playerid, "", 0, 5);
  7131.         #endif
  7132.         GetVehicleZAngle(vehicleid, ACVehInfo[vehicleid][acZAngle]);
  7133.         SetVehicleZAngle(vehicleid, ACVehInfo[vehicleid][acZAngle]);
  7134.         SetVehiclePos(vehicleid, ac_x, ac_y, ac_z);
  7135.         return 0;
  7136.     }
  7137.     new ac_a = 1;
  7138.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  7139.         && defined ac_OnUnoccupiedVehicleUpdate
  7140.         ac_a = ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, new_x, new_y, new_z, vel_x, vel_y, vel_z);
  7141.     #endif
  7142.     if(ac_a)
  7143.     {
  7144.         ACVehInfo[vehicleid][acSpeedDiff] = ac_GetSpeed(vel_x, vel_y, vel_z) - ac_GetSpeed(ACVehInfo[vehicleid][acVelX], ACVehInfo[vehicleid][acVelY], ACVehInfo[vehicleid][acVelZ]);
  7145.         ACVehInfo[vehicleid][acPosDiff] = ac_dist;
  7146.         ACVehInfo[vehicleid][acPosX] = new_x;
  7147.         ACVehInfo[vehicleid][acPosY] = new_y;
  7148.         ACVehInfo[vehicleid][acPosZ] = new_z;
  7149.         ACVehInfo[vehicleid][acVelX] = vel_x;
  7150.         ACVehInfo[vehicleid][acVelY] = vel_y;
  7151.         ACVehInfo[vehicleid][acVelZ] = vel_z;
  7152.     }
  7153.     return ac_a;
  7154. }
  7155.  
  7156. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  7157.     #if defined _ALS_OnUnoccupiedVehicleUpdate
  7158.         #undef OnUnoccupiedVehicleUpdate
  7159.     #else
  7160.         #define _ALS_OnUnoccupiedVehicleUpdate
  7161.     #endif
  7162.     #define OnUnoccupiedVehicleUpdate ac_OnUnoccupiedVehicleUpdate
  7163.     #if defined ac_OnUnoccupiedVehicleUpdate
  7164.         forward ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z);
  7165.     #endif
  7166. #endif
  7167.  
  7168. #if defined OnTrailerUpdate
  7169.     #if defined _inc_y_hooks || defined _INC_y_hooks
  7170.         hook OnTrailerUpdate(playerid, vehicleid)
  7171.     #else
  7172.         public OnTrailerUpdate(playerid, vehicleid)
  7173.     #endif
  7174.     {
  7175.         if(ACInfo[playerid][acKicked] > 0) return 0;
  7176.         #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  7177.             && defined ac_OnTrailerUpdate
  7178.             return ac_OnTrailerUpdate(playerid, vehicleid);
  7179.         #else
  7180.             return 1;
  7181.         #endif
  7182.     }
  7183.  
  7184.     #if !defined _inc_y_hooks && !defined _INC_y_hooks
  7185.         #if defined _ALS_OnTrailerUpdate
  7186.             #undef OnTrailerUpdate
  7187.         #else
  7188.             #define _ALS_OnTrailerUpdate
  7189.         #endif
  7190.         #define OnTrailerUpdate ac_OnTrailerUpdate
  7191.         #if defined ac_OnTrailerUpdate
  7192.             forward ac_OnTrailerUpdate(playerid, vehicleid);
  7193.         #endif
  7194.     #endif
  7195. #endif
  7196.  
  7197. #if defined _inc_y_hooks || defined _INC_y_hooks
  7198.     hook OnPlayerEditAttachedObj(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
  7199. #else
  7200.     public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
  7201. #endif
  7202. {
  7203.     if(ACInfo[playerid][acKicked] > 0) return 1;
  7204.     if(ACInfo[playerid][acACAllow][46] && 384 <= modelid <= 393)
  7205.     {
  7206.         #if defined DEBUG
  7207.             printf("[Nex-AC debug] Object modelid: %d", modelid);
  7208.         #endif
  7209.         ac_KickWithCode(playerid, "", 0, 46);
  7210.         return 1;
  7211.     }
  7212.     #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  7213.         && defined ac_OnPlayerEditAttachedObject
  7214.         return ac_OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ);
  7215.     #else
  7216.         return 0;
  7217.     #endif
  7218. }
  7219.  
  7220. #if !defined _inc_y_hooks && !defined _INC_y_hooks
  7221.     #if defined _ALS_OnPlayerEditAttachedObject
  7222.         #undef OnPlayerEditAttachedObject
  7223.     #else
  7224.         #define _ALS_OnPlayerEditAttachedObject
  7225.     #endif
  7226.     #define OnPlayerEditAttachedObject ac_OnPlayerEditAttachedObject
  7227.     #if defined ac_OnPlayerEditAttachedObject
  7228.         forward ac_OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ);
  7229.     #endif
  7230. #endif
  7231.  
  7232. #if defined PAWNRAKNET_INC_
  7233.     #if defined _inc_y_hooks || defined _INC_y_hooks
  7234.         hook OnIncomingPacket(playerid, packetid, BitStream:bs)
  7235.     #else
  7236.         public OnIncomingPacket(playerid, packetid, BitStream:bs)
  7237.     #endif
  7238.     {
  7239.         if(0 <= playerid < MAX_PLAYERS)
  7240.         {
  7241.             if(ACInfo[playerid][acKicked] > 0) return 0;
  7242.             if(packetid == 209)
  7243.             {
  7244.                 new uData[PR_UnoccupiedSync];
  7245.                 BS_IgnoreBits(bs, 8);
  7246.                 BS_ReadUnoccupiedSync(bs, uData);
  7247.                 if(floatcmp(uData[PR_roll][0], uData[PR_roll][0]) != 0 ||
  7248.                 floatcmp(uData[PR_roll][1], uData[PR_roll][1]) != 0 ||
  7249.                 floatcmp(uData[PR_roll][2], uData[PR_roll][2]) != 0 ||
  7250.                 floatcmp(uData[PR_direction][0], uData[PR_direction][0]) != 0 ||
  7251.                 floatcmp(uData[PR_direction][1], uData[PR_direction][1]) != 0 ||
  7252.                 floatcmp(uData[PR_direction][2], uData[PR_direction][2]) != 0 ||
  7253.                 floatcmp(uData[PR_angularVelocity][0], uData[PR_angularVelocity][0]) != 0 ||
  7254.                 floatcmp(uData[PR_angularVelocity][1], uData[PR_angularVelocity][1]) != 0 ||
  7255.                 floatcmp(uData[PR_angularVelocity][2], uData[PR_angularVelocity][2]) != 0 ||
  7256.                 floatcmp(floatabs(uData[PR_roll][0]), 1.0) >= 0 ||
  7257.                 floatcmp(floatabs(uData[PR_roll][1]), 1.0) >= 0 ||
  7258.                 floatcmp(floatabs(uData[PR_roll][2]), 1.0) >= 0 ||
  7259.                 floatcmp(floatabs(uData[PR_direction][0]), 1.0) >= 0 ||
  7260.                 floatcmp(floatabs(uData[PR_direction][1]), 1.0) >= 0 ||
  7261.                 floatcmp(floatabs(uData[PR_direction][2]), 1.0) >= 0 ||
  7262.                 floatcmp(floatabs(uData[PR_angularVelocity][0]), 1.0) >= 0 ||
  7263.                 floatcmp(floatabs(uData[PR_angularVelocity][1]), 1.0) >= 0 ||
  7264.                 floatcmp(floatabs(uData[PR_angularVelocity][2]), 1.0) >= 0) return 0;
  7265.             }
  7266.         }
  7267.         #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  7268.             && defined ac_OnIncomingPacket
  7269.             return ac_OnIncomingPacket(playerid, packetid, bs);
  7270.         #else
  7271.             return 1;
  7272.         #endif
  7273.     }
  7274.  
  7275.     #if !defined _inc_y_hooks && !defined _INC_y_hooks
  7276.         #if defined _ALS_OnIncomingPacket
  7277.             #undef OnIncomingPacket
  7278.         #else
  7279.             #define _ALS_OnIncomingPacket
  7280.         #endif
  7281.         #define OnIncomingPacket ac_OnIncomingPacket
  7282.         #if defined ac_OnIncomingPacket
  7283.             forward ac_OnIncomingPacket(playerid, packetid, BitStream:bs);
  7284.         #endif
  7285.     #endif
  7286.  
  7287.     #if defined _inc_y_hooks || defined _INC_y_hooks
  7288.         hook OnIncomingRPC(playerid, rpcid, BitStream:bs)
  7289.     #else
  7290.         public OnIncomingRPC(playerid, rpcid, BitStream:bs)
  7291.     #endif
  7292.     {
  7293.         if(0 <= playerid < MAX_PLAYERS && ACInfo[playerid][acKicked] > 0 && ACInfo[playerid][acOnline]) return 0;
  7294.         #if !defined _inc_y_hooks && !defined _INC_y_hooks\
  7295.             && defined ac_OnIncomingRPC
  7296.             return ac_OnIncomingRPC(playerid, rpcid, bs);
  7297.         #else
  7298.             return 1;
  7299.         #endif
  7300.     }
  7301.  
  7302.     #if !defined _inc_y_hooks && !defined _INC_y_hooks
  7303.         #if defined _ALS_OnIncomingRPC
  7304.             #undef OnIncomingRPC
  7305.         #else
  7306.             #define _ALS_OnIncomingRPC
  7307.         #endif
  7308.         #define OnIncomingRPC ac_OnIncomingRPC
  7309.         #if defined ac_OnIncomingRPC
  7310.             forward ac_OnIncomingRPC(playerid, rpcid, BitStream:bs);
  7311.         #endif
  7312.     #endif
  7313. #endif
  7314.  
  7315. ac_fpublic ac_Timer(playerid)
  7316. {
  7317.     if(!IsPlayerConnected(playerid) || ACInfo[playerid][acKicked] > 0) return 0;
  7318.     new ac_gpp;
  7319.     if(ACInfo[playerid][acACAllow][51] && (ac_gpp = NetStats_MessagesRecvPerSecond(playerid)) > AC_MAX_MSGS_REC_DIFF)
  7320.     {
  7321.         #if defined DEBUG
  7322.             printf("[Nex-AC debug] Max msgs per sec: %d, msgs per sec: %d", AC_MAX_MSGS_REC_DIFF, ac_gpp);
  7323.         #endif
  7324.         #undef AC_MAX_MSGS_REC_DIFF
  7325.         ac_KickWithCode(playerid, "", 0, 51);
  7326.     }
  7327.     ac_gpp = GetPlayerPing(playerid);
  7328.     if(ACInfo[playerid][acACAllow][38])
  7329.     {
  7330.         if(ac_gpp > AC_MAX_PING && ac_gpp != 65535)
  7331.         {
  7332.             if(++ACInfo[playerid][acCheatCount][0] > AC_MAX_PING_WARNINGS)
  7333.             {
  7334.                 #if defined DEBUG
  7335.                     printf("[Nex-AC debug] Max ping: %d, ping: %d", AC_MAX_PING, ac_gpp);
  7336.                 #endif
  7337.                 #undef AC_MAX_PING
  7338.                 #undef AC_MAX_PING_WARNINGS
  7339.                 ac_KickWithCode(playerid, "", 0, 38);
  7340.                 #if defined OnCheatDetected
  7341.                     ACInfo[playerid][acCheatCount][0] = 0;
  7342.                 #endif
  7343.             }
  7344.             #if defined OnCheatWarning
  7345.                 else OnCheatWarning(playerid, "", 0, 38, 0, ACInfo[playerid][acCheatCount][0]);
  7346.             #endif
  7347.         }
  7348.         else ACInfo[playerid][acCheatCount][0] = 0;
  7349.     }
  7350.     new ac_gtc = GetTickCount();
  7351.     if(ac_gtc < ACInfo[playerid][acUpdateTime] + 1500)
  7352.     {
  7353.         new ac_t, ac_s;
  7354.         #if AC_USE_AMMUNATIONS || AC_USE_CASINOS
  7355.             new ac_int = GetPlayerInterior(playerid);
  7356.         #endif
  7357.         #if AC_USE_PICKUP_WEAPONS\
  7358.             && defined Streamer_GetDistanceToItem\
  7359.             && defined Streamer_GetIntData
  7360.             new Float:ac_dist;
  7361.             if(ACInfo[playerid][acLastPickup] > MAX_PICKUPS)
  7362.             {
  7363.                 new Float:ac_x, Float:ac_y, Float:ac_z;
  7364.                 GetPlayerPos(playerid, ac_x, ac_y, ac_z);
  7365.                 Streamer_GetDistanceToItem(ac_x, ac_y, ac_z, STREAMER_TYPE_PICKUP, ACInfo[playerid][acLastPickup] - MAX_PICKUPS, ac_dist);
  7366.                 ac_t = Streamer_GetIntData(STREAMER_TYPE_PICKUP, ACInfo[playerid][acLastPickup] - MAX_PICKUPS, E_STREAMER_EXTRA_ID) - 100;
  7367.             }
  7368.         #endif
  7369.         if(!ACInfo[playerid][acDead] && (ac_s = GetPlayerWeapon(playerid)) != -1 && ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp)
  7370.         {
  7371.             #if AC_USE_AMMUNATIONS
  7372.                 new ac_m;
  7373.             #endif
  7374.             ac_s = ac_wSlot[ac_s];
  7375.             for(new ac_i, ac_w, ac_a, bool:ac_cw; ac_i <= 12; ++ac_i)
  7376.             {
  7377.                 GetPlayerWeaponData(playerid, ac_i, ac_w, ac_a);
  7378.                 if(ac_w == 39) ac_cw = true;
  7379.                 if(ac_s != ac_i)
  7380.                 {
  7381.                     if(ACInfo[playerid][acSetWeapon][ac_i] != -1)
  7382.                     {
  7383.                         if(ACInfo[playerid][acSetWeapon][ac_i] == ac_w)
  7384.                         {
  7385.                             if(ACInfo[playerid][acSet][3] == ac_w) ACInfo[playerid][acSet][3] = -1;
  7386.                             ACInfo[playerid][acSetWeapon][ac_i] = -1;
  7387.                             ACInfo[playerid][acWeapon][ac_i] = ac_w;
  7388.                         }
  7389.                         else if(ac_gtc > ACInfo[playerid][acGtcSetWeapon][ac_i] + ac_gpp)
  7390.                         {
  7391.                             if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][0])
  7392.                             {
  7393.                                 if(++ACInfo[playerid][acNOPCount][0] > AC_MAX_NOP_TIMER_WARNINGS)
  7394.                                 {
  7395.                                     #if defined DEBUG
  7396.                                         printf(DEBUG_CODE_5, playerid, "GivePlayerWeapon");
  7397.                                         printf("[Nex-AC debug] AC weapon: %d, weaponid: %d", ACInfo[playerid][acSetWeapon][ac_i], ac_w);
  7398.                                     #endif
  7399.                                     ac_KickWithCode(playerid, "", 0, 52, 13);
  7400.                                     #if defined OnCheatDetected
  7401.                                         ACInfo[playerid][acSetWeapon][ac_i] = -1;
  7402.                                     #endif
  7403.                                 }
  7404.                                 #if defined OnNOPWarning
  7405.                                     else OnNOPWarning(playerid, 13, ACInfo[playerid][acNOPCount][0]);
  7406.                                 #endif
  7407.                             }
  7408.                             else if(++ACInfo[playerid][acNOPCount][0] > AC_MAX_NOP_TIMER_WARNINGS) ACInfo[playerid][acSetWeapon][ac_i] = -1;
  7409.                         }
  7410.                     }
  7411.                     else
  7412.                     {
  7413.                         if(ACInfo[playerid][acWeapon][ac_i] != ac_w)
  7414.                         {
  7415.                             #if AC_USE_PICKUP_WEAPONS
  7416.                                 #if defined Streamer_GetDistanceToItem\
  7417.                                     && defined Streamer_GetIntData
  7418.                                 if(0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS &&
  7419.                                 ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
  7420.                                 ac_a <= (3 <= ac_i <= 5 ? ACInfo[playerid][acAmmo][ac_i] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) &&
  7421.                                 IsPlayerInRangeOfPoint(playerid, 15.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
  7422.                                 ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]) ||
  7423.                                 ACInfo[playerid][acLastPickup] > MAX_PICKUPS && ac_t == ac_w &&
  7424.                                 ac_a <= (3 <= ac_i <= 5 ? ACInfo[playerid][acAmmo][ac_i] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) && floatcmp(ac_dist, 15.0) <= 0)
  7425.                                 {
  7426.                                     ACInfo[playerid][acWeapon][ac_i] = ac_w;
  7427.                                     ACInfo[playerid][acAmmo][ac_i] = ac_a;
  7428.                                 }
  7429.                                 #else
  7430.                                 if(0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS &&
  7431.                                 ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
  7432.                                 ac_a <= (3 <= ac_i <= 5 ? ACInfo[playerid][acAmmo][ac_i] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) &&
  7433.                                 IsPlayerInRangeOfPoint(playerid, 15.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
  7434.                                 ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]))
  7435.                                 {
  7436.                                     ACInfo[playerid][acWeapon][ac_i] = ac_w;
  7437.                                     ACInfo[playerid][acAmmo][ac_i] = ac_a;
  7438.                                 }
  7439.                                 #endif
  7440.                                 else
  7441.                                 {
  7442.                             #endif
  7443.                                 if(ac_w == 0 || ac_w == 40 && ac_cw ||
  7444.                                 ac_w == 46 && ACInfo[playerid][acVeh] > 0 && ACInfo[playerid][acParachute] > 0)
  7445.                                 {
  7446.                                     ACInfo[playerid][acWeapon][ac_i] = ac_w;
  7447.                                     ACInfo[playerid][acAmmo][ac_i] = ac_a;
  7448.                                     ACInfo[playerid][acParachute] = 0;
  7449.                                 }
  7450.                                 else if(ACInfo[playerid][acACAllow][15] && !(16 <= ac_w <= 43 && ac_a == 0))
  7451.                                 {
  7452.                                     #if defined DEBUG
  7453.                                         printf("[Nex-AC debug] AC weaponid: %d, AC ammo: %d, weaponid: %d, ammo: %d",
  7454.                                         ACInfo[playerid][acWeapon][ac_i], ACInfo[playerid][acAmmo][ac_i], ac_w, ac_a);
  7455.                                     #endif
  7456.                                     ac_KickWithCode(playerid, "", 0, 15, 2);
  7457.                                     #if defined OnCheatDetected
  7458.                                         if(ACInfo[playerid][acKicked] < 1)
  7459.                                         {
  7460.                                             ACInfo[playerid][acWeapon][ac_i] = ac_w;
  7461.                                             ACInfo[playerid][acAmmo][ac_i] = ac_a;
  7462.                                         }
  7463.                                     #endif
  7464.                                 }
  7465.                             #if AC_USE_PICKUP_WEAPONS
  7466.                                 }
  7467.                             #endif
  7468.                             #undef AC_USE_PICKUP_WEAPONS
  7469.                         }
  7470.                         if(ACInfo[playerid][acGiveAmmo][ac_i] != -65535)
  7471.                         {
  7472.                             if(ACInfo[playerid][acGiveAmmo][ac_i] == ac_a ||
  7473.                             ACInfo[playerid][acGiveAmmo][ac_i] > ac_a && ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_i] + ac_gpp)
  7474.                             {
  7475.                                 ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  7476.                                 ACInfo[playerid][acAmmo][ac_i] = ac_a;
  7477.                             }
  7478.                             else if(ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_i] + ac_gpp)
  7479.                             {
  7480.                                 if(ACInfo[playerid][acACAllow][52] && ACInfo[playerid][acNOPAllow][1])
  7481.                                 {
  7482.                                     if(++ACInfo[playerid][acNOPCount][1] > AC_MAX_NOP_TIMER_WARNINGS)
  7483.                                     {
  7484.                                         #if defined DEBUG
  7485.                                             printf(DEBUG_CODE_5, playerid, "SetPlayerAmmo");
  7486.                                             printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  7487.                                             ACInfo[playerid][acGiveAmmo][ac_i], ac_a, ac_w);
  7488.                                         #endif
  7489.                                         ac_KickWithCode(playerid, "", 0, 52, 14);
  7490.                                         #if defined OnCheatDetected
  7491.                                             ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  7492.                                         #endif
  7493.                                     }
  7494.                                     #if defined OnNOPWarning
  7495.                                         else OnNOPWarning(playerid, 14, ACInfo[playerid][acNOPCount][1]);
  7496.                                     #endif
  7497.                                 }
  7498.                                 else if(++ACInfo[playerid][acNOPCount][1] > AC_MAX_NOP_TIMER_WARNINGS) ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
  7499.                             }
  7500.                         }
  7501.                         else if(16 <= ac_w <= 43)
  7502.                         {
  7503.                             if(ac_a == 0) ACInfo[playerid][acAmmo][ac_i] = 0;
  7504.                             else if(ACInfo[playerid][acACAllow][16] && ac_w != 40 &&
  7505.                             (ac_a > ACInfo[playerid][acAmmo][ac_i] || ac_a < 0 <= ACInfo[playerid][acAmmo][ac_i]) &&
  7506.                             (!ac_LagCompMode || ac_w != 38 && !(22 <= ac_w <= 34) || ac_gtc > ACInfo[playerid][acShotTime] + 3650))
  7507.                             {
  7508.                                 #if defined DEBUG
  7509.                                     printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  7510.                                     ACInfo[playerid][acAmmo][ac_i], ac_a, ac_w);
  7511.                                 #endif
  7512.                                 ac_KickWithCode(playerid, "", 0, 16, 2);
  7513.                                 #if defined OnCheatDetected
  7514.                                     if(ACInfo[playerid][acKicked] < 1) ACInfo[playerid][acAmmo][ac_i] = ac_a;
  7515.                                 #endif
  7516.                             }
  7517.                         }
  7518.                     }
  7519.                 }
  7520.                 else if(ac_w == 38 || 22 <= ac_w <= 34)
  7521.                 {
  7522.                     if((ac_a > ACInfo[playerid][acAmmo][ac_i] || ac_a < 0 <= ACInfo[playerid][acAmmo][ac_i]) &&
  7523.                     ACInfo[playerid][acGiveAmmo][ac_i] == -65535)
  7524.                     {
  7525.                         #if AC_USE_AMMUNATIONS
  7526.                             if(22 <= ac_w <= 32 && ac_InAmmuNation(playerid, ac_int) &&
  7527.                             (ac_m = ac_a - ACInfo[playerid][acAmmo][ac_i]) % ac_AmmuNationInfo[ac_w - 22][1] == 0)
  7528.                             {
  7529.                                 if(ACInfo[playerid][acSet][10] != -1) ACInfo[playerid][acSet][10] += ac_AmmuNationInfo[ac_w - 22][0] * (ac_m / ac_AmmuNationInfo[ac_w - 22][1]);
  7530.                                 else ACInfo[playerid][acSet][10] = ac_AmmuNationInfo[ac_w - 22][0] * (ac_m / ac_AmmuNationInfo[ac_w - 22][1]);
  7531.                                 ACInfo[playerid][acAmmo][ac_i] += ac_m;
  7532.                                 ACInfo[playerid][acGtc][15] = ac_gtc + 2650;
  7533.                                 ACInfo[playerid][acCheatCount][10] = 0;
  7534.                             }
  7535.                             else
  7536.                             {
  7537.                         #endif
  7538.                             if(ACInfo[playerid][acACAllow][16] && (!ac_LagCompMode || ac_gtc > ACInfo[playerid][acShotTime] + 3650))
  7539.                             {
  7540.                                 #if defined DEBUG
  7541.                                     printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
  7542.                                     ACInfo[playerid][acAmmo][ac_i], ac_a, ac_w);
  7543.                                 #endif
  7544.                                 ac_KickWithCode(playerid, "", 0, 16, 3);
  7545.                                 #if defined OnCheatDetected
  7546.                                     if(ACInfo[playerid][acKicked] < 1) ACInfo[playerid][acAmmo][ac_i] = ac_a;
  7547.                                 #endif
  7548.                             }
  7549.                         #if AC_USE_AMMUNATIONS
  7550.                             }
  7551.                         #endif
  7552.                     }
  7553.                     else if(ACInfo[playerid][acAmmo][ac_i] != 0) ACInfo[playerid][acAmmo][ac_i] = ac_a;
  7554.                 }
  7555.             }
  7556.         }
  7557.         if(ACInfo[playerid][acACAllow][35] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER &&
  7558.         GetPlayerCameraMode(playerid) == 55) ac_KickWithCode(playerid, "", 0, 35);
  7559.         ac_t = bad_GetPlayerMoney(playerid);
  7560.         #if AC_USE_AMMUNATIONS
  7561.             if(ACInfo[playerid][acSet][10] != -1)
  7562.             {
  7563.                 if(ac_t < ACInfo[playerid][acMoney] &&
  7564.                 ACInfo[playerid][acSet][10] <= ACInfo[playerid][acMoney] - ac_t) ACInfo[playerid][acSet][10] = -1;
  7565.                 else if(ac_gtc > ACInfo[playerid][acGtc][15] + ac_gpp)
  7566.                 {
  7567.                     if(ACInfo[playerid][acACAllow][15])
  7568.                     {
  7569.                         if(++ACInfo[playerid][acCheatCount][10] > AC_MAX_NOP_TIMER_WARNINGS)
  7570.                         {
  7571.                             #if defined DEBUG
  7572.                                 printf("[Nex-AC debug] Money: %d, old money: %d, price: %d",
  7573.                                 ac_t, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][10]);
  7574.                             #endif
  7575.                             ac_KickWithCode(playerid, "", 0, 15, 4);
  7576.                             #if defined OnCheatDetected
  7577.                                 ACInfo[playerid][acSet][10] = -1;
  7578.                             #endif
  7579.                         }
  7580.                         #if defined OnCheatWarning
  7581.                             else OnCheatWarning(playerid, "", 0, 15, 4, ACInfo[playerid][acCheatCount][10]);
  7582.                         #endif
  7583.                     }
  7584.                     else if(++ACInfo[playerid][acCheatCount][10] > AC_MAX_NOP_TIMER_WARNINGS) ACInfo[playerid][acSet][10] = -1;
  7585.                 }
  7586.             }
  7587.         #endif
  7588.         #if AC_USE_TUNING_GARAGES
  7589.             if(ACInfo[playerid][acSet][12] != -1)
  7590.             {
  7591.                 if(ac_t < ACInfo[playerid][acMoney] &&
  7592.                 ACInfo[playerid][acSet][12] <= ACInfo[playerid][acMoney] - ac_t) ACInfo[playerid][acSet][12] = -1;
  7593.                 else if(ac_gtc > ACInfo[playerid][acGtc][17] + ac_gpp)
  7594.                 {
  7595.                     if(ACInfo[playerid][acACAllow][23])
  7596.                     {
  7597.                         if(++ACInfo[playerid][acCheatCount][12] > AC_MAX_NOP_TIMER_WARNINGS)
  7598.                         {
  7599.                             #if defined DEBUG
  7600.                                 printf("[Nex-AC debug] Money: %d, old money: %d, component price: %d",
  7601.                                 ac_t, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][12]);
  7602.                             #endif
  7603.                             ac_KickWithCode(playerid, "", 0, 23, 6);
  7604.                             #if defined OnCheatDetected
  7605.                                 ACInfo[playerid][acSet][12] = -1;
  7606.                             #endif
  7607.                         }
  7608.                         #if defined OnCheatWarning
  7609.                             else OnCheatWarning(playerid, "", 0, 23, 6, ACInfo[playerid][acCheatCount][12]);
  7610.                         #endif
  7611.                     }
  7612.                     else if(++ACInfo[playerid][acCheatCount][12] > AC_MAX_NOP_TIMER_WARNINGS) ACInfo[playerid][acSet][12] = -1;
  7613.                 }
  7614.             }
  7615.         #endif
  7616.         #undef AC_USE_TUNING_GARAGES
  7617.         #undef AC_MAX_NOP_TIMER_WARNINGS
  7618.         if(ACInfo[playerid][acNOPCount][11] > 0) ACInfo[playerid][acNOPCount][11]--;
  7619.         else
  7620.         {
  7621.             if(ACInfo[playerid][acACAllow][14] &&
  7622.             ac_t > ACInfo[playerid][acMoney] && (!ACInfo[playerid][acStuntBonus] || ACInfo[playerid][acVeh] == 0))
  7623.             {
  7624.                 #if AC_USE_CASINOS
  7625.                     if(!ac_InCasino(playerid, ac_int))
  7626.                     {
  7627.                 #endif
  7628.                     #if defined DEBUG
  7629.                         printf("[Nex-AC debug] AC money: %d, money: %d, stunt bonus: %d, veh: %d, playerid: %d",
  7630.                         ACInfo[playerid][acMoney], ac_t, ACInfo[playerid][acStuntBonus], ACInfo[playerid][acVeh], playerid);
  7631.                     #endif
  7632.                     #if defined OnCheatDetected
  7633.                         ac_KickWithCode(playerid, "", 0, 14);
  7634.                     #endif
  7635.                     ac_t = ACInfo[playerid][acMoney];
  7636.                     ResetPlayerMoney(playerid);
  7637.                     GivePlayerMoney(playerid, ac_t);
  7638.                 #if AC_USE_CASINOS
  7639.                     }
  7640.                 #endif
  7641.             }
  7642.             ACInfo[playerid][acMoney] = ac_t;
  7643.         }
  7644.     }
  7645.     ACInfo[playerid][acCheatCount][1] = ACInfo[playerid][acCheatCount][2] = 0;
  7646.     if(ACInfo[playerid][acCheatCount][16] > 0) ACInfo[playerid][acCheatCount][16]--;
  7647.     #if defined SetPlayerTimerEx_
  7648.         ACInfo[playerid][acTimerID] = SetPlayerTimerEx_(playerid, "ac_Timer", 0, 1000, 1, "i", playerid);
  7649.     #else
  7650.         ACInfo[playerid][acTimerID] = SetTimerEx("ac_Timer", 1000, false, "i", playerid);
  7651.     #endif
  7652.     return 1;
  7653. }
  7654.  
  7655. //Don't make changes in this public
  7656. //To customize the punishments, declare 'OnCheatDetected' in your script
  7657. ac_fpublic ac_OnCheatDetected(playerid, ip_address[], type, code)
  7658. {
  7659.     if(type) BlockIpAddress(ip_address, 0);
  7660.     else
  7661.     {
  7662.         switch(code)
  7663.         {
  7664.             case 40: SendClientMessage(playerid, AC_DEFAULT_COLOR, MAX_CONNECTS_MSG);
  7665.             case 41: SendClientMessage(playerid, AC_DEFAULT_COLOR, UNKNOWN_CLIENT_MSG);
  7666.             default:
  7667.             {
  7668.                 static ac_strtmp[sizeof KICK_MSG];
  7669.                 format(ac_strtmp, sizeof ac_strtmp, KICK_MSG, code);
  7670.                 SendClientMessage(playerid, AC_DEFAULT_COLOR, ac_strtmp);
  7671.                 #undef AC_DEFAULT_COLOR
  7672.             }
  7673.         }
  7674.         AntiCheatKickWithDesync(playerid, code);
  7675.     }
  7676.     return 1;
  7677. }
  7678.  
  7679. ac_fpublic ac_KickTimer(playerid) return Kick(playerid);
  7680.  
  7681. #undef ac_fpublic
  7682.  
  7683. stock AntiCheatGetHealth(playerid, &Float:health)
  7684. {
  7685.     if(!IsPlayerConnected(playerid)) return 0;
  7686.     health = ACInfo[playerid][acHealth];
  7687.     return 1;
  7688. }
  7689.  
  7690. stock AntiCheatGetArmour(playerid, &Float:armour)
  7691. {
  7692.     if(!IsPlayerConnected(playerid)) return 0;
  7693.     armour = ACInfo[playerid][acArmour];
  7694.     return 1;
  7695. }
  7696.  
  7697. stock AntiCheatGetVehicleHealth(vehicleid, &Float:health)
  7698. {
  7699.     if(GetVehicleModel(vehicleid) < 400) return 0;
  7700.     health = ACVehInfo[vehicleid][acHealth];
  7701.     return 1;
  7702. }
  7703.  
  7704. stock AntiCheatGetWeaponData(playerid, slot, &weapons, &ammo)
  7705. {
  7706.     if(!IsPlayerConnected(playerid)) return 0;
  7707.     weapons = ACInfo[playerid][acWeapon][slot];
  7708.     ammo = ACInfo[playerid][acAmmo][slot];
  7709.     return 1;
  7710. }
  7711.  
  7712. stock AntiCheatGetSpawnPos(playerid, &Float:x, &Float:y, &Float:z)
  7713. {
  7714.     if(!IsPlayerConnected(playerid)) return 0;
  7715.     x = ACInfo[playerid][acSpawnPosX];
  7716.     y = ACInfo[playerid][acSpawnPosY];
  7717.     z = ACInfo[playerid][acSpawnPosZ];
  7718.     return 1;
  7719. }
  7720.  
  7721. stock AntiCheatGetSpawnWeapon(playerid, &weapon1, &weapon1_ammo, &weapon2, &weapon2_ammo, &weapon3, &weapon3_ammo)
  7722. {
  7723.     if(!IsPlayerConnected(playerid)) return 0;
  7724.     weapon1 = ACInfo[playerid][acSpawnWeapon1];
  7725.     weapon1_ammo = ACInfo[playerid][acSpawnAmmo1];
  7726.     weapon2 = ACInfo[playerid][acSpawnWeapon2];
  7727.     weapon2_ammo = ACInfo[playerid][acSpawnAmmo2];
  7728.     weapon3 = ACInfo[playerid][acSpawnWeapon3];
  7729.     weapon3_ammo = ACInfo[playerid][acSpawnAmmo3];
  7730.     return 1;
  7731. }
  7732.  
  7733. stock AntiCheatGetPos(playerid, &Float:x, &Float:y, &Float:z)
  7734. {
  7735.     if(!IsPlayerConnected(playerid)) return 0;
  7736.     x = ACInfo[playerid][acPosX];
  7737.     y = ACInfo[playerid][acPosY];
  7738.     z = ACInfo[playerid][acPosZ];
  7739.     return 1;
  7740. }
  7741.  
  7742. stock AntiCheatGetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z)
  7743. {
  7744.     if(GetVehicleModel(vehicleid) < 400) return 0;
  7745.     x = ACVehInfo[vehicleid][acVelX];
  7746.     y = ACVehInfo[vehicleid][acVelY];
  7747.     z = ACVehInfo[vehicleid][acVelZ];
  7748.     return 1;
  7749. }
  7750.  
  7751. static ac_IsAnAircraft(modelid) return (417 <= modelid <= 593 && 1 <= ac_vType[modelid - 400] <= 2);
  7752.  
  7753. static ac_IsABoat(modelid) return (430 <= modelid <= 595 && ac_vType[modelid - 400] == 3);
  7754.  
  7755. static ac_IsABicycle(modelid) return (481 <= modelid <= 510 && ac_vType[modelid - 400] == 4);
  7756.  
  7757. static ac_IsABike(modelid) return (448 <= modelid <= 586 && 4 <= ac_vType[modelid - 400] <= 5);
  7758.  
  7759. static ac_GetSpeed(Float:ac_x, Float:ac_y, Float:ac_z = 0.0) return floatround(floatmul(VectorSize(ac_x, ac_y, ac_z), 179.28625));
  7760.  
  7761. static ac_IsVehicleSeatOccupied(vehicleid, seat)
  7762. {
  7763.     #if defined foreach
  7764.         foreach(new ac_i : Player)
  7765.         {
  7766.             if(ACInfo[ac_i][acVeh] == vehicleid && ACInfo[ac_i][acSeat] == seat) return 1;
  7767.         }
  7768.     #else
  7769.         for(new ac_i = GetPlayerPoolSize(); ac_i >= 0; --ac_i)
  7770.         {
  7771.             if(IsPlayerInVehicle(ac_i, vehicleid) && ACInfo[ac_i][acSeat] == seat) return 1;
  7772.         }
  7773.     #endif
  7774.     return 0;
  7775. }
  7776.  
  7777. #if AC_USE_RESTAURANTS
  7778.     static ac_InRestaurant(playerid, interiorid)
  7779.     {
  7780.         new ac_i;
  7781.         switch(interiorid)
  7782.         {
  7783.             case 5: ac_i = 0;
  7784.             case 9: ac_i = 1;
  7785.             case 10: ac_i = 2;
  7786.             default: return 0;
  7787.         }
  7788.         return IsPlayerInRangeOfPoint(playerid, 3.0, ac_Restaurants[ac_i][0], ac_Restaurants[ac_i][1], ac_Restaurants[ac_i][2]);
  7789.     }
  7790. #endif
  7791. #undef AC_USE_RESTAURANTS
  7792.  
  7793. #if AC_USE_AMMUNATIONS
  7794.     static ac_InAmmuNation(playerid, interiorid)
  7795.     {
  7796.         new ac_i, ac_s;
  7797.         switch(interiorid)
  7798.         {
  7799.             case 1: ac_i = 0, ac_s = -1;
  7800.             case 4: ac_i = 1, ac_s = 0;
  7801.             case 6: ac_i = 3, ac_s = 1;
  7802.             default: return 0;
  7803.         }
  7804.         for(; ac_i > ac_s; --ac_i)
  7805.         {
  7806.             if(IsPlayerInRangeOfPoint(playerid, 3.0, ac_AmmuNations[ac_i][0],
  7807.             ac_AmmuNations[ac_i][1], ac_AmmuNations[ac_i][2])) return 1;
  7808.         }
  7809.         return 0;
  7810.     }
  7811. #endif
  7812. #undef AC_USE_AMMUNATIONS
  7813.  
  7814. #if AC_USE_PAYNSPRAY
  7815.     static ac_InPayNSpray(playerid, interiorid)
  7816.     {
  7817.         if(interiorid == 0)
  7818.         {
  7819.             for(new ac_i = sizeof(ac_PayNSpray) - 1; ac_i >= 0; --ac_i)
  7820.             {
  7821.                 if(IsPlayerInRangeOfPoint(playerid, 7.5, ac_PayNSpray[ac_i][0], ac_PayNSpray[ac_i][1], ac_PayNSpray[ac_i][2])) return 1;
  7822.             }
  7823.         }
  7824.         return 0;
  7825.     }
  7826. #endif
  7827. #undef AC_USE_PAYNSPRAY
  7828.  
  7829. #if AC_USE_VENDING_MACHINES
  7830.     static ac_NearVendingMachine(playerid, interiorid)
  7831.     {
  7832.         new ac_i, ac_s;
  7833.         switch(interiorid)
  7834.         {
  7835.             case 0: ac_i = 44, ac_s = -1;
  7836.             case 1: ac_i = 51, ac_s = 44;
  7837.             case 2: ac_i = 52, ac_s = 51;
  7838.             case 3: ac_i = 58, ac_s = 52;
  7839.             case 6: ac_i = 60, ac_s = 58;
  7840.             case 7: ac_i = 61, ac_s = 60;
  7841.             case 15: ac_i = 62, ac_s = 61;
  7842.             case 16: ac_i = 65, ac_s = 62;
  7843.             case 17: ac_i = 72, ac_s = 65;
  7844.             case 18: ac_i = 74, ac_s = 72;
  7845.             default: return 0;
  7846.         }
  7847.         for(; ac_i > ac_s; --ac_i)
  7848.         {
  7849.             if(IsPlayerInRangeOfPoint(playerid, 1.5, ac_vMachines[ac_i][0], ac_vMachines[ac_i][1], ac_vMachines[ac_i][2])) return 1;
  7850.         }
  7851.         return 0;
  7852.     }
  7853. #endif
  7854. #undef AC_USE_VENDING_MACHINES
  7855.  
  7856. #if AC_USE_CASINOS
  7857.     static ac_InCasino(playerid, interiorid)
  7858.     {
  7859.         new ac_i, ac_s;
  7860.         switch(interiorid)
  7861.         {
  7862.             case 1: ac_i = 41, ac_s = -1;
  7863.             case 10: ac_i = 61, ac_s = 41;
  7864.             case 12: ac_i = 70, ac_s = 61;
  7865.             default: return 0;
  7866.         }
  7867.         for(; ac_i > ac_s; --ac_i)
  7868.         {
  7869.             if(IsPlayerInRangeOfPoint(playerid, ac_Casinos[ac_i][3], ac_Casinos[ac_i][0],
  7870.             ac_Casinos[ac_i][1], ac_Casinos[ac_i][2])) return 1;
  7871.         }
  7872.         return 0;
  7873.     }
  7874. #endif
  7875. #undef AC_USE_CASINOS
  7876.  
  7877. static ac_IsCompatible(modelid, componentid)
  7878. {
  7879.     if(modelid > 0)
  7880.     {
  7881.         switch(componentid)
  7882.         {
  7883.             case 1000..1191:
  7884.             {
  7885.                 componentid -= 1000;
  7886.                 if(ac_vMods[(modelid - 400) * 6 + (componentid >>> 5)] & 1 << (componentid & 0b00011111)) return 1;
  7887.             }
  7888.             case 1192, 1193:
  7889.             {
  7890.                 if(modelid == 576) return 1;
  7891.             }
  7892.         }
  7893.     }
  7894.     return 0;
  7895. }
  7896.  
  7897. static ac_GetMaxPassengers(modelid)
  7898. {
  7899.     if(modelid > 0)
  7900.     {
  7901.         modelid -= 400;
  7902.         return ((ac_MaxPassengers[modelid >>> 3] >>> ((modelid & 7) << 2)) & 0xF);
  7903.     }
  7904.     return 0xF;
  7905. }
  7906.  
  7907. static ac_IpToInt(const s_szIP[])
  7908. {
  7909.     new ac_aiBytes[1], ac_iPos;
  7910.     ac_aiBytes{0} = strval(s_szIP[ac_iPos]);
  7911.     while(ac_iPos < 15 && s_szIP[ac_iPos++] != '.'){}
  7912.     ac_aiBytes{1} = strval(s_szIP[ac_iPos]);
  7913.     while(ac_iPos < 15 && s_szIP[ac_iPos++] != '.'){}
  7914.     ac_aiBytes{2} = strval(s_szIP[ac_iPos]);
  7915.     while(ac_iPos < 15 && s_szIP[ac_iPos++] != '.'){}
  7916.     ac_aiBytes{3} = strval(s_szIP[ac_iPos]);
  7917.     return ac_aiBytes[0];
  7918. }
  7919.  
  7920. static ac_FloodDetect(playerid, publicid)
  7921. {
  7922.     if(ACInfo[playerid][acKicked] < 1)
  7923.     {
  7924.         if(++ACInfo[playerid][acFloodCount][publicid] > ac_Mtfc[publicid][1])
  7925.         {
  7926.             #if defined DEBUG
  7927.                 printf(DEBUG_CODE_1, playerid, ac_Mtfc[publicid][1], publicid);
  7928.                 #if !defined mysql_included
  7929.                     #undef DEBUG
  7930.                 #endif
  7931.             #endif
  7932.             #if defined OnCheatDetected
  7933.                 ac_KickWithCode(playerid, "", 0, 49, publicid);
  7934.                 ACInfo[playerid][acFloodCount][publicid] = ACInfo[playerid][acFloodCount][27] = 0;
  7935.             #else
  7936.                 return ac_KickWithCode(playerid, "", 0, 49, publicid);
  7937.             #endif
  7938.         }
  7939.         #if defined OnFloodWarning
  7940.             else OnFloodWarning(playerid, publicid, ACInfo[playerid][acFloodCount][publicid]);
  7941.         #endif
  7942.         ACInfo[playerid][acCall][publicid] = ACInfo[playerid][acCall][27] = GetTickCount();
  7943.     }
  7944.     return 0;
  7945. }
  7946.  
  7947. static ac_KickWithCode(playerid, ip_address[], type, code, code2 = 0)
  7948. {
  7949.     if(type == 0 && (!IsPlayerConnected(playerid) || ACInfo[playerid][acKicked] > 0)) return 0;
  7950.     ac_sInfo[5]++;
  7951.     switch(code)
  7952.     {
  7953.         case 0..35, 37, 39, 51: ac_sInfo[0]++;
  7954.         case 36, 38, 40, 41, 50: ac_sInfo[4]++;
  7955.         case 42: ac_sInfo[1]++;
  7956.         case 47..49: ac_sInfo[3]++;
  7957.         case 43..46: ac_sInfo[2]++;
  7958.     }
  7959.     #if defined NO_SUSPICION_LOGS
  7960.         #pragma unused code2
  7961.     #else
  7962.         new ac_strtmp[6];
  7963.         if(code2) format(ac_strtmp, sizeof ac_strtmp, " (%d)", code2);
  7964.         if(type) printf(SUSPICION_2, ip_address, code, ac_strtmp);
  7965.         else printf(SUSPICION_1, playerid, code, ac_strtmp);
  7966.     #endif
  7967.     #if defined OnCheatDetected
  7968.         OnCheatDetected(playerid, ip_address, type, code);
  7969.     #else
  7970.         ac_OnCheatDetected(playerid, ip_address, type, code);
  7971.     #endif
  7972.     return 0;
  7973. }
  7974.  
  7975. static ac_LoadCfg()
  7976. {
  7977.     static ac_strtmp[10];
  7978.     new ac_i, ac_string[415], File:ac_cfgFile;
  7979.     if(fexist(AC_CONFIG_FILE))
  7980.     {
  7981.         if((ac_cfgFile = fopen(AC_CONFIG_FILE, io_read)))
  7982.         {
  7983.             #if defined sscanf
  7984.                 new ac_j;
  7985.             #endif
  7986.             while(fread(ac_cfgFile, ac_string) > 0)
  7987.             {
  7988.                 #if defined sscanf
  7989.                     sscanf(ac_string, "i'//'i", ac_j, ac_i);
  7990.                     ac_ACAllow[ac_i] = !!ac_j;
  7991.                 #else
  7992.                     if((ac_i = strfind(ac_string, "//")) != -1)
  7993.                     {
  7994.                         strmid(ac_strtmp, ac_string, ac_i + 2, strlen(ac_string));
  7995.                         if(0 <= (ac_i = strval(ac_strtmp)) < sizeof ac_ACAllow) ac_ACAllow[ac_i] = !!strval(ac_string);
  7996.                     }
  7997.                 #endif
  7998.             }
  7999.             fclose(ac_cfgFile);
  8000.         }
  8001.         else return 0;
  8002.     }
  8003.     else if((ac_cfgFile = fopen(AC_CONFIG_FILE, io_write)))
  8004.     {
  8005.         #undef AC_CONFIG_FILE
  8006.         for(; ac_i < sizeof ac_ACAllow; ++ac_i)
  8007.         {
  8008.             format(ac_strtmp, sizeof ac_strtmp, "%d //%d\r\n", ac_ACAllow[ac_i], ac_i);
  8009.             strcat(ac_string, ac_strtmp);
  8010.         }
  8011.         fwrite(ac_cfgFile, ac_string);
  8012.         fclose(ac_cfgFile);
  8013.     }
  8014.     else return 0;
  8015.     return 1;
  8016. }
  8017.  
  8018. #endif
Advertisement
Add Comment
Please, Sign In to add comment