// vim: set ts=4 sw=4 tw=99 noet: // // AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). // Copyright (C) The AMX Mod X Development Team. // // This software is licensed under the GNU General Public License, version 3 or higher. // Additional exceptions apply. For full license details, see LICENSE.txt or visit: // https://alliedmods.net/amxmodx-license #if defined _amxconst_included #endinput #endif #define _amxconst_included #include /** * Internal AMXX buffer size for string retrieval. * * @note This is the buffer size AMX Mod X uses internally to retrieve strings * from plugins. Most natives that take strings as arguments will * implicitly truncate them to this maximum length. This has been raised * to the current value with AMXX 1.8.3. Previously the limit was 3072. * @note This is here mainly for documentation purposes. By default plugins * don't have enough memory available to allocate an array of this size. * You probably should not use this to actually declare a buffer unless * you *absolutely* have to. Look at #pragma dynamic to increase a plugins * available memory. */ #define MAX_STRING_LENGTH 16384 /** * Defines and constants related to the maximum number of clients. * * @note MAX_PLAYERS is not the same as MaxClients. MAX_PLAYERS is a hardcoded * value as an upper limit, used mainly to declare arrays big enough for * all possible server situations. MaxClients changes based on the * server the plugin is deployed on.. */ #define MAX_PLAYERS 32 /* Maximum number of players AMX Mod X supports */ /** * Maximum number of players the server supports */ public stock const MaxClients; /** * Pass this into certain functions to act as a C++ NULL */ public stock const NULL_STRING[1]; /** * Pass this into certain functions to act as a C++ NULL */ public stock const Float:NULL_VECTOR[3]; /** * The maximum buffer size required to store a clients name. */ #define MAX_NAME_LENGTH 32 /** * π */ #define M_PI 3.1415926535 /** * @section Admin privilege and authentication constants */ /** * Admin level constants */ #define ADMIN_ALL 0 /* everyone */ #define ADMIN_IMMUNITY (1<<0) /* flag "a" */ #define ADMIN_RESERVATION (1<<1) /* flag "b" */ #define ADMIN_KICK (1<<2) /* flag "c" */ #define ADMIN_BAN (1<<3) /* flag "d" */ #define ADMIN_SLAY (1<<4) /* flag "e" */ #define ADMIN_MAP (1<<5) /* flag "f" */ #define ADMIN_CVAR (1<<6) /* flag "g" */ #define ADMIN_CFG (1<<7) /* flag "h" */ #define ADMIN_CHAT (1<<8) /* flag "i" */ #define ADMIN_VOTE (1<<9) /* flag "j" */ #define ADMIN_PASSWORD (1<<10) /* flag "k" */ #define ADMIN_RCON (1<<11) /* flag "l" */ #define ADMIN_LEVEL_A (1<<12) /* flag "m" */ #define ADMIN_LEVEL_B (1<<13) /* flag "n" */ #define ADMIN_LEVEL_C (1<<14) /* flag "o" */ #define ADMIN_LEVEL_D (1<<15) /* flag "p" */ #define ADMIN_LEVEL_E (1<<16) /* flag "q" */ #define ADMIN_LEVEL_F (1<<17) /* flag "r" */ #define ADMIN_LEVEL_G (1<<18) /* flag "s" */ #define ADMIN_LEVEL_H (1<<19) /* flag "t" */ #define ADMIN_MENU (1<<20) /* flag "u" */ #define ADMIN_BAN_TEMP (1<<21) /* flag "v" */ #define ADMIN_ADMIN (1<<24) /* flag "y" */ #define ADMIN_USER (1<<25) /* flag "z" */ /** * Admin authentication behavior flags */ #define FLAG_KICK (1<<0) /* flag "a" */ #define FLAG_TAG (1<<1) /* flag "b" */ #define FLAG_AUTHID (1<<2) /* flag "c" */ #define FLAG_IP (1<<3) /* flag "d" */ #define FLAG_NOPASS (1<<4) /* flag "e" */ #define FLAG_CASE_SENSITIVE (1<<10) /* flag "k" */ /** * @endsection */ /** * Return codes */ #define PLUGIN_CONTINUE 0 /* Results returned by public functions */ #define PLUGIN_HANDLED 1 /* stop other plugins */ #define PLUGIN_HANDLED_MAIN 2 /* to use in client_command(), continue all plugins but stop the command */ /** * IDs of weapons in CS */ #define CSW_NONE 0 #define CSW_P228 1 #define CSW_SCOUT 3 #define CSW_HEGRENADE 4 #define CSW_XM1014 5 #define CSW_C4 6 #define CSW_MAC10 7 #define CSW_AUG 8 #define CSW_SMOKEGRENADE 9 #define CSW_ELITE 10 #define CSW_FIVESEVEN 11 #define CSW_UMP45 12 #define CSW_SG550 13 #define CSW_GALI 14 #define CSW_GALIL 14 #define CSW_FAMAS 15 #define CSW_USP 16 #define CSW_GLOCK18 17 #define CSW_AWP 18 #define CSW_MP5NAVY 19 #define CSW_M249 20 #define CSW_M3 21 #define CSW_M4A1 22 #define CSW_TMP 23 #define CSW_G3SG1 24 #define CSW_FLASHBANG 25 #define CSW_DEAGLE 26 #define CSW_SG552 27 #define CSW_AK47 28 #define CSW_KNIFE 29 #define CSW_P90 30 #define CSW_VEST 31 // Custom #define CSW_VESTHELM 32 // Custom #define CSW_SHIELDGUN 99 #define CSW_ALLWEAPONS (~(1<