Advertisement
Guest User

Nex-AC

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