AMXX-BG.INFO reaimdetector.inc Raw include

reaimdetector.inc

Original include source with line numbers.

Back Download .inc
1 #if defined _reaimdetector_included
2 #endinput
3 #endif
4
5 #define _reaimdetector_included
6
7 #if AMXX_VERSION_NUM >= 175
8 #pragma reqlib reaimdetector
9 #if !defined AMXMODX_NOAUTOLOAD
10 #pragma loadlib reaimdetector
11 #endif
12 #else
13 #pragma library reaimdetector
14 #endif
15
16 enum NotifyType
17 {
18 WARNING,
19 DETECT
20 };
21
22 enum PunishType
23 {
24 AIMBOT,
25 NOSPREAD
26 };
27
28 enum ResetType
29 {
30 KILLED,
31 SHOTS,
32 TIME
33 };
34
35 enum ADSet
36 {
37 AimDetection,
38 AimSens,
39 AimMultiWarns,
40 AimNotifyWarns,
41 AimMaxWarns,
42 AimShotsReset,
43 AimKillsReset,
44 AimTimeReset,
45 NoSpreadDetection,
46 NoSpreadNotifyWarns,
47 NoSpreadMaxWarns,
48 SendProtectionWeapon,
49 CrashCheat
50 };
51
52 enum ADClient
53 {
54 AimCheck,
55 AimWarn,
56 AimShots,
57 AimKills,
58 AimTimeTask,
59 NoSpreadCheck,
60 NoSpreadWarn
61 };
62
63 /*
64 * Module initialization.
65 *
66 * @param Version
67 * @param Map
68 *
69 * @noreturn
70 */
71 forward ad_init(const Version[], const Map[]);
72
73 /*
74 * Notifies about warnings the player, also detection aim.
75 *
76 * @param index Client index
77 * @param pType Punish type
78 * @param nType Notify type
79 * @param Kills The amount of kills a enemies
80 * @param Shots The amount of clean shots
81 * @param Warn The current amount of warnings for player
82 *
83 * @noreturn
84 */
85 forward ad_notify(const index, const PunishType:pType, const NotifyType:nType, const Kills, const Shots, const Warn);
86
87 /*
88 * Reset the player warnings.
89 *
90 * @param index Client index
91 * @param rType Reset type
92 * @param Kills The amount of kills a enemies
93 * @param Shots The amount of clean shots
94 *
95 * @noreturn
96 */
97 forward ad_aim_reset_warn(const index, const ResetType:rType, const Kills, const Shots);
98
99 /*
100 * Returns setting from config.
101 *
102 * @param Type enum ADSet
103 *
104 */
105 native ad_get_cfg(const ADSet:Type);
106
107 /*
108 * Sets setting config.
109 *
110 * @param Type enum ADSet
111 * @param Value Type int
112 *
113 * @noreturn
114 *
115 */
116 native ad_set_cfg(const ADSet:Type, const Value);
117
118 /*
119 * Returns a data of the player.
120 *
121 * @param index Client index
122 * @param Type enum ADClient
123 *
124 */
125 native ad_get_client(const index, const ADClient:Type);
126
127 /*
128 * Sets a data of the player.
129 *
130 * @param index Client index
131 * @param Type enum ADClient
132 * @param Value Type int
133 *
134 * @noreturn
135 *
136 */
137 native ad_set_client(const index, const ADClient:Type, const Value);
138
139 #define REAIMDETECTOR_VERSION "0.2.2"
140 #define REAIMDETECTOR_VERSION_MAJOR 4
141 #define REAIMDETECTOR_VERSION_MINOR 0
142
143 public __reaimdetector_version_check(const majorVersion, const minorVersion)
144 {
145 if (majorVersion != REAIMDETECTOR_VERSION_MAJOR)
146 {
147 new temp[512];
148 formatex(temp, sizeof temp - 1, "[ReAimDetector]: Api major version mismatch; expected %d, real %d", REAIMDETECTOR_VERSION_MAJOR, majorVersion);
149 set_fail_state(temp);
150 return;
151 }
152
153 if (minorVersion < REAIMDETECTOR_VERSION_MINOR)
154 {
155 new temp[512];
156 formatex(temp, sizeof temp - 1, "[ReAimDetector]: Api minor version mismatch; expected at least %d, real %d", REAIMDETECTOR_VERSION_MINOR, minorVersion);
157 set_fail_state(temp);
158 return;
159 }
160 }