[Half-Life AMXX] / include / amxconst.inc Repository:
ViewVC logotype

Annotation of /include/amxconst.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17 - (view) (download)

1 : ian 1 /* AMX Mod X constants
2 :     *
3 :     * by the AMX Mod X Development Team
4 :     * originally developed by OLO
5 :     *
6 :     * This file is provided as is (no warranties).
7 :     */
8 :    
9 :     #if defined _amxconst_included
10 :     #endinput
11 :     #endif
12 :     #define _amxconst_included
13 :    
14 : ian 17 #include <svn_version>
15 : ian 1
16 :     #define M_PI 3.1415926535
17 :    
18 :     #define ADMIN_ALL 0 /* everyone */
19 :     #define ADMIN_IMMUNITY (1<<0) /* flag "a" */
20 :     #define ADMIN_RESERVATION (1<<1) /* flag "b" */
21 :     #define ADMIN_KICK (1<<2) /* flag "c" */
22 :     #define ADMIN_BAN (1<<3) /* flag "d" */
23 :     #define ADMIN_SLAY (1<<4) /* flag "e" */
24 :     #define ADMIN_MAP (1<<5) /* flag "f" */
25 :     #define ADMIN_CVAR (1<<6) /* flag "g" */
26 :     #define ADMIN_CFG (1<<7) /* flag "h" */
27 :     #define ADMIN_CHAT (1<<8) /* flag "i" */
28 :     #define ADMIN_VOTE (1<<9) /* flag "j" */
29 :     #define ADMIN_PASSWORD (1<<10) /* flag "k" */
30 :     #define ADMIN_RCON (1<<11) /* flag "l" */
31 :     #define ADMIN_LEVEL_A (1<<12) /* flag "m" */
32 :     #define ADMIN_LEVEL_B (1<<13) /* flag "n" */
33 :     #define ADMIN_LEVEL_C (1<<14) /* flag "o" */
34 :     #define ADMIN_LEVEL_D (1<<15) /* flag "p" */
35 :     #define ADMIN_LEVEL_E (1<<16) /* flag "q" */
36 :     #define ADMIN_LEVEL_F (1<<17) /* flag "r" */
37 :     #define ADMIN_LEVEL_G (1<<18) /* flag "s" */
38 :     #define ADMIN_LEVEL_H (1<<19) /* flag "t" */
39 :     #define ADMIN_MENU (1<<20) /* flag "u" */
40 :     #define ADMIN_ADMIN (1<<24) /* flag "y" */
41 :     #define ADMIN_USER (1<<25) /* flag "z" */
42 :    
43 :     #define FLAG_KICK (1<<0) /* flag "a" */
44 :     #define FLAG_TAG (1<<1) /* flag "b" */
45 :     #define FLAG_AUTHID (1<<2) /* flag "c" */
46 :     #define FLAG_IP (1<<3) /* flag "d" */
47 :     #define FLAG_NOPASS (1<<4) /* flag "e" */
48 :    
49 :     #define PLUGIN_CONTINUE 0 /* Results returned by public functions */
50 :     #define PLUGIN_HANDLED 1 /* stop other plugins */
51 :     #define PLUGIN_HANDLED_MAIN 2 /* to use in client_command(), continue all plugins but stop the command */
52 :    
53 :     /* Flags for register_cvar() */
54 :     #define FCVAR_ARCHIVE 1 /* set to cause it to be saved to vars.rc */
55 :     #define FCVAR_USERINFO 2 /* changes the client's info string */
56 :     #define FCVAR_SERVER 4 /* notifies players when changed */
57 :     #define FCVAR_EXTDLL 8 /* defined by external DLL */
58 :     #define FCVAR_CLIENTDLL 16 /* defined by the client dll */
59 :     #define FCVAR_PROTECTED 32 /* It's a server cvar, but we don't send the data since it's a password, etc. Sends 1 if it's not bland/zero, 0 otherwise as value */
60 :     #define FCVAR_SPONLY 64 /* This cvar cannot be changed by clients connected to a multiplayer server. */
61 :     #define FCVAR_PRINTABLEONLY 128 /* This cvar's string cannot contain unprintable characters ( e.g., used for player name etc ). */
62 :     #define FCVAR_UNLOGGED 256 /* If this is a FCVAR_SERVER, don't log changes to the log file / console if we are creating a log */
63 :    
64 :    
65 :     /* Id of weapons in CS */
66 :     #define CSW_P228 1
67 :     #define CSW_SCOUT 3
68 :     #define CSW_HEGRENADE 4
69 :     #define CSW_XM1014 5
70 :     #define CSW_C4 6
71 :     #define CSW_MAC10 7
72 :     #define CSW_AUG 8
73 :     #define CSW_SMOKEGRENADE 9
74 :     #define CSW_ELITE 10
75 :     #define CSW_FIVESEVEN 11
76 :     #define CSW_UMP45 12
77 :     #define CSW_SG550 13
78 :     #define CSW_GALI 14
79 :     #define CSW_GALIL 14
80 :     #define CSW_FAMAS 15
81 :     #define CSW_USP 16
82 :     #define CSW_GLOCK18 17
83 :     #define CSW_AWP 18
84 :     #define CSW_MP5NAVY 19
85 :     #define CSW_M249 20
86 :     #define CSW_M3 21
87 :     #define CSW_M4A1 22
88 :     #define CSW_TMP 23
89 :     #define CSW_G3SG1 24
90 :     #define CSW_FLASHBANG 25
91 :     #define CSW_DEAGLE 26
92 :     #define CSW_SG552 27
93 :     #define CSW_AK47 28
94 :     #define CSW_KNIFE 29
95 :     #define CSW_P90 30
96 :     #define CSW_VEST 31
97 :     #define CSW_VESTHELM 32
98 :    
99 :     #define HIW_BERETTA 1
100 :     #define HIW_SPAS12 2
101 :     #define HIW_M4A1 3
102 :     #define HIW_MP5A4 4
103 :     #define HIW_MP5SD5 5
104 :     #define HIW_AK47 6
105 :     #define HIW_AKS74U 7
106 :     #define HIW_GLOCK 8
107 :     #define HIW_M11 9
108 :     #define HIW_M11SD 10
109 :     #define HIW_PSG1 11
110 :     #define HIW_ZASTAVA 12
111 :     #define HIW_M16A2 13
112 :     #define HIW_REMINGTON 14
113 :     #define HIW_NATOGREN 15
114 :     #define HIW_TANGOGREN 16
115 :     #define HIW_FLASHBANG 17
116 :    
117 :     /* Parts of body for hits */
118 :     #define HIT_GENERIC 0 /* none */
119 :     #define HIT_HEAD 1
120 :     #define HIT_CHEST 2
121 :     #define HIT_STOMACH 3
122 :     #define HIT_LEFTARM 4
123 :     #define HIT_RIGHTARM 5
124 :     #define HIT_LEFTLEG 6
125 :     #define HIT_RIGHTLEG 7
126 :    
127 :     /* Constants for emit_sound() */
128 :     /* Channels */
129 :     #define CHAN_AUTO 0
130 :     #define CHAN_WEAPON 1
131 :     #define CHAN_VOICE 2
132 :     #define CHAN_ITEM 3
133 :     #define CHAN_BODY 4
134 :     #define CHAN_STREAM 5 /* allocate stream channel from the static or dynamic area */
135 :     #define CHAN_STATIC 6 /* allocate channel from the static area */
136 :     #define CHAN_NETWORKVOICE_BASE 7 /* voice data coming across the network */
137 :     #define CHAN_NETWORKVOICE_END 500 /* network voice data reserves slots (CHAN_NETWORKVOICE_BASE through CHAN_NETWORKVOICE_END). */
138 :    
139 :     /* Attenuation values */
140 :     #define ATTN_NONE 0.00
141 :     #define ATTN_NORM 0.80
142 :     #define ATTN_IDLE 2.00
143 :     #define ATTN_STATIC 1.25
144 :    
145 :     /* Pitch values */
146 :     #define PITCH_NORM 100 /* non-pitch shifted */
147 :     #define PITCH_LOW 95 /* other values are possible - 0-255, where 255 is very high */
148 :     #define PITCH_HIGH 120
149 :    
150 :     /* Volume values */
151 :     #define VOL_NORM 1.0
152 :    
153 :     /* Menu keys */
154 :     #define MENU_KEY_1 (1<<0)
155 :     #define MENU_KEY_2 (1<<1)
156 :     #define MENU_KEY_3 (1<<2)
157 :     #define MENU_KEY_4 (1<<3)
158 :     #define MENU_KEY_5 (1<<4)
159 :     #define MENU_KEY_6 (1<<5)
160 :     #define MENU_KEY_7 (1<<6)
161 :     #define MENU_KEY_8 (1<<7)
162 :     #define MENU_KEY_9 (1<<8)
163 :     #define MENU_KEY_0 (1<<9)
164 :    
165 :     #define LANG_SERVER 0
166 :     #define LANG_PLAYER -1
167 :    
168 :     /* Destination types for client_print() */
169 :     enum {
170 :     print_notify = 1,
171 :     print_console,
172 :     print_chat,
173 :     print_center,
174 : ian 17 };
175 : ian 1
176 :     /* Destination types for engclient_print() */
177 :     enum {
178 :     engprint_console = 0,
179 :     engprint_center,
180 :     engprint_chat,
181 : ian 17 };
182 : ian 1
183 :     /* Render for set_user_rendering() */
184 :     enum {
185 :     kRenderNormal = 0, /* src */
186 :     kRenderTransColor, /* c*a+dest*(1-a) */
187 :     kRenderTransTexture, /* src*a+dest*(1-a) */
188 :     kRenderGlow, /* src*a+dest -- No Z buffer checks */
189 :     kRenderTransAlpha, /* src*srca+dest*(1-srca) */
190 :     kRenderTransAdd, /* src*a+dest */
191 : ian 17 };
192 : ian 1
193 :     /* Fx for set_user_rendering() */
194 :     enum {
195 :     kRenderFxNone = 0,
196 :     kRenderFxPulseSlow,
197 :     kRenderFxPulseFast,
198 :     kRenderFxPulseSlowWide,
199 :     kRenderFxPulseFastWide,
200 :     kRenderFxFadeSlow,
201 :     kRenderFxFadeFast,
202 :     kRenderFxSolidSlow,
203 :     kRenderFxSolidFast,
204 :     kRenderFxStrobeSlow,
205 :     kRenderFxStrobeFast,
206 :     kRenderFxStrobeFaster,
207 :     kRenderFxFlickerSlow,
208 :     kRenderFxFlickerFast,
209 :     kRenderFxNoDissipation,
210 :     kRenderFxDistort, /* Distort/scale/translate flicker */
211 :     kRenderFxHologram, /* kRenderFxDistort + distance fade */
212 :     kRenderFxDeadPlayer, /* kRenderAmt is the player index */
213 :     kRenderFxExplode, /* Scale up really big! */
214 :     kRenderFxGlowShell, /* Glowing Shell */
215 :     kRenderFxClampMinScale, /* Keep this sprite from getting very small (SPRITES only!) */
216 : ian 17 };
217 : ian 1
218 :     /* Type for force_unmodified() */
219 :     enum {
220 :     force_exactfile = 0, /* File on client must exactly match server's file */
221 :     force_model_samebounds, /* For model files only, the geometry must fit in the same bbox */
222 :     force_model_specifybounds, /* For model files only, the geometry must fit in the specified bbox */
223 : ian 17 };
224 : ian 1
225 :     /* Status for get_module() */
226 :     enum {
227 :     module_none = 0,
228 :     module_query,
229 :     module_badload,
230 :     module_loaded,
231 :     module_noinfo,
232 :     module_noquery,
233 :     module_noattach,
234 :     module_old,
235 :     };
236 :    
237 :     #define AMX_FLAG_DEBUG 0x02 /* symbolic info. available */
238 :     #define AMX_FLAG_COMPACT 0x04 /* compact encoding */
239 :     #define AMX_FLAG_BYTEOPC 0x08 /* opcode is a byte (not a cell) */
240 :     #define AMX_FLAG_NOCHECKS 0x10 /* no array bounds checking; no STMT opcode */
241 : ian 17 #define AMX_FLAG_OLDFILE 0x20 /* Old AMX Mod plugin */
242 : ian 1 #define AMX_FLAG_NTVREG 0x1000 /* all native functions are registered */
243 :     #define AMX_FLAG_JITC 0x2000 /* abstract machine is JIT compiled */
244 :     #define AMX_FLAG_BROWSE 0x4000 /* busy browsing */
245 :     #define AMX_FLAG_RELOC 0x8000 /* jump/call addresses relocated */
246 :    
247 :     #define INVALID_PLUGIN_ID -1
248 :    
249 :     #define MENU_EXIT -3
250 :     #define MENU_BACK -2
251 :     #define MENU_MORE -1
252 :     #define ITEM_IGNORE 0
253 :     #define ITEM_ENABLED 1
254 :     #define ITEM_DISABLED 2
255 :    
256 :     #define AMX_ERR_NATIVE 10
257 :     #define AMX_ERR_MEMACCESS 5
258 :     #define AMX_ERR_NONE 0
259 :     #define AMX_ERR_BOUNDS 4
260 :     #define AMX_ERR_STACKERR 3
261 :     #define AMX_ERR_STACKLOW 7
262 :     #define AMX_ERR_HEAPLOW 8
263 :     #define AMX_ERR_DIVIDE 11
264 :     #define AMX_ERR_NOTFOUND 19
265 :     #define AMX_ERR_PARAMS 25
266 :     #define AMX_ERR_GENERAL 27
267 :    
268 :     #define INVALID_HANDLE -1
269 :    
270 :     #define ET_IGNORE 0 //ignore return val
271 :     #define ET_STOP 1 //stop on PLUGIN_HANDLED
272 :     #define ET_STOP2 2 //same, except return biggest
273 :     #define ET_CONTINUE 3 //no stop, return biggest
274 :    
275 :     #define FP_CELL 0
276 :     #define FP_FLOAT 1
277 :     #define FP_STRING 2
278 :     #define FP_ARRAY 4
279 :    
280 :     #define FORWARD_ONLY_OLD 1
281 :     #define FORWARD_ONLY_NEW 2
282 :     #define FORWARD_ALL 3
283 :    
284 :     #define SND_SPAWNING (1<<8) // we're spawing, used in some cases for ambients
285 :     #define SND_STOP (1<<5) // stop sound
286 :     #define SND_CHANGE_VOL (1<<6) // change sound vol
287 :     #define SND_CHANGE_PITCH (1<<7) // change sound pitch
288 :    
289 :     enum LibType
290 :     {
291 :     LibType_Library,
292 :     LibType_Class
293 :     };
294 : ian 17
295 :     enum AdminProp
296 :     {
297 :     AdminProp_Auth = 0,
298 :     AdminProp_Password,
299 :     AdminProp_Access,
300 :     AdminProp_Flags
301 :     };

Contact
ViewVC Help
Powered by ViewVC 1.0.4