mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Merge pull request #108 from Nextra/inc-doc
Update include documentation (mainly amxmodx.inc)
This commit is contained in:
commit
c22bb12c1e
@ -15,191 +15,223 @@
|
||||
#include <amxmodx_version>
|
||||
|
||||
/**
|
||||
* 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 those to this maximum length.
|
||||
* This has been raised to the current value with AMXX 1.8.3. Previously the limit was 3072.
|
||||
* Internal AMXX buffer size for string retrieval.
|
||||
*
|
||||
* @note This is here mainly for documentation purposes. By default plugins don't even have enough
|
||||
* memory available to create 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.
|
||||
* @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
|
||||
|
||||
/**
|
||||
* MAX_PLAYERS is not the same as MaxClients.
|
||||
* MAX_PLAYERS is a hardcoded value as an upper limit. MaxClients changes based on the server.
|
||||
* 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 33 /* Maximum number of players AMX Mod X supports */
|
||||
#define MAX_NAME_LENGTH 32 /* Maximum buffer required to store a client name */
|
||||
#define MAX_PLAYERS 33 /* Maximum number of players AMX Mod X supports */
|
||||
|
||||
public stock const MaxClients; /* Maximum number of players the server supports (dynamic) */
|
||||
public stock const MaxClients; /* Maximum number of players the server supports */
|
||||
|
||||
/**
|
||||
* 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" */
|
||||
#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" */
|
||||
|
||||
#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" */
|
||||
/**
|
||||
* 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 */
|
||||
#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 */
|
||||
|
||||
/**
|
||||
* CVAR constants for register_cvar()
|
||||
* CVAR flags for register_cvar()
|
||||
*/
|
||||
#define FCVAR_ARCHIVE 1 /* set to cause it to be saved to vars.rc */
|
||||
#define FCVAR_USERINFO 2 /* changes the client's info string */
|
||||
#define FCVAR_SERVER 4 /* notifies players when changed */
|
||||
#define FCVAR_EXTDLL 8 /* defined by external DLL */
|
||||
#define FCVAR_CLIENTDLL 16 /* defined by the client dll */
|
||||
#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 */
|
||||
#define FCVAR_SPONLY 64 /* This cvar cannot be changed by clients connected to a multiplayer server. */
|
||||
#define FCVAR_PRINTABLEONLY 128 /* This cvar's string cannot contain unprintable characters ( e.g., used for player name etc ). */
|
||||
#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 */
|
||||
#define FCVAR_ARCHIVE 1 /* set to cause it to be saved to vars.rc */
|
||||
#define FCVAR_USERINFO 2 /* changes the client's info string */
|
||||
#define FCVAR_SERVER 4 /* notifies players when changed */
|
||||
#define FCVAR_EXTDLL 8 /* defined by external DLL */
|
||||
#define FCVAR_CLIENTDLL 16 /* defined by the client dll */
|
||||
#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 */
|
||||
#define FCVAR_SPONLY 64 /* This cvar cannot be changed by clients connected to a multiplayer server. */
|
||||
#define FCVAR_PRINTABLEONLY 128 /* This cvar's string cannot contain unprintable characters ( e.g., used for player name etc ). */
|
||||
#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 */
|
||||
|
||||
/**
|
||||
* IDs of weapons in CS
|
||||
*/
|
||||
#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_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
|
||||
|
||||
/**
|
||||
* HI weapon constants
|
||||
*/
|
||||
#define HIW_BERETTA 1
|
||||
#define HIW_SPAS12 2
|
||||
#define HIW_M4A1 3
|
||||
#define HIW_MP5A4 4
|
||||
#define HIW_MP5SD5 5
|
||||
#define HIW_AK47 6
|
||||
#define HIW_AKS74U 7
|
||||
#define HIW_GLOCK 8
|
||||
#define HIW_M11 9
|
||||
#define HIW_M11SD 10
|
||||
#define HIW_PSG1 11
|
||||
#define HIW_ZASTAVA 12
|
||||
#define HIW_M16A2 13
|
||||
#define HIW_REMINGTON 14
|
||||
#define HIW_NATOGREN 15
|
||||
#define HIW_TANGOGREN 16
|
||||
#define HIW_FLASHBANG 17
|
||||
#define HIW_BERETTA 1
|
||||
#define HIW_SPAS12 2
|
||||
#define HIW_M4A1 3
|
||||
#define HIW_MP5A4 4
|
||||
#define HIW_MP5SD5 5
|
||||
#define HIW_AK47 6
|
||||
#define HIW_AKS74U 7
|
||||
#define HIW_GLOCK 8
|
||||
#define HIW_M11 9
|
||||
#define HIW_M11SD 10
|
||||
#define HIW_PSG1 11
|
||||
#define HIW_ZASTAVA 12
|
||||
#define HIW_M16A2 13
|
||||
#define HIW_REMINGTON 14
|
||||
#define HIW_NATOGREN 15
|
||||
#define HIW_TANGOGREN 16
|
||||
#define HIW_FLASHBANG 17
|
||||
|
||||
/**
|
||||
* Parts of body for hits
|
||||
*/
|
||||
#define HIT_GENERIC 0 /* none */
|
||||
#define HIT_HEAD 1
|
||||
#define HIT_CHEST 2
|
||||
#define HIT_STOMACH 3
|
||||
#define HIT_LEFTARM 4
|
||||
#define HIT_RIGHTARM 5
|
||||
#define HIT_LEFTLEG 6
|
||||
#define HIT_RIGHTLEG 7
|
||||
#define HIT_GENERIC 0 /* none */
|
||||
#define HIT_HEAD 1
|
||||
#define HIT_CHEST 2
|
||||
#define HIT_STOMACH 3
|
||||
#define HIT_LEFTARM 4
|
||||
#define HIT_RIGHTARM 5
|
||||
#define HIT_LEFTLEG 6
|
||||
#define HIT_RIGHTLEG 7
|
||||
|
||||
/**
|
||||
* @section Constants for emit_sound()
|
||||
* @section emit_sound() constants
|
||||
*/
|
||||
|
||||
/**
|
||||
* Channels
|
||||
*/
|
||||
#define CHAN_AUTO 0
|
||||
#define CHAN_WEAPON 1
|
||||
#define CHAN_VOICE 2
|
||||
#define CHAN_ITEM 3
|
||||
#define CHAN_BODY 4
|
||||
#define CHAN_STREAM 5 /* allocate stream channel from the static or dynamic area */
|
||||
#define CHAN_STATIC 6 /* allocate channel from the static area */
|
||||
#define CHAN_NETWORKVOICE_BASE 7 /* voice data coming across the network */
|
||||
#define CHAN_NETWORKVOICE_END 500 /* network voice data reserves slots (CHAN_NETWORKVOICE_BASE through CHAN_NETWORKVOICE_END). */
|
||||
#define CHAN_AUTO 0
|
||||
#define CHAN_WEAPON 1
|
||||
#define CHAN_VOICE 2
|
||||
#define CHAN_ITEM 3
|
||||
#define CHAN_BODY 4
|
||||
#define CHAN_STREAM 5 /* allocate stream channel from the static or dynamic area */
|
||||
#define CHAN_STATIC 6 /* allocate channel from the static area */
|
||||
#define CHAN_NETWORKVOICE_BASE 7 /* voice data coming across the network */
|
||||
#define CHAN_NETWORKVOICE_END 500 /* network voice data reserves slots (CHAN_NETWORKVOICE_BASE through CHAN_NETWORKVOICE_END). */
|
||||
|
||||
/**
|
||||
*Attenuation values
|
||||
*/
|
||||
#define ATTN_NONE 0.00
|
||||
#define ATTN_NORM 0.80
|
||||
#define ATTN_IDLE 2.00
|
||||
#define ATTN_STATIC 1.25
|
||||
#define ATTN_NONE 0.00
|
||||
#define ATTN_NORM 0.80
|
||||
#define ATTN_IDLE 2.00
|
||||
#define ATTN_STATIC 1.25
|
||||
|
||||
/**
|
||||
* Pitch values
|
||||
*/
|
||||
#define PITCH_NORM 100 /* non-pitch shifted */
|
||||
#define PITCH_LOW 95 /* other values are possible - 0-255, where 255 is very high */
|
||||
#define PITCH_HIGH 120
|
||||
#define PITCH_NORM 100 /* non-pitch shifted */
|
||||
#define PITCH_LOW 95 /* other values are possible - 0-255, where 255 is very high */
|
||||
#define PITCH_HIGH 120
|
||||
|
||||
/**
|
||||
* Volume values
|
||||
*/
|
||||
#define VOL_NORM 1.0
|
||||
#define VOL_NORM 1.0
|
||||
|
||||
/**
|
||||
* Sound behavior constants
|
||||
*/
|
||||
#define SND_SPAWNING (1<<8) // we're spawing, used in some cases for ambients
|
||||
#define SND_STOP (1<<5) // stop sound
|
||||
#define SND_CHANGE_VOL (1<<6) // change sound vol
|
||||
#define SND_CHANGE_PITCH (1<<7) // change sound pitch
|
||||
|
||||
/**
|
||||
* @endsection
|
||||
@ -208,22 +240,26 @@ public stock const MaxClients; /* Maximum number of players the server supports
|
||||
/**
|
||||
* Menu keys
|
||||
*/
|
||||
#define MENU_KEY_1 (1<<0)
|
||||
#define MENU_KEY_2 (1<<1)
|
||||
#define MENU_KEY_3 (1<<2)
|
||||
#define MENU_KEY_4 (1<<3)
|
||||
#define MENU_KEY_5 (1<<4)
|
||||
#define MENU_KEY_6 (1<<5)
|
||||
#define MENU_KEY_7 (1<<6)
|
||||
#define MENU_KEY_8 (1<<7)
|
||||
#define MENU_KEY_9 (1<<8)
|
||||
#define MENU_KEY_0 (1<<9)
|
||||
#define MENU_KEY_1 (1<<0)
|
||||
#define MENU_KEY_2 (1<<1)
|
||||
#define MENU_KEY_3 (1<<2)
|
||||
#define MENU_KEY_4 (1<<3)
|
||||
#define MENU_KEY_5 (1<<4)
|
||||
#define MENU_KEY_6 (1<<5)
|
||||
#define MENU_KEY_7 (1<<6)
|
||||
#define MENU_KEY_8 (1<<7)
|
||||
#define MENU_KEY_9 (1<<8)
|
||||
#define MENU_KEY_0 (1<<9)
|
||||
|
||||
/**
|
||||
* Language constants
|
||||
*/
|
||||
#define LANG_SERVER 0
|
||||
#define LANG_PLAYER -1
|
||||
#define LANG_SERVER 0
|
||||
#define LANG_PLAYER -1
|
||||
|
||||
/**
|
||||
* @section Client print native constants
|
||||
*/
|
||||
|
||||
/**
|
||||
* Destination types for client_print()
|
||||
@ -234,7 +270,7 @@ enum
|
||||
print_console,
|
||||
print_chat,
|
||||
print_center,
|
||||
print_radio /* Counter-Strike only */
|
||||
print_radio /* Counter-Strike only */
|
||||
};
|
||||
|
||||
/**
|
||||
@ -259,20 +295,28 @@ enum
|
||||
};
|
||||
|
||||
/**
|
||||
* Render for set_user_rendering()
|
||||
* @endsection
|
||||
*/
|
||||
|
||||
/**
|
||||
* @section Entity rendering constants
|
||||
*/
|
||||
|
||||
/**
|
||||
* Rendering modes (i.e. for set_user_rendering())
|
||||
*/
|
||||
enum
|
||||
{
|
||||
kRenderNormal = 0, /* src */
|
||||
kRenderTransColor, /* c*a+dest*(1-a) */
|
||||
kRenderTransTexture, /* src*a+dest*(1-a) */
|
||||
kRenderGlow, /* src*a+dest -- No Z buffer checks */
|
||||
kRenderTransAlpha, /* src*srca+dest*(1-srca) */
|
||||
kRenderTransAdd, /* src*a+dest */
|
||||
kRenderNormal = 0, /* src */
|
||||
kRenderTransColor, /* c*a+dest*(1-a) */
|
||||
kRenderTransTexture, /* src*a+dest*(1-a) */
|
||||
kRenderGlow, /* src*a+dest -- No Z buffer checks */
|
||||
kRenderTransAlpha, /* src*srca+dest*(1-srca) */
|
||||
kRenderTransAdd, /* src*a+dest */
|
||||
};
|
||||
|
||||
/**
|
||||
* Fx for set_user_rendering()
|
||||
* Rendering fx (i.e. for set_user_rendering())
|
||||
*/
|
||||
enum
|
||||
{
|
||||
@ -291,22 +335,26 @@ enum
|
||||
kRenderFxFlickerSlow,
|
||||
kRenderFxFlickerFast,
|
||||
kRenderFxNoDissipation,
|
||||
kRenderFxDistort, /* Distort/scale/translate flicker */
|
||||
kRenderFxHologram, /* kRenderFxDistort + distance fade */
|
||||
kRenderFxDeadPlayer, /* kRenderAmt is the player index */
|
||||
kRenderFxExplode, /* Scale up really big! */
|
||||
kRenderFxGlowShell, /* Glowing Shell */
|
||||
kRenderFxClampMinScale, /* Keep this sprite from getting very small (SPRITES only!) */
|
||||
kRenderFxDistort, /* Distort/scale/translate flicker */
|
||||
kRenderFxHologram, /* kRenderFxDistort + distance fade */
|
||||
kRenderFxDeadPlayer, /* kRenderAmt is the player index */
|
||||
kRenderFxExplode, /* Scale up really big! */
|
||||
kRenderFxGlowShell, /* Glowing Shell */
|
||||
kRenderFxClampMinScale, /* Keep this sprite from getting very small (SPRITES only!) */
|
||||
};
|
||||
|
||||
/**
|
||||
* @endsection
|
||||
*/
|
||||
|
||||
/**
|
||||
* Type for force_unmodified()
|
||||
*/
|
||||
enum
|
||||
{
|
||||
force_exactfile = 0, /* File on client must exactly match server's file */
|
||||
force_model_samebounds, /* For model files only, the geometry must fit in the same bbox */
|
||||
force_model_specifybounds, /* For model files only, the geometry must fit in the specified bbox */
|
||||
force_exactfile = 0, /* File on client must exactly match server's file */
|
||||
force_model_samebounds, /* For model files only, the geometry must fit in the same bbox */
|
||||
force_model_specifybounds, /* For model files only, the geometry must fit in the specified bbox */
|
||||
};
|
||||
|
||||
/**
|
||||
@ -327,53 +375,74 @@ enum
|
||||
/**
|
||||
* AMX flag constants
|
||||
*/
|
||||
#define AMX_FLAG_DEBUG 0x02 /* symbolic info. available */
|
||||
#define AMX_FLAG_COMPACT 0x04 /* compact encoding */
|
||||
#define AMX_FLAG_BYTEOPC 0x08 /* opcode is a byte (not a cell) */
|
||||
#define AMX_FLAG_NOCHECKS 0x10 /* no array bounds checking; no STMT opcode */
|
||||
#define AMX_FLAG_NTVREG 0x1000 /* all native functions are registered */
|
||||
#define AMX_FLAG_JITC 0x2000 /* abstract machine is JIT compiled */
|
||||
#define AMX_FLAG_BROWSE 0x4000 /* busy browsing */
|
||||
#define AMX_FLAG_RELOC 0x8000 /* jump/call addresses relocated */
|
||||
#define AMX_FLAG_DEBUG 0x02 /* symbolic info. available */
|
||||
#define AMX_FLAG_COMPACT 0x04 /* compact encoding */
|
||||
#define AMX_FLAG_BYTEOPC 0x08 /* opcode is a byte (not a cell) */
|
||||
#define AMX_FLAG_NOCHECKS 0x10 /* no array bounds checking; no STMT opcode */
|
||||
#define AMX_FLAG_NTVREG 0x1000 /* all native functions are registered */
|
||||
#define AMX_FLAG_JITC 0x2000 /* abstract machine is JIT compiled */
|
||||
#define AMX_FLAG_BROWSE 0x4000 /* busy browsing */
|
||||
#define AMX_FLAG_RELOC 0x8000 /* jump/call addresses relocated */
|
||||
|
||||
#define INVALID_PLUGIN_ID -1
|
||||
/**
|
||||
* Invalid plugin id
|
||||
*/
|
||||
#define INVALID_PLUGIN_ID -1
|
||||
|
||||
#define MENU_TIMEOUT -4
|
||||
#define MENU_EXIT -3
|
||||
#define MENU_BACK -2
|
||||
#define MENU_MORE -1
|
||||
#define ITEM_IGNORE 0
|
||||
#define ITEM_ENABLED 1
|
||||
#define ITEM_DISABLED 2
|
||||
/**
|
||||
* Menu and menu item status codes
|
||||
*/
|
||||
#define MENU_TIMEOUT -4
|
||||
#define MENU_EXIT -3
|
||||
#define MENU_BACK -2
|
||||
#define MENU_MORE -1
|
||||
#define ITEM_IGNORE 0
|
||||
#define ITEM_ENABLED 1
|
||||
#define ITEM_DISABLED 2
|
||||
|
||||
#define AMX_ERR_NATIVE 10
|
||||
#define AMX_ERR_MEMACCESS 5
|
||||
#define AMX_ERR_NONE 0
|
||||
#define AMX_ERR_BOUNDS 4
|
||||
#define AMX_ERR_STACKERR 3
|
||||
#define AMX_ERR_STACKLOW 7
|
||||
#define AMX_ERR_HEAPLOW 8
|
||||
#define AMX_ERR_DIVIDE 11
|
||||
#define AMX_ERR_NOTFOUND 19
|
||||
#define AMX_ERR_PARAMS 25
|
||||
#define AMX_ERR_GENERAL 27
|
||||
/**
|
||||
* AMX error codes
|
||||
*/
|
||||
#define AMX_ERR_NATIVE 10
|
||||
#define AMX_ERR_MEMACCESS 5
|
||||
#define AMX_ERR_NONE 0
|
||||
#define AMX_ERR_BOUNDS 4
|
||||
#define AMX_ERR_STACKERR 3
|
||||
#define AMX_ERR_STACKLOW 7
|
||||
#define AMX_ERR_HEAPLOW 8
|
||||
#define AMX_ERR_DIVIDE 11
|
||||
#define AMX_ERR_NOTFOUND 19
|
||||
#define AMX_ERR_PARAMS 25
|
||||
#define AMX_ERR_GENERAL 27
|
||||
|
||||
#define INVALID_HANDLE -1
|
||||
/**
|
||||
* Generic invalid handle value
|
||||
*/
|
||||
#define INVALID_HANDLE -1
|
||||
|
||||
#define ET_IGNORE 0 //ignore return val
|
||||
#define ET_STOP 1 //stop on PLUGIN_HANDLED
|
||||
#define ET_STOP2 2 //same, except return biggest
|
||||
#define ET_CONTINUE 3 //no stop, return biggest
|
||||
/**
|
||||
* @section Plugin forward related constants
|
||||
*/
|
||||
|
||||
#define FP_CELL 0
|
||||
#define FP_FLOAT 1
|
||||
#define FP_STRING 2
|
||||
#define FP_ARRAY 4
|
||||
/**
|
||||
* Stop types for plugin forwards
|
||||
*/
|
||||
#define ET_IGNORE 0 //ignore return val
|
||||
#define ET_STOP 1 //stop on PLUGIN_HANDLED
|
||||
#define ET_STOP2 2 //same, except return biggest
|
||||
#define ET_CONTINUE 3 //no stop, return biggest
|
||||
|
||||
#define SND_SPAWNING (1<<8) // we're spawing, used in some cases for ambients
|
||||
#define SND_STOP (1<<5) // stop sound
|
||||
#define SND_CHANGE_VOL (1<<6) // change sound vol
|
||||
#define SND_CHANGE_PITCH (1<<7) // change sound pitch
|
||||
/**
|
||||
* Parameter types for plugin forwards
|
||||
*/
|
||||
#define FP_CELL 0
|
||||
#define FP_FLOAT 1
|
||||
#define FP_STRING 2
|
||||
#define FP_ARRAY 4
|
||||
|
||||
/**
|
||||
* @endsection
|
||||
*/
|
||||
|
||||
/**
|
||||
* LibType constants
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -14,23 +14,28 @@
|
||||
#define _cellarray_included
|
||||
|
||||
/**
|
||||
* These arrays are intended to be used for a form of global storage without
|
||||
* requiring a #define that needs to be increased each time a person needs more
|
||||
* storage.
|
||||
* These are not designed to be used as a replacement for normal arrays, as
|
||||
* normal arrays are faster and should be used whenever possible.
|
||||
* Cellarray tag declaration
|
||||
*
|
||||
* @note These dynamic arrays are intended to be used for a form of global
|
||||
* storage without requiring a #define that needs to be increased each
|
||||
* time the plugin author requires more storage. These are not designed
|
||||
* to be a full replacement for normal arrays, as those are faster and
|
||||
* should be used whenever possible.
|
||||
* @note Plugins are responsible for freeing all Array handles they acquire,
|
||||
* including those from ArrayClone. Failing to free handles will result
|
||||
* in the plugin and AMXX leaking memory.
|
||||
*/
|
||||
|
||||
enum Array
|
||||
{
|
||||
Invalid_Array = 0
|
||||
};
|
||||
|
||||
/**
|
||||
* Given a maximum string size (including the null terminator),
|
||||
* returns the number of cells required to fit that string.
|
||||
/**
|
||||
* Returns the number of cells required to fit a string of the specified size
|
||||
* (including the null terminator).
|
||||
*
|
||||
* @param size Number of bytes.
|
||||
*
|
||||
* @return Minimum number of cells required to fit the byte count.
|
||||
*/
|
||||
stock ByteCountToCells(size)
|
||||
@ -45,412 +50,474 @@ stock ByteCountToCells(size)
|
||||
|
||||
/**
|
||||
* Creates a handle to a dynamically sized array.
|
||||
* It is very important that the cellsize you provide matches up with the buffer sizes
|
||||
* that you pass with subsequent Array{Get,Set,Push} calls.
|
||||
*
|
||||
* @param cellsize How many cells each entry in the array is.
|
||||
* @param reserved How many blank entries are created immediately when the array is created.
|
||||
* These entries are not valid to read from until called with ArraySet.
|
||||
* @note It is very important that the provided cellsize matches up with the
|
||||
* buffer sizes that are passed with subsequent Array[Get|Set|Push] calls.
|
||||
* @note Initially the "reserved" parameter was intended to create blank entries
|
||||
* that would immediately be usable with Array[Get|Set] functions. This
|
||||
* functionality was never working as intended, and can now be achieved
|
||||
* using ArrayResize().
|
||||
*
|
||||
* @param cellsize Size of each array entry in cells
|
||||
* @param reserved Pre-allocates space in the array for the specified
|
||||
* number of items. The items are not valid to read or set
|
||||
* until they have actually been pushed into the array.
|
||||
*
|
||||
* @return Handle to the array.
|
||||
*/
|
||||
native Array:ArrayCreate(cellsize = 1, reserved = 0);
|
||||
native Array:ArrayCreate(cellsize = 1, reserved = 32);
|
||||
|
||||
/**
|
||||
* Clones an array, returning a new handle with the same size and data.
|
||||
* You must close it.
|
||||
*
|
||||
* @param which Array handle to be cloned.
|
||||
* @param which Array handle
|
||||
*
|
||||
* @return New handle to the cloned array object on success, 0 on failure.
|
||||
* @error Invalid handle.
|
||||
* @return Handle to the cloned array on success, 0 otherwise
|
||||
* @error If an invalid handle is provided an error will be
|
||||
* thrown.
|
||||
*/
|
||||
native Array:ArrayClone(Array:which);
|
||||
|
||||
/**
|
||||
* Clears all entries from the array.
|
||||
*
|
||||
* @param which The array to clear.
|
||||
* @param which Array handle
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle.
|
||||
* @error Invalid handle
|
||||
*/
|
||||
native ArrayClear(Array:which);
|
||||
|
||||
/**
|
||||
* Returns the number of elements in the array.
|
||||
*
|
||||
* @param which The array to check.
|
||||
* @param which Array handle
|
||||
*
|
||||
* @return How many elements are in the array.
|
||||
* @error Invalid handle.
|
||||
* @return Number of elements in the array
|
||||
* @error If an invalid handle is provided an error will be
|
||||
* thrown.
|
||||
*/
|
||||
native ArraySize(Array:which);
|
||||
|
||||
/**
|
||||
* Resizes an array. If the size is smaller than the current size,
|
||||
* the array is truncated.
|
||||
* Resizes an array.
|
||||
*
|
||||
* @param which Array handle.
|
||||
* @param newsize New size.
|
||||
* @note If the size is smaller than the current array size the array is
|
||||
* truncated and data lost.
|
||||
*
|
||||
* @param which Array handle
|
||||
* @param newsize New size
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle or out of memory.
|
||||
* @error If an invalid handle is provided or the resizing
|
||||
* operation runs out of memory, an error will be thrown.
|
||||
*/
|
||||
native bool:ArrayResize(Array:which, newsize);
|
||||
|
||||
/**
|
||||
* Returns data within an array.
|
||||
* Make sure the output buffer matches the size the array was created with!
|
||||
* Retrieves an array of data from a cellarray.
|
||||
*
|
||||
* @param which The array to retrieve the item from.
|
||||
* @param item The item to retrieve (zero-based).
|
||||
* @param output The output buffer to write.
|
||||
* @note If the size parameter is specified as -1 the output buffer has to match
|
||||
* the size the array was created with.
|
||||
*
|
||||
* @param which Array handle
|
||||
* @param item Item index in the array
|
||||
* @param output Buffer to copy value to
|
||||
* @param size If not set, assumes the buffer size is equal to the
|
||||
* cellsize. Otherwise, the size passed is used.
|
||||
* cellsize. Otherwise, the specified size is used.
|
||||
*
|
||||
* @return Number of cells copied.
|
||||
* @error Invalid handle or invalid index.
|
||||
* @return Number of cells copied
|
||||
* @error If an invalid handle or index is provided an error will
|
||||
* be thrown.
|
||||
*/
|
||||
native ArrayGetArray(Array:which, item, any:output[], size = -1);
|
||||
|
||||
/**
|
||||
* Returns a single cell of data from an array.
|
||||
* Returns a single cell of data from an array
|
||||
*
|
||||
* @param which The array to retrieve the item from.
|
||||
* @param item The item to retrieve (zero-based).
|
||||
* @param block Optionally specify which block to read from
|
||||
* (useful if the blocksize > 0).
|
||||
* @param asChar Optionally read as a byte instead of a cell.
|
||||
* @param which Array handle
|
||||
* @param item Item index in the array
|
||||
* @param block If the array has a cellsize >1 this optionally specifies
|
||||
* which block to read from
|
||||
* @param asChar If true reads the value as a byte instead of a cell
|
||||
*
|
||||
* @return Value read.
|
||||
* @error Invalid handle, invalid index, or invalid block.
|
||||
* @return Integer value
|
||||
* @error If an invalid handle, index or block is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native any:ArrayGetCell(Array:which, item, block = 0, bool:asChar = false);
|
||||
|
||||
/**
|
||||
* Returns a string value from an array.
|
||||
* Returieves string data from an array.
|
||||
*
|
||||
* @param which The array to retrieve the item from.
|
||||
* @param item The item to retrieve (zero-based).
|
||||
* @param output The variable to store the value in.
|
||||
* @param size Character size of the output buffer.
|
||||
* @param which Array handle
|
||||
* @param item Item index in the array
|
||||
* @param output Buffer to copy value to
|
||||
* @param size Maximum size of the buffer
|
||||
*
|
||||
* @return Number of characters copied.
|
||||
* @error Invalid handle or invalid index.
|
||||
* @return Number of characters copied
|
||||
* @error If an invalid handle or an invalid index is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native ArrayGetString(Array:which, item, output[], size);
|
||||
|
||||
/**
|
||||
* Sets an item's data with that of a local buffer.
|
||||
* The buffer size must match what the cellsize that the array was created with!
|
||||
* The item must already exist, use ArrayPushArray to create a new item within the array.
|
||||
* Fills an item's data with the contents of an array.
|
||||
*
|
||||
* @param which The array to set the item from within.
|
||||
* @param item The item to set (zero-based).
|
||||
* @param input The input buffer to store.
|
||||
* @note If the size parameter is specified as -1 the input buffer has to match
|
||||
* the size the array was created with.
|
||||
* @note The item index must already be valid. Use ArrayPushArray to create
|
||||
* a new array item in the cellarray.
|
||||
*
|
||||
* @param which Array handle
|
||||
* @param item Item index in the array
|
||||
* @param input Array to copy to the cellarray
|
||||
* @param size If not set, assumes the buffer size is equal to the
|
||||
* blocksize. Otherwise, the size passed is used.
|
||||
* cellsize. Otherwise, the specified size is used.
|
||||
*
|
||||
* @return Number of cells copied.
|
||||
* @error Invalid handle or invalid index.
|
||||
* @return Number of cells copied
|
||||
* @error If an invalid handle or an invalid index is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native ArraySetArray(Array:which, item, const any:input[], size =-1);
|
||||
|
||||
/**
|
||||
* Sets an array's single cell value. Use this only on array that were created with a cellsize of 1!
|
||||
* The item must already exist, use ArrayPushCell to create a new item within the array.
|
||||
* Sets an item's data to a single cell value.
|
||||
*
|
||||
* @param which The array to set the item from within.
|
||||
* @param item The item to set (zero-based).
|
||||
* @param input The value to set.
|
||||
* @param block Optionally specify which block to write to
|
||||
* (useful if the blocksize > 0).
|
||||
* @param asChar Optionally set as a byte instead of a cell.
|
||||
* @note The item index must already be valid. Use ArrayPushArray to create
|
||||
* a new array item in the cellarray.
|
||||
*
|
||||
* @param which Array handle
|
||||
* @param item Item index in the array
|
||||
* @param input Value to set
|
||||
* @param block If the array has a cellsize >1 this optionally specifies
|
||||
* which block to write to
|
||||
* @param asChar If true writes the value as a byte instead of a cell
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle, invalid index, or invalid block.
|
||||
* @error If an invalid handle, index or block is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native ArraySetCell(Array:which, item, any:input, block = 0, bool:asChar = false);
|
||||
|
||||
/**
|
||||
* Sets a string value from an array.
|
||||
* The stored string will be truncated if it is longer than the cellsize the array was created with!
|
||||
* The item must already exist, use ArrayPushString to create a new item within the array.
|
||||
* Sets an item's data to a string value.
|
||||
*
|
||||
* @param which The array to set the item from within.
|
||||
* @param item The item to set (zero-based).
|
||||
* @param input The string to set the item as.
|
||||
* @note The input will be truncated if it is longer than the cellsize the array
|
||||
* was created with.
|
||||
* @note The item index must already be valid. Use ArrayPushString to create
|
||||
* a new array item in the cellarray.
|
||||
*
|
||||
* @return Number of characters copied.
|
||||
* @error Invalid handle or invalid index.
|
||||
* @param which Array handle
|
||||
* @param item Item index in the array
|
||||
* @param input String to copy to the array
|
||||
*
|
||||
* @return Number of characters copied
|
||||
* @error If an invalid handle or an invalid index is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native ArraySetString(Array:which, item, const input[]);
|
||||
|
||||
/**
|
||||
* Creates a new item at the end of the array and sets its data with that of a local buffer.
|
||||
* The buffer size must match what the cellsize that the array was created with!
|
||||
* Creates a new item at the end of the cellarray and copies the provided array
|
||||
* into it.
|
||||
*
|
||||
* @param which The array to add the item to.
|
||||
* @param input The input buffer to store.
|
||||
* @param size If not set, the number of elements copied from the array
|
||||
* will be equal to the blocksize. If set higher than the
|
||||
* blocksize, the operation will be truncated.
|
||||
* @note The input will be truncated if it is bigger than the cellsize the array
|
||||
* was created with.
|
||||
*
|
||||
* @return Index of the new entry.
|
||||
* @error Invalid handle or out of memory.
|
||||
* @param which Array handle
|
||||
* @param input Array to copy to the cellarray
|
||||
* @param size If not set, assumes the buffer size is equal to the
|
||||
* cellsize. Otherwise, the specified size is used.
|
||||
*
|
||||
* @return Index of the new entry
|
||||
* @error If an invalid handle is provided or the resizing
|
||||
* operation runs out of memory, an error will be thrown.
|
||||
*/
|
||||
native ArrayPushArray(Array:which, const any:input[], size = -1);
|
||||
|
||||
/**
|
||||
* Creates a new item and sets the array's single cell value.
|
||||
* Use this only on array that were created with a cellsize of 1!
|
||||
* Creates a new item ath the end of the array and sets the item's single cell
|
||||
* value.
|
||||
*
|
||||
* @param which The array to add the item to.
|
||||
* @param input The value to set.
|
||||
* @param which Array handle
|
||||
* @param input Value to set
|
||||
*
|
||||
* @return Index of the new entry.
|
||||
* @error Invalid handle or out of memory.
|
||||
* @return Index of the new entry
|
||||
* @error If an invalid handle is provided or the resizing
|
||||
* operation runs out of memory, an error will be thrown.
|
||||
*/
|
||||
native ArrayPushCell(Array:which, any:input);
|
||||
|
||||
/**
|
||||
* Creates a new element in the array and sets its value to the input buffer.
|
||||
* The stored string will be truncated if it is longer than the cellsize the array was created with!
|
||||
* Creates a new item at the end of the array and copies the provided string
|
||||
* into it.
|
||||
*
|
||||
* @param which The array to add the item to.
|
||||
* @param input The string to set the item as.
|
||||
* @note The input will be truncated if it is longer than the cellsize the array
|
||||
* was created with.
|
||||
*
|
||||
* @return Index of the new entry.
|
||||
* @error Invalid handle or out of memory.
|
||||
* @param which Array handle
|
||||
* @param input String to copy to the array
|
||||
*
|
||||
* @return Index of the new entry
|
||||
* @error If an invalid handle is provided or the resizing
|
||||
* operation runs out of memory, an error will be thrown.
|
||||
*/
|
||||
native ArrayPushString(Array:which, const input[]);
|
||||
|
||||
/**
|
||||
* Inserts an item after the selected item. All items beyond it get shifted up 1 space.
|
||||
* The buffer size must match what the cellsize that the array was created with!
|
||||
* Creates a new item behind the specified item and copies the provided array
|
||||
* into it. All items beyond it get shifted up by one.
|
||||
*
|
||||
* @param which The array to add the item to.
|
||||
* @param item The item to insert after.
|
||||
* @param input The input buffer to store.
|
||||
* @param which Array handle
|
||||
* @param item Item index in the array
|
||||
* @param input Array to copy to the cellarray
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle or invalid index.
|
||||
* @error If an invalid handle or an invalid index is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native ArrayInsertArrayAfter(Array:which, item, const any:input[]);
|
||||
|
||||
/**
|
||||
* Inserts an item after the selected item. All items beyond it get shifted up 1 space.
|
||||
* Use this only on an array that was created with a cellsize of 1!
|
||||
* Creates a new item behind the specified item and sets the item's single cell
|
||||
* value. All items beyond it get shifted up by one.
|
||||
*
|
||||
* @param which The array to add the item to.
|
||||
* @param item The item to insert after.
|
||||
* @param input The value to set.
|
||||
* @param which Array handle
|
||||
* @param item Item index in the array
|
||||
* @param input Value to set
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle or invalid index.
|
||||
* @error If an invalid handle or an invalid index is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native ArrayInsertCellAfter(Array:which, item, any:input);
|
||||
|
||||
/**
|
||||
* Inserts an item after the selected item. All items beyond it get shifted up 1 space.
|
||||
* The stored string will be truncated if it is longer than the cellsize the array was created with!
|
||||
* Creates a new item behind the specified item and copies the provided string
|
||||
* into it. All items beyond it get shifted up by one.
|
||||
*
|
||||
* @param which The array to add the item to.
|
||||
* @param item The item to insert after.
|
||||
* @param input The value to set.
|
||||
* @note The input will be truncated if it is longer than the cellsize the array
|
||||
* was created with.
|
||||
*
|
||||
* @param which Array handle
|
||||
* @param item Item index in the array
|
||||
* @param input String to copy to the array
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle or invalid index.
|
||||
* @error If an invalid handle or an invalid index is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native ArrayInsertStringAfter(Array:which, item, const input[]);
|
||||
|
||||
/**
|
||||
* Inserts an item before the selected item. All items beyond it, and the selected item get shifted up 1 space.
|
||||
* The buffer size must match what the cellsize that the array was created with!
|
||||
* Creates a new item in front of the specified item and copies the provided
|
||||
* array into it. All items beyond it get shifted up by one.
|
||||
*
|
||||
* @param which The array to add the item to.
|
||||
* @param item The item to insert before.
|
||||
* @param input The input buffer to store.
|
||||
* @param which Array handle
|
||||
* @param item Item index in the array
|
||||
* @param input Array to copy to the cellarray
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle or invalid index.
|
||||
* @error If an invalid handle or an invalid index is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native ArrayInsertArrayBefore(Array:which, item, const any:input[]);
|
||||
|
||||
/**
|
||||
* Inserts an item before the selected item. All items beyond it, and the selected item get shifted up 1 space.
|
||||
* Use this only on an array that was created with a cellsize of 1!
|
||||
* Creates a new item in front of the specified item and sets the item's single
|
||||
* cell value. All items beyond it get shifted up by one.
|
||||
*
|
||||
* @param which The array to add the item to.
|
||||
* @param item The item to insert after.
|
||||
* @param input The value to set.
|
||||
* @param which Array handle
|
||||
* @param item Item index in the array
|
||||
* @param input Value to set
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle or invalid index.
|
||||
* @error If an invalid handle or an invalid index is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native ArrayInsertCellBefore(Array:which, item, const any:input);
|
||||
|
||||
/**
|
||||
* Inserts an item before the selected item. All items beyond it, and the selected item get shifted up 1 space.
|
||||
* The stored string will be truncated if it is longer than the cellsize the array was created with!
|
||||
* Creates a new item in front of the specified item and copies the provided
|
||||
* string into it. All items beyond it get shifted up by one.
|
||||
*
|
||||
* @param which The array to add the item to.
|
||||
* @param item The item to insert before.
|
||||
* @param input The value to set.
|
||||
* @note The input will be truncated if it is longer than the cellsize the array
|
||||
* was created with.
|
||||
*
|
||||
* @param which Array handle
|
||||
* @param item Item index in the array
|
||||
* @param input String to copy to the array
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle or invalid index.
|
||||
* @error If an invalid handle or an invalid index is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native ArrayInsertStringBefore(Array:which, item, const input[]);
|
||||
|
||||
/**
|
||||
* Swaps the position of two items.
|
||||
*
|
||||
* @param which The array that contains the items.
|
||||
* @param item1 The first item to swap.
|
||||
* @param item2 The second item to swap.
|
||||
* @param which Array handle
|
||||
* @param item1,item2 Item pair to swap
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle or invalid index.
|
||||
* @error If an invalid handle or an invalid index is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native ArraySwap(Array:which, item1, item2);
|
||||
|
||||
/**
|
||||
* Deletes an item from the array. All items beyond it get shifted down 1 space.
|
||||
* Deletes an item from the array. All items beyond it get shifted down by one.
|
||||
*
|
||||
* @param which The array that contains the item to delete.
|
||||
* @param item The item to delete.
|
||||
* @param which Array handle
|
||||
* @param item Item to delete
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle or invalid index.
|
||||
* @error If an invalid handle or an invalid index is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native ArrayDeleteItem(Array:which, item);
|
||||
|
||||
/**
|
||||
* Returns the index for the first occurance of the provided string. If the string
|
||||
* cannot be located, -1 will be returned.
|
||||
* Searches through the array and returns the index of the first occurence of
|
||||
* the specified string.
|
||||
*
|
||||
* @param which Array handle.
|
||||
* @param item String to search for.
|
||||
* @param which Array handle
|
||||
* @param item String to search for
|
||||
*
|
||||
* @return Array index, or -1 on failure.
|
||||
* @return Array index on success, -1 if the string can't be found
|
||||
* @error Invalid handle.
|
||||
*/
|
||||
native ArrayFindString(Array:which, const item[]);
|
||||
|
||||
/**
|
||||
* Returns the index for the first occurance of the provided value. If the value
|
||||
* cannot be located, -1 will be returned.
|
||||
* Searches through the array and returns the index of the first occurence of
|
||||
* the specified value.
|
||||
*
|
||||
* @param which Array handle.
|
||||
* @param item Value to search for.
|
||||
* @param which Array handle
|
||||
* @param item Value to search for
|
||||
*
|
||||
* @return Array index, or -1 on failure.
|
||||
* @error Invalid handle.
|
||||
* @return Array index on success, -1 if the value can't be found
|
||||
* @error If an invalid handle is provided an error will be
|
||||
* thrown.
|
||||
*/
|
||||
native ArrayFindValue(Array:which, any:item);
|
||||
|
||||
/**
|
||||
* Creates a handle that is passable to a format compliant routine for printing as a string (with the %a format option).
|
||||
* It is suggested to pass the function directly as a parameter to the format routine.
|
||||
* The array contents must be a null-terminated string!
|
||||
* Creates a special handle that can be passed to a string format routine for
|
||||
* printing as a string (with the %a format option).
|
||||
*
|
||||
* An example usage: client_print(id, print_chat, "%a", ArrayGetStringHandle(MessageArray, i));
|
||||
* @note It is recommended to pass the function as a parameter to the format
|
||||
* routine directly. The array item must contain a null-terminated string!
|
||||
* @note Do not save or otherwise use the handles returned by this function.
|
||||
* @note Example usage:
|
||||
* console_print(id, "%a", ArrayGetStringHandle(MessageArray, i));
|
||||
*
|
||||
* @param which The array the string is stored in.
|
||||
* @param item Which item to print the string value of.
|
||||
* @param which Array handle
|
||||
* @param item Item to retrieve handle of
|
||||
*
|
||||
* @return Handle to the item directly. Do not use or save stale handles.
|
||||
* @error Invalid handle or invalid index.
|
||||
* @return Handle to the item
|
||||
* @error If an invalid handle or an invalid index is provided an
|
||||
* error will be thrown.
|
||||
*/
|
||||
native DoNotUse:ArrayGetStringHandle(Array:which, item);
|
||||
|
||||
/**
|
||||
* Destroys the array, and resets the handle to 0 to prevent accidental usage after it is destroyed.
|
||||
* Destroys the array and frees its memory.
|
||||
*
|
||||
* @param which The array to destroy.
|
||||
* @note The function automatically sets the variable passed to it to 0 to aid
|
||||
* in preventing accidental usage after destroy.
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle.
|
||||
* @param which Array to destroy
|
||||
*
|
||||
* @return 1 if the array was destroyed, 0 if nothing had to be
|
||||
* destroyed (invalid handle)
|
||||
*/
|
||||
native ArrayDestroy(&Array:which);
|
||||
|
||||
|
||||
/**
|
||||
* Similar to sorting.inc's CustomSort.
|
||||
* The sorting algorithm then uses your comparison function to sort the data.
|
||||
* The function is called in the following manner:
|
||||
* Similar to sorting.inc's CustomSort, the sorting algorithm then uses the
|
||||
* custom comparison function to sort the data.
|
||||
*
|
||||
* @note The function is called in the following manner:
|
||||
*
|
||||
* public MySortFunc(Array:array, item1, item2, const data[], data_size)
|
||||
*
|
||||
* array - Array handle in its current un-sorted state.
|
||||
* array - Array handle in its current un-sorted state
|
||||
* item1, item2 - Current item pair being compared
|
||||
* data[] - Extra data array you passed to the sort func.
|
||||
* data_size - Size of extra data you passed to the sort func.
|
||||
* data[] - Extra data array passed to the sort func
|
||||
* data_size - Size of extra data
|
||||
*
|
||||
* Your function should return:
|
||||
* -1 if item1 should go before item2
|
||||
* 0 if item1 and item2 are equal
|
||||
* 1 if item1 should go after item2
|
||||
* @note The comparison function should return:
|
||||
* -1 if item1 should go before item2
|
||||
* 0 if item1 and item2 are equal
|
||||
* 1 if item1 should go after item2
|
||||
*
|
||||
* Note that the parameters after item2 are all optional and you do not need to specify them.
|
||||
* Note that unlike the sorting.inc versions, the array passed to the callback is not in mid-sorted state.
|
||||
* @note All parameters after item2 are optional and do not need to be specified
|
||||
* and used.
|
||||
* @note Unlike the sorting.inc version, the array passed to the callback is not
|
||||
* in mid-sorted state.
|
||||
*
|
||||
* @param array Array handle.
|
||||
* @param comparefunc A callback function used for comparison.
|
||||
* @param data Extra data array you passed to the sort func.
|
||||
* @param data_size Size of extra data you passed to the sort func.
|
||||
* @param array Array handle
|
||||
* @param comparefunc Callback function used for comparison
|
||||
* @param data Extra data that is passed through to the callback
|
||||
* @param data_size Size of extra data
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle or invalid callback.
|
||||
* @error If an invalid handle or an invalid callback is provided
|
||||
* an error will be thrown.
|
||||
*/
|
||||
native ArraySort(Array:array, const comparefunc[], data[]="", data_size=0);
|
||||
|
||||
/**
|
||||
* A faster version of ArraySort.
|
||||
* The sorting algorithm then uses your comparison function to sort the data.
|
||||
* A faster version of ArraySort, the sorting algorithm then uses the custom
|
||||
* comparison function to sort the data.
|
||||
*
|
||||
* The advantage of this native is that the Array elements being compared are
|
||||
* directly passed into your function, instead of the item indexes that are passed by ArraySort.
|
||||
* This removes the need for calling ArrayGet[Cell|String|Array] every time before being
|
||||
* able to compare the elements.
|
||||
* @note The advantage of this function is that the data of the elements being
|
||||
* compared is directly passed to the function, instead of the item
|
||||
* indexes that are passed by ArraySort. This removes the need for calling
|
||||
* ArrayGet[Cell|String|Array] every time before being able to compare the
|
||||
* elements.
|
||||
*
|
||||
* For Arrays with a cellsize of 1 (used for storing integers and floats),
|
||||
* the function is called in the following manner:
|
||||
* @note For Arrays with a cellsize of 1 (used for storing integers and floats),
|
||||
* the function is called in the following manner:
|
||||
*
|
||||
* public MySortFunc(Array:array, elem1, elem2, const data[], data_size)
|
||||
*
|
||||
* array - Array handle in its current un-sorted state.
|
||||
* array - Array handle in its current un-sorted state
|
||||
* elem1, elem2 - Current element pair being compared
|
||||
* data[] - Extra data array you passed to the sort func.
|
||||
* data_size - Size of extra data you passed to the sort func.
|
||||
* data[] - Extra data array passed to the sort func
|
||||
* data_size - Size of extra data
|
||||
*
|
||||
* For Arrays with a cellsize larger than 1 (used for storing arrays and strings),
|
||||
* the function is called in the following manner:
|
||||
* @note For Arrays with a cellsize larger than 1 (used for storing arrays and
|
||||
* strings), the function is called in the following manner:
|
||||
*
|
||||
* public MySortFunc(Array:array, elem1[], elem2[], const data[], data_size)
|
||||
*
|
||||
* array - Array handle in its current un-sorted state.
|
||||
* array - Array handle in its current un-sorted state
|
||||
* elem1[], elem2[] - Current element pair being compared
|
||||
* data[] - Extra data array you passed to the sort func.
|
||||
* data_size - Size of extra data you passed to the sort func.
|
||||
* data[] - Extra data array passed to the sort func
|
||||
* data_size - Size of extra data
|
||||
*
|
||||
*
|
||||
* In both cases your function should return:
|
||||
* -1 if elem1 should go before elem2
|
||||
* 0 if elem1 and elem2 are equal
|
||||
* 1 if elem1 should go after elem2
|
||||
* @note The comparison function should return:
|
||||
* -1 if elem1 should go before elem2
|
||||
* 0 if elem1 and elem2 are equal
|
||||
* 1 if elem1 should go after elem2
|
||||
*
|
||||
* Note that the parameters after elem2 are all optional and you do not need to specify them.
|
||||
* Note that unlike the sorting.inc versions, the array passed to the callback is not in mid-sorted state.
|
||||
* @note All parameters after item2 are optional and do not need to be specified
|
||||
* and used.
|
||||
* @note Unlike the sorting.inc version, the array passed to the callback is not
|
||||
* in mid-sorted state.
|
||||
*
|
||||
* @param array Array handle.
|
||||
* @param comparefunc A callback function used for comparison.
|
||||
* @param data Extra data array you passed to the sort func.
|
||||
* @param data_size Size of extra data you passed to the sort func.
|
||||
* @param array Array handle
|
||||
* @param comparefunc Callback function used for comparison
|
||||
* @param data Extra data that is passed through to the callback
|
||||
* @param data_size Size of extra data
|
||||
*
|
||||
* @noreturn
|
||||
* @error Invalid handle, invalid callback or out of memory.
|
||||
* @error If an invalid handle or an invalid callback is provided
|
||||
* an error will be thrown.
|
||||
*/
|
||||
native ArraySortEx(Array:array, const comparefunc[], data[]="", data_size=0);
|
||||
|
@ -19,9 +19,9 @@
|
||||
/**
|
||||
* Ham return types.
|
||||
*
|
||||
* Return these from hooks to disable calling the target function.
|
||||
* Numbers match up with fakemeta's FMRES_* for clarity. They are interchangable.
|
||||
* 0 (or no return) is also interpretted as HAM_IGNORED.
|
||||
* @note Return these from hooks to disable calling the target function.
|
||||
* Numbers match up with fakemeta's FMRES_* for clarity. They are
|
||||
* interchangable. 0 (or no return) is also interpretted as HAM_IGNORED.
|
||||
*/
|
||||
#define HAM_IGNORED 1 /**< Calls target function, returns normal value */
|
||||
#define HAM_HANDLED 2 /**< Tells the module you did something, still calls target function and returns normal value */
|
||||
@ -29,24 +29,21 @@
|
||||
#define HAM_SUPERCEDE 4 /**< Block the target call, and use your return value (if applicable) (Set with SetHamReturn*()) */
|
||||
|
||||
/**
|
||||
* A few notes about all of the following functions:
|
||||
* - Not all functions will do as you expect on all mods.
|
||||
* If a function does not do what you would believe it should
|
||||
* DO NOT file a bug report, you will be ignored.
|
||||
* List of virtual functions made available through the hamsandwich module.
|
||||
*
|
||||
* - Passing invalid parameters has potential to crash the server
|
||||
* So be careful, and adequately test!
|
||||
*
|
||||
* - All functions take (and pass) a "this" index as the first param.
|
||||
* This is the entity from which the function is being executed on.
|
||||
*
|
||||
* - All functions and forwards (eg: {Register,Execute}Ham[B]) require
|
||||
* the mod to have the pev and base keys in addition to the function
|
||||
* keys for the corresponding mod/operating system in hamdata.ini
|
||||
*
|
||||
* - Some functions that return booleans may need to be logically ANDed
|
||||
* to get the results desired. e.g: if (ExecuteHam(Ham_TS_IsObjective, this) & 0x0000FFFF != 0) { // true.. }
|
||||
* because the module will return the full integer value.
|
||||
* @note Not all functions will do as you expect on all mods. If a function does
|
||||
* not do what you would believe it should DO NOT file a bug report, you
|
||||
* will be ignored.
|
||||
* @note Passing invalid parameters has potential to crash the server, so be
|
||||
* careful, and test carefully and adequately!
|
||||
* @note All functions take (and pass) a "this" index as the first param.
|
||||
* This is the entity from which the function is being executed on.
|
||||
* @note All functions and forwards (eg: {Register,Execute}Ham[B]) require
|
||||
* the mod to have the pev and base keys in addition to the function
|
||||
* keys for the corresponding mod/operating system in hamdata.ini
|
||||
* @note Some functions that return booleans may need to be logically ANDed
|
||||
* to get the desired results because the mod will return the full integer
|
||||
* value. E.g.: (ExecuteHam(Ham_TS_IsObjective, this) & 0x0000FFFF) != 0
|
||||
*/
|
||||
|
||||
enum Ham
|
||||
@ -3736,7 +3733,7 @@ enum Ham
|
||||
};
|
||||
|
||||
/**
|
||||
* Ham errors types.
|
||||
* Ham error types.
|
||||
*/
|
||||
enum HamError
|
||||
{
|
||||
@ -3749,8 +3746,7 @@ enum HamError
|
||||
};
|
||||
|
||||
/**
|
||||
* To be used with [Get|Set]HamItemInfo.
|
||||
* Ham prefix to avoid collision. :(
|
||||
* Constants for usage with [Get|Set]HamItemInfo
|
||||
*/
|
||||
enum HamItemInfo
|
||||
{
|
||||
|
@ -12,11 +12,13 @@
|
||||
//
|
||||
|
||||
#if defined _hlsdk_const_included
|
||||
#endinput
|
||||
#endinput
|
||||
#endif
|
||||
#define _hlsdk_const_included
|
||||
|
||||
// pev(entity, pev_button) or pev(entity, pev_oldbuttons) values
|
||||
/**
|
||||
* pev(entity, pev_button) or pev(entity, pev_oldbuttons) values
|
||||
*/
|
||||
#define IN_ATTACK (1<<0)
|
||||
#define IN_JUMP (1<<1)
|
||||
#define IN_DUCK (1<<2)
|
||||
@ -34,26 +36,28 @@
|
||||
#define IN_ALT1 (1<<14)
|
||||
#define IN_SCORE (1<<15) // Used by client.dll for when scoreboard is held down
|
||||
|
||||
// pev(entity, pev_flags) values
|
||||
#define FL_FLY (1<<0) // Changes the SV_Movestep() behavior to not need to be on ground
|
||||
#define FL_SWIM (1<<1) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
|
||||
#define FL_CONVEYOR (1<<2)
|
||||
#define FL_CLIENT (1<<3)
|
||||
#define FL_INWATER (1<<4)
|
||||
#define FL_MONSTER (1<<5)
|
||||
#define FL_GODMODE (1<<6)
|
||||
#define FL_NOTARGET (1<<7)
|
||||
#define FL_SKIPLOCALHOST (1<<8) // Don't send entity to local host, it's predicting this entity itself
|
||||
#define FL_ONGROUND (1<<9) // At rest / on the ground
|
||||
#define FL_PARTIALGROUND (1<<10) // Not all corners are valid
|
||||
#define FL_WATERJUMP (1<<11) // Player jumping out of water
|
||||
/**
|
||||
* pev(entity, pev_flags) values
|
||||
*/
|
||||
#define FL_FLY (1<<0) // Changes the SV_Movestep() behavior to not need to be on ground
|
||||
#define FL_SWIM (1<<1) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
|
||||
#define FL_CONVEYOR (1<<2)
|
||||
#define FL_CLIENT (1<<3)
|
||||
#define FL_INWATER (1<<4)
|
||||
#define FL_MONSTER (1<<5)
|
||||
#define FL_GODMODE (1<<6)
|
||||
#define FL_NOTARGET (1<<7)
|
||||
#define FL_SKIPLOCALHOST (1<<8) // Don't send entity to local host, it's predicting this entity itself
|
||||
#define FL_ONGROUND (1<<9) // At rest / on the ground
|
||||
#define FL_PARTIALGROUND (1<<10) // Not all corners are valid
|
||||
#define FL_WATERJUMP (1<<11) // Player jumping out of water
|
||||
#define FL_FROZEN (1<<12) // Player is frozen for 3rd person camera
|
||||
#define FL_FAKECLIENT (1<<13) // JAC: fake client, simulated server side; don't send network messages to them
|
||||
#define FL_DUCKING (1<<14) // Player flag -- Player is fully crouched
|
||||
#define FL_FLOAT (1<<15) // Apply floating force to this entity when in water
|
||||
#define FL_GRAPHED (1<<16) // Worldgraph has this ent listed as something that blocks a connection
|
||||
#define FL_IMMUNE_WATER (1<<17)
|
||||
#define FL_IMMUNE_SLIME (1<<18)
|
||||
#define FL_IMMUNE_SLIME (1<<18)
|
||||
#define FL_IMMUNE_LAVA (1<<19)
|
||||
#define FL_PROXY (1<<20) // This is a spectator proxy
|
||||
#define FL_ALWAYSTHINK (1<<21) // Brush model flag -- call think every frame regardless of nextthink - ltime (for constantly changing velocity/path)
|
||||
@ -66,63 +70,77 @@
|
||||
#define FL_KILLME (1<<30) // This entity is marked for death -- This allows the engine to kill ents at the appropriate time
|
||||
#define FL_DORMANT (1<<31) // Entity is dormant, no updates to client
|
||||
|
||||
// engfunc(EngFunc_WalkMove, entity, Float:yaw, Float:dist, iMode) iMode values
|
||||
#define WALKMOVE_NORMAL 0 // Normal walkmove
|
||||
/**
|
||||
* engfunc(EngFunc_WalkMove, entity, Float:yaw, Float:dist, iMode) iMode values
|
||||
*/
|
||||
#define WALKMOVE_NORMAL 0 // Normal walkmove
|
||||
#define WALKMOVE_WORLDONLY 1 // Doesn't hit ANY entities, no matter what the solid type
|
||||
#define WALKMOVE_CHECKONLY 2 // Move, but don't touch triggers
|
||||
|
||||
// pev(entity, pev_movetype) values
|
||||
#define MOVETYPE_NONE 0 // Never moves
|
||||
#define MOVETYPE_WALK 3 // Player only - moving on the ground
|
||||
#define MOVETYPE_STEP 4 // Gravity, special edge handling -- monsters use this
|
||||
#define MOVETYPE_FLY 5 // No gravity, but still collides with stuff
|
||||
#define MOVETYPE_TOSS 6 // Gravity/Collisions
|
||||
#define MOVETYPE_PUSH 7 // No clip to world, push and crush
|
||||
#define MOVETYPE_NOCLIP 8 // No gravity, no collisions, still do velocity/avelocity
|
||||
#define MOVETYPE_FLYMISSILE 9 // Extra size to monsters
|
||||
#define MOVETYPE_BOUNCE 10 // Just like Toss, but reflect velocity when contacting surfaces
|
||||
/**
|
||||
* pev(entity, pev_movetype) values
|
||||
*/
|
||||
#define MOVETYPE_NONE 0 // Never moves
|
||||
#define MOVETYPE_WALK 3 // Player only - moving on the ground
|
||||
#define MOVETYPE_STEP 4 // Gravity, special edge handling -- monsters use this
|
||||
#define MOVETYPE_FLY 5 // No gravity, but still collides with stuff
|
||||
#define MOVETYPE_TOSS 6 // Gravity/Collisions
|
||||
#define MOVETYPE_PUSH 7 // No clip to world, push and crush
|
||||
#define MOVETYPE_NOCLIP 8 // No gravity, no collisions, still do velocity/avelocity
|
||||
#define MOVETYPE_FLYMISSILE 9 // Extra size to monsters
|
||||
#define MOVETYPE_BOUNCE 10 // Just like Toss, but reflect velocity when contacting surfaces
|
||||
#define MOVETYPE_BOUNCEMISSILE 11 // Bounce w/o gravity
|
||||
#define MOVETYPE_FOLLOW 12 // Track movement of aiment
|
||||
#define MOVETYPE_PUSHSTEP 13 // BSP model that needs physics/world collisions (uses nearest hull for world collision)
|
||||
#define MOVETYPE_PUSHSTEP 13 // BSP model that needs physics/world collisions (uses nearest hull for world collision)
|
||||
|
||||
// pev(entity, pev_solid) values
|
||||
// NOTE: Some movetypes will cause collisions independent of SOLID_NOT/SOLID_TRIGGER when the entity moves
|
||||
// SOLID only effects OTHER entities colliding with this one when they move - UGH!
|
||||
#define SOLID_NOT 0 // No interaction with other objects
|
||||
#define SOLID_TRIGGER 1 // Touch on edge, but not blocking
|
||||
#define SOLID_BBOX 2 // Touch on edge, block
|
||||
#define SOLID_SLIDEBOX 3 // Touch on edge, but not an onground
|
||||
#define SOLID_BSP 4 // BSP clip, touch on edge, block
|
||||
/**
|
||||
* pev(entity, pev_solid) values
|
||||
*
|
||||
* @note Some movetypes will cause collisions independent of SOLID_NOT and
|
||||
* SOLID_TRIGGER when the entity moves. SOLID only effects OTHER entities
|
||||
* colliding with this one when they move - UGH!
|
||||
*/
|
||||
#define SOLID_NOT 0 // No interaction with other objects
|
||||
#define SOLID_TRIGGER 1 // Touch on edge, but not blocking
|
||||
#define SOLID_BBOX 2 // Touch on edge, block
|
||||
#define SOLID_SLIDEBOX 3 // Touch on edge, but not an onground
|
||||
#define SOLID_BSP 4 // BSP clip, touch on edge, block
|
||||
|
||||
// pev(entity, pev_deadflag) values
|
||||
#define DEAD_NO 0 // Alive
|
||||
#define DEAD_DYING 1 // Playing death animation or still falling off of a ledge waiting to hit ground
|
||||
#define DEAD_DEAD 2 // Dead, lying still
|
||||
/**
|
||||
* pev(entity, pev_deadflag) values
|
||||
*/
|
||||
#define DEAD_NO 0 // Alive
|
||||
#define DEAD_DYING 1 // Playing death animation or still falling off of a ledge waiting to hit ground
|
||||
#define DEAD_DEAD 2 // Dead, lying still
|
||||
#define DEAD_RESPAWNABLE 3
|
||||
#define DEAD_DISCARDBODY 4
|
||||
|
||||
// new Float:takedamage, pev(entity, pev_takedamage, takedamage) values
|
||||
#define DAMAGE_NO 0.0
|
||||
#define DAMAGE_YES 1.0
|
||||
#define DAMAGE_AIM 2.0
|
||||
/**
|
||||
* new Float:takedamage, pev(entity, pev_takedamage, takedamage) values
|
||||
*/
|
||||
#define DAMAGE_NO 0.0
|
||||
#define DAMAGE_YES 1.0
|
||||
#define DAMAGE_AIM 2.0
|
||||
|
||||
// pev(entity, pev_effects) values
|
||||
#define EF_BRIGHTFIELD 1 // Swirling cloud of particles
|
||||
#define EF_MUZZLEFLASH 2 // Single frame ELIGHT on entity attachment 0
|
||||
#define EF_BRIGHTLIGHT 4 // DLIGHT centered at entity origin
|
||||
#define EF_DIMLIGHT 8 // Player flashlight
|
||||
/**
|
||||
* pev(entity, pev_effects) values
|
||||
*/
|
||||
#define EF_BRIGHTFIELD 1 // Swirling cloud of particles
|
||||
#define EF_MUZZLEFLASH 2 // Single frame ELIGHT on entity attachment 0
|
||||
#define EF_BRIGHTLIGHT 4 // DLIGHT centered at entity origin
|
||||
#define EF_DIMLIGHT 8 // Player flashlight
|
||||
#define EF_INVLIGHT 16 // Get lighting from ceiling
|
||||
#define EF_NOINTERP 32 // Don't interpolate the next frame
|
||||
#define EF_LIGHT 64 // Rocket flare glow sprite
|
||||
#define EF_NODRAW 128 // Don't draw entity
|
||||
|
||||
/**
|
||||
* Spectating camera mode constants
|
||||
*
|
||||
* Those constants are linked to differents camera mode available when you are spectating.
|
||||
* (death or spectator team)
|
||||
* They are usually stored in pev_iuser1 field in Counter-Strike and Half-Life games.
|
||||
*/
|
||||
* Spectating camera mode constants
|
||||
*
|
||||
* @note These constants are linked to different camera modes available when you
|
||||
* are spectating (either dead or when in spectator team). Usually this is
|
||||
* stored in the pev_iuser1 field in Counter-Strike and Half-Life games.
|
||||
*/
|
||||
#define OBS_NONE 0
|
||||
#define OBS_CHASE_LOCKED 1 // Locked Chase Cam
|
||||
#define OBS_CHASE_FREE 2 // Free Chase Cam
|
||||
@ -131,28 +149,33 @@
|
||||
#define OBS_MAP_FREE 5 // Free Overview
|
||||
#define OBS_MAP_CHASE 6 // Chase Overview
|
||||
|
||||
// engfunc(EngFunc_PointContents, Float:origin) return values
|
||||
#define CONTENTS_EMPTY -1
|
||||
#define CONTENTS_SOLID -2
|
||||
#define CONTENTS_WATER -3
|
||||
#define CONTENTS_SLIME -4
|
||||
#define CONTENTS_LAVA -5
|
||||
#define CONTENTS_SKY -6
|
||||
#define CONTENTS_ORIGIN -7 // Removed at csg time
|
||||
#define CONTENTS_CLIP -8 // Changed to contents_solid
|
||||
#define CONTENTS_CURRENT_0 -9
|
||||
#define CONTENTS_CURRENT_90 -10
|
||||
#define CONTENTS_CURRENT_180 -11
|
||||
#define CONTENTS_CURRENT_270 -12
|
||||
#define CONTENTS_CURRENT_UP -13
|
||||
#define CONTENTS_CURRENT_DOWN -14
|
||||
/**
|
||||
* engfunc(EngFunc_PointContents, Float:origin) return values
|
||||
*/
|
||||
#define CONTENTS_EMPTY -1
|
||||
#define CONTENTS_SOLID -2
|
||||
#define CONTENTS_WATER -3
|
||||
#define CONTENTS_SLIME -4
|
||||
#define CONTENTS_LAVA -5
|
||||
#define CONTENTS_SKY -6
|
||||
#define CONTENTS_ORIGIN -7 // Removed at csg time
|
||||
#define CONTENTS_CLIP -8 // Changed to contents_solid
|
||||
#define CONTENTS_CURRENT_0 -9
|
||||
#define CONTENTS_CURRENT_90 -10
|
||||
#define CONTENTS_CURRENT_180 -11
|
||||
#define CONTENTS_CURRENT_270 -12
|
||||
#define CONTENTS_CURRENT_UP -13
|
||||
#define CONTENTS_CURRENT_DOWN -14
|
||||
#define CONTENTS_TRANSLUCENT -15
|
||||
#define CONTENTS_LADDER -16
|
||||
#define CONTENT_FLYFIELD -17
|
||||
#define CONTENT_GRAVITY_FLYFIELD -18
|
||||
#define CONTENT_FOG -19
|
||||
#define CONTENTS_LADDER -16
|
||||
#define CONTENT_FLYFIELD -17
|
||||
#define CONTENT_GRAVITY_FLYFIELD -18
|
||||
#define CONTENT_FOG -19
|
||||
|
||||
// Instant damage values for use with gmsgDamage 3rd value write_long(BIT)
|
||||
/**
|
||||
* Instant damage values for use with the 3rd parameter of the "Damage" client
|
||||
* message.
|
||||
*/
|
||||
#define DMG_GENERIC 0 // Generic damage was done
|
||||
#define DMG_CRUSH (1<<0) // Crushed by falling or moving object
|
||||
#define DMG_BULLET (1<<1) // Shot
|
||||
@ -180,99 +203,144 @@
|
||||
#define DMG_GRENADE (1<<24) // Counter-Strike only - Hit by HE grenade
|
||||
#define DMG_TIMEBASED (~(0x3fff)) // Mask for time-based damage
|
||||
|
||||
// The fNoMonsters parameter of EngFunc_TraceLine, EngFunc_TraceMonsterHull, EngFunc_TraceHull, and EngFunc_TraceSphere
|
||||
/**
|
||||
* Valid constants for fNoMonsters parameter of EngFunc_TraceLine,
|
||||
* EngFunc_TraceMonsterHull, EngFunc_TraceHull and EngFunc_TraceSphere.
|
||||
*/
|
||||
#define DONT_IGNORE_MONSTERS 0
|
||||
#define IGNORE_MONSTERS 1
|
||||
#define IGNORE_MISSILE 2
|
||||
#define IGNORE_GLASS 0x100
|
||||
|
||||
// The hullnumber paramater of EngFunc_TraceHull, EngFunc_TraceModel and DLLFunc_GetHullBounds
|
||||
/**
|
||||
* The hullnumber paramater of EngFunc_TraceHull, EngFunc_TraceModel and
|
||||
* DLLFunc_GetHullBounds
|
||||
*/
|
||||
#define HULL_POINT 0
|
||||
#define HULL_HUMAN 1
|
||||
#define HULL_LARGE 2
|
||||
#define HULL_HEAD 3
|
||||
|
||||
// global_get(glb_trace_flags)
|
||||
/**
|
||||
* global_get(glb_trace_flags)
|
||||
*/
|
||||
#define FTRACE_SIMPLEBOX (1<<0) // Traceline with a simple box
|
||||
|
||||
// Used with get/set_es(es_handle, ES_eFlags, ...) (entity_state data structure)
|
||||
/**
|
||||
* Used with get/set_es(es_handle, ES_eFlags, ...) (entity_state data structure)
|
||||
*/
|
||||
#define EFLAG_SLERP 1 // Do studio interpolation of this entity
|
||||
|
||||
// pev(entity, pev_spawnflags) values
|
||||
// Many of these flags apply to specific entities
|
||||
// func_train
|
||||
#define SF_TRAIN_WAIT_RETRIGGER 1
|
||||
/**
|
||||
* @section pev(entity, pev_spawnflags) values
|
||||
*/
|
||||
/**
|
||||
* func_train
|
||||
*/
|
||||
#define SF_TRAIN_WAIT_RETRIGGER 1
|
||||
#define SF_TRAIN_START_ON 4 // Train is initially moving
|
||||
#define SF_TRAIN_PASSABLE 8 // Train is not solid -- used to make water trains
|
||||
|
||||
// func_wall_toggle
|
||||
/**
|
||||
* func_wall_toggle
|
||||
*/
|
||||
#define SF_WALL_START_OFF 0x0001
|
||||
|
||||
// func_converyor
|
||||
/**
|
||||
* func_converyor
|
||||
*/
|
||||
#define SF_CONVEYOR_VISUAL 0x0001
|
||||
#define SF_CONVEYOR_NOTSOLID 0x0002
|
||||
|
||||
// func_button
|
||||
/**
|
||||
* func_button
|
||||
*/
|
||||
#define SF_BUTTON_DONTMOVE 1
|
||||
#define SF_BUTTON_TOGGLE 32 // Button stays pushed until reactivated
|
||||
#define SF_BUTTON_SPARK_IF_OFF 64 // Button sparks in OFF state
|
||||
#define SF_BUTTON_TOGGLE 32 // Button stays pushed until reactivated
|
||||
#define SF_BUTTON_SPARK_IF_OFF 64 // Button sparks in OFF state
|
||||
#define SF_BUTTON_TOUCH_ONLY 256 // Button only fires as a result of USE key.
|
||||
|
||||
// func_rot_button
|
||||
/**
|
||||
* func_rot_button
|
||||
*/
|
||||
#define SF_ROTBUTTON_NOTSOLID 1
|
||||
|
||||
// env_global
|
||||
/**
|
||||
* env_global
|
||||
*/
|
||||
#define SF_GLOBAL_SET 1 // Set global state to initial state on spawn
|
||||
|
||||
// multisource
|
||||
/**
|
||||
* multisource
|
||||
*/
|
||||
#define SF_MULTI_INIT 1
|
||||
|
||||
// momentary_rot_button
|
||||
/**
|
||||
* momentary_rot_button
|
||||
*/
|
||||
#define SF_MOMENTARY_DOOR 0x0001
|
||||
|
||||
// button_target
|
||||
/**
|
||||
* button_target
|
||||
*/
|
||||
#define SF_BTARGET_USE 0x0001
|
||||
#define SF_BTARGET_ON 0x0002
|
||||
|
||||
// func_door, func_water, func_door_rotating, momementary_door
|
||||
/**
|
||||
* func_door, func_water, func_door_rotating, momementary_door
|
||||
*/
|
||||
#define SF_DOOR_ROTATE_Y 0
|
||||
#define SF_DOOR_START_OPEN 1
|
||||
#define SF_DOOR_START_OPEN 1
|
||||
#define SF_DOOR_ROTATE_BACKWARDS 2
|
||||
#define SF_DOOR_PASSABLE 8
|
||||
#define SF_DOOR_ONEWAY 16
|
||||
#define SF_DOOR_NO_AUTO_RETURN 32
|
||||
#define SF_DOOR_NO_AUTO_RETURN 32
|
||||
#define SF_DOOR_ROTATE_Z 64
|
||||
#define SF_DOOR_ROTATE_X 128
|
||||
#define SF_DOOR_USE_ONLY 256 // Door must be opened by player's use button
|
||||
#define SF_DOOR_NOMONSTERS 512 // Monster can't open
|
||||
#define SF_DOOR_SILENT 0x80000000
|
||||
|
||||
// gibshooter
|
||||
#define SF_GIBSHOOTER_REPEATABLE 1 // Allows a gibshooter to be refired
|
||||
/**
|
||||
* gibshooter
|
||||
*/
|
||||
#define SF_GIBSHOOTER_REPEATABLE 1 // Allows a gibshooter to be refired
|
||||
|
||||
// env_funnel
|
||||
/**
|
||||
* env_funnel
|
||||
*/
|
||||
#define SF_FUNNEL_REVERSE 1 // Funnel effect repels particles instead of attracting them
|
||||
|
||||
// env_bubbles
|
||||
/**
|
||||
* env_bubbles
|
||||
*/
|
||||
#define SF_BUBBLES_STARTOFF 0x0001
|
||||
|
||||
// env_blood
|
||||
/**
|
||||
* env_blood
|
||||
*/
|
||||
#define SF_BLOOD_RANDOM 0x0001
|
||||
#define SF_BLOOD_STREAM 0x0002
|
||||
#define SF_BLOOD_PLAYER 0x0004
|
||||
#define SF_BLOOD_DECAL 0x0008
|
||||
|
||||
// env_shake
|
||||
/**
|
||||
* env_shake
|
||||
*/
|
||||
#define SF_SHAKE_EVERYONE 0x0001 // Don't check radius
|
||||
#define SF_SHAKE_DISRUPT 0x0002 // Disrupt controls
|
||||
#define SF_SHAKE_INAIR 0x0004 // Shake players in air
|
||||
|
||||
// env_fade
|
||||
/**
|
||||
* env_fade
|
||||
*/
|
||||
#define SF_FADE_IN 0x0001 // Fade in, not out
|
||||
#define SF_FADE_MODULATE 0x0002 // Modulate, don't blend
|
||||
#define SF_FADE_ONLYONE 0x0004
|
||||
|
||||
// env_beam, env_lightning
|
||||
/**
|
||||
* env_beam, env_lightning
|
||||
*/
|
||||
#define SF_BEAM_STARTON 0x0001
|
||||
#define SF_BEAM_TOGGLE 0x0002
|
||||
#define SF_BEAM_RANDOM 0x0004
|
||||
@ -284,24 +352,32 @@
|
||||
#define SF_BEAM_SHADEOUT 0x0100
|
||||
#define SF_BEAM_TEMPORARY 0x8000
|
||||
|
||||
// env_sprite
|
||||
/**
|
||||
* env_sprite
|
||||
*/
|
||||
#define SF_SPRITE_STARTON 0x0001
|
||||
#define SF_SPRITE_ONCE 0x0002
|
||||
#define SF_SPRITE_TEMPORARY 0x8000
|
||||
|
||||
// env_message
|
||||
/**
|
||||
* env_message
|
||||
*/
|
||||
#define SF_MESSAGE_ONCE 0x0001 // Fade in, not out
|
||||
#define SF_MESSAGE_ALL 0x0002 // Send to all clients
|
||||
|
||||
// env_explosion
|
||||
#define SF_ENVEXPLOSION_NODAMAGE (1<<0) // When set, ENV_EXPLOSION will not actually inflict damage
|
||||
#define SF_ENVEXPLOSION_REPEATABLE (1<<1) // Can this entity be refired?
|
||||
/**
|
||||
* env_explosion
|
||||
*/
|
||||
#define SF_ENVEXPLOSION_NODAMAGE (1<<0) // When set, ENV_EXPLOSION will not actually inflict damage
|
||||
#define SF_ENVEXPLOSION_REPEATABLE (1<<1) // Can this entity be refired?
|
||||
#define SF_ENVEXPLOSION_NOFIREBALL (1<<2) // Don't draw the fireball
|
||||
#define SF_ENVEXPLOSION_NOSMOKE (1<<3) // Don't draw the smoke
|
||||
#define SF_ENVEXPLOSION_NODECAL (1<<4) // Don't make a scorch mark
|
||||
#define SF_ENVEXPLOSION_NOSPARKS (1<<5) // Don't make a scorch mark
|
||||
|
||||
// func_tank
|
||||
/**
|
||||
* func_tank
|
||||
*/
|
||||
#define SF_TANK_ACTIVE 0x0001
|
||||
#define SF_TANK_PLAYER 0x0002
|
||||
#define SF_TANK_HUMANS 0x0004
|
||||
@ -310,43 +386,65 @@
|
||||
#define SF_TANK_CANCONTROL 0x0020
|
||||
#define SF_TANK_SOUNDON 0x8000
|
||||
|
||||
// grenade
|
||||
/**
|
||||
* grenade
|
||||
*/
|
||||
#define SF_DETONATE 0x0001
|
||||
|
||||
// item_suit
|
||||
/**
|
||||
* item_suit
|
||||
*/
|
||||
#define SF_SUIT_SHORTLOGON 0x0001
|
||||
|
||||
// game_score
|
||||
/**
|
||||
* game_score
|
||||
*/
|
||||
#define SF_SCORE_NEGATIVE 0x0001
|
||||
#define SF_SCORE_TEAM 0x0002
|
||||
|
||||
// game_text
|
||||
/**
|
||||
* game_text
|
||||
*/
|
||||
#define SF_ENVTEXT_ALLPLAYERS 0x0001
|
||||
|
||||
// game_team_master
|
||||
/**
|
||||
* game_team_master
|
||||
*/
|
||||
#define SF_TEAMMASTER_FIREONCE 0x0001
|
||||
#define SF_TEAMMASTER_ANYTEAM 0x0002
|
||||
|
||||
// game_team_set
|
||||
/**
|
||||
* game_team_set
|
||||
*/
|
||||
#define SF_TEAMSET_FIREONCE 0x0001
|
||||
#define SF_TEAMSET_CLEARTEAM 0x0002
|
||||
|
||||
// game_player_hurt
|
||||
/**
|
||||
* game_player_hurt
|
||||
*/
|
||||
#define SF_PKILL_FIREONCE 0x0001
|
||||
|
||||
// game_counter
|
||||
/**
|
||||
* game_counter
|
||||
*/
|
||||
#define SF_GAMECOUNT_FIREONCE 0x0001
|
||||
#define SF_GAMECOUNT_RESET 0x0002
|
||||
|
||||
// game_player_equip
|
||||
/**
|
||||
* game_player_equip
|
||||
*/
|
||||
#define SF_PLAYEREQUIP_USEONLY 0x0001
|
||||
|
||||
// game_player_team
|
||||
/**
|
||||
* game_player_team
|
||||
*/
|
||||
#define SF_PTEAM_FIREONCE 0x0001
|
||||
#define SF_PTEAM_KILL 0x0002
|
||||
#define SF_PTEAM_GIB 0x0004
|
||||
|
||||
// func_trackchange
|
||||
/**
|
||||
* func_trackchange
|
||||
*/
|
||||
#define SF_PLAT_TOGGLE 0x0001
|
||||
#define SF_TRACK_ACTIVATETRAIN 0x00000001
|
||||
#define SF_TRACK_RELINK 0x00000002
|
||||
@ -354,7 +452,9 @@
|
||||
#define SF_TRACK_STARTBOTTOM 0x00000008
|
||||
#define SF_TRACK_DONT_MOVE 0x00000010
|
||||
|
||||
// func_tracktrain
|
||||
/**
|
||||
* func_tracktrain
|
||||
*/
|
||||
#define SF_TRACKTRAIN_NOPITCH 0x0001
|
||||
#define SF_TRACKTRAIN_NOCONTROL 0x0002
|
||||
#define SF_TRACKTRAIN_FORWARDONLY 0x0004
|
||||
@ -368,83 +468,116 @@
|
||||
#define SF_CORNER_TELEPORT 0x002
|
||||
#define SF_CORNER_FIREONCE 0x004
|
||||
|
||||
// trigger_push
|
||||
#define SF_TRIGGER_PUSH_START_OFF 2 // Spawnflag that makes trigger_push spawn turned OFF
|
||||
/**
|
||||
* trigger_push
|
||||
*/
|
||||
#define SF_TRIGGER_PUSH_START_OFF 2 // Spawnflag that makes trigger_push spawn turned OFF
|
||||
|
||||
// trigger_hurt
|
||||
/**
|
||||
* trigger_hurt
|
||||
*/
|
||||
#define SF_TRIGGER_HURT_TARGETONCE 1 // Only fire hurt target once
|
||||
#define SF_TRIGGER_HURT_START_OFF 2 // Spawnflag that makes trigger_push spawn turned OFF
|
||||
#define SF_TRIGGER_HURT_NO_CLIENTS 8 // Spawnflag that makes trigger_push spawn turned OFF
|
||||
#define SF_TRIGGER_HURT_CLIENTONLYFIRE 16 // Trigger hurt will only fire its target if it is hurting a client
|
||||
#define SF_TRIGGER_HURT_START_OFF 2 // Spawnflag that makes trigger_push spawn turned OFF
|
||||
#define SF_TRIGGER_HURT_NO_CLIENTS 8 // Spawnflag that makes trigger_push spawn turned OFF
|
||||
#define SF_TRIGGER_HURT_CLIENTONLYFIRE 16 // Trigger hurt will only fire its target if it is hurting a client
|
||||
#define SF_TRIGGER_HURT_CLIENTONLYTOUCH 32 // Only clients may touch this trigger
|
||||
|
||||
// trigger_auto
|
||||
/**
|
||||
* trigger_auto
|
||||
*/
|
||||
#define SF_AUTO_FIREONCE 0x0001
|
||||
|
||||
// trigger_relay
|
||||
/**
|
||||
* trigger_relay
|
||||
*/
|
||||
#define SF_RELAY_FIREONCE 0x0001
|
||||
|
||||
// multi_manager
|
||||
/**
|
||||
* multi_manager
|
||||
*/
|
||||
#define SF_MULTIMAN_CLONE 0x80000000
|
||||
#define SF_MULTIMAN_THREAD 0x00000001
|
||||
|
||||
// env_render - Flags to indicate masking off various render parameters that are normally copied to the targets
|
||||
/**
|
||||
* env_render
|
||||
* @note These are flags to indicate masking off various render parameters that
|
||||
* are usually copied to the targets
|
||||
*/
|
||||
#define SF_RENDER_MASKFX (1<<0)
|
||||
#define SF_RENDER_MASKAMT (1<<1)
|
||||
#define SF_RENDER_MASKMODE (1<<2)
|
||||
#define SF_RENDER_MASKCOLOR (1<<3)
|
||||
|
||||
// trigger_changelevel
|
||||
/**
|
||||
* trigger_changelevel
|
||||
*/
|
||||
#define SF_CHANGELEVEL_USEONLY 0x0002
|
||||
|
||||
// trigger_endsection
|
||||
/**
|
||||
* trigger_endsection
|
||||
*/
|
||||
#define SF_ENDSECTION_USEONLY 0x0001
|
||||
|
||||
// trigger_camera
|
||||
/**
|
||||
* trigger_camera
|
||||
*/
|
||||
#define SF_CAMERA_PLAYER_POSITION 1
|
||||
#define SF_CAMERA_PLAYER_TARGET 2
|
||||
#define SF_CAMERA_PLAYER_TAKECONTROL 4
|
||||
|
||||
// func_rotating
|
||||
/**
|
||||
* func_rotating
|
||||
*/
|
||||
#define SF_BRUSH_ROTATE_Y_AXIS 0
|
||||
#define SF_BRUSH_ROTATE_INSTANT 1
|
||||
#define SF_BRUSH_ROTATE_BACKWARDS 2
|
||||
#define SF_BRUSH_ROTATE_Z_AXIS 4
|
||||
#define SF_BRUSH_ROTATE_X_AXIS 8
|
||||
#define SF_PENDULUM_AUTO_RETURN 16
|
||||
#define SF_PENDULUM_PASSABLE 32
|
||||
#define SF_PENDULUM_PASSABLE 32
|
||||
#define SF_BRUSH_ROTATE_SMALLRADIUS 128
|
||||
#define SF_BRUSH_ROTATE_MEDIUMRADIUS 256
|
||||
#define SF_BRUSH_ROTATE_LARGERADIUS 512
|
||||
|
||||
// triggers
|
||||
#define SF_TRIGGER_ALLOWMONSTERS 1 // Monsters allowed to fire this trigger
|
||||
#define SF_TRIGGER_NOCLIENTS 2 // Players not allowed to fire this trigger
|
||||
/**
|
||||
* triggers
|
||||
*/
|
||||
#define SF_TRIGGER_ALLOWMONSTERS 1 // Monsters allowed to fire this trigger
|
||||
#define SF_TRIGGER_NOCLIENTS 2 // Players not allowed to fire this trigger
|
||||
#define SF_TRIGGER_PUSHABLES 4 // Only pushables can fire this trigger
|
||||
|
||||
#define SF_TRIG_PUSH_ONCE 1
|
||||
// func_breakable
|
||||
|
||||
/**
|
||||
* func_breakable
|
||||
*/
|
||||
#define SF_BREAK_TRIGGER_ONLY 1 // May only be broken by trigger
|
||||
#define SF_BREAK_TOUCH 2 // Can be 'crashed through' by running player (plate glass)
|
||||
#define SF_BREAK_TOUCH 2 // Can be 'crashed through' by running player (plate glass)
|
||||
#define SF_BREAK_PRESSURE 4 // Can be broken by a player standing on it
|
||||
#define SF_BREAK_CROWBAR 256 // Instant break if hit with crowbar
|
||||
|
||||
// func_pushable (it's also func_breakable, so don't collide with those flags)
|
||||
/**
|
||||
* func_pushable (also func_breakable, so don't collide with those flags)
|
||||
*/
|
||||
#define SF_PUSH_BREAKABLE 128
|
||||
|
||||
// light_spawn
|
||||
/**
|
||||
* light_spawn
|
||||
*/
|
||||
#define SF_LIGHT_START_OFF 1
|
||||
#define SPAWNFLAG_NOMESSAGE 1
|
||||
#define SPAWNFLAG_NOTOUCH 1
|
||||
#define SPAWNFLAG_DROIDONLY 4
|
||||
#define SPAWNFLAG_USEONLY 1 // Can't be touched, must be used (buttons)
|
||||
|
||||
// Monster Spawnflags
|
||||
#define SF_MONSTER_WAIT_TILL_SEEN 1 // Spawnflag that makes monsters wait until player can see them before attacking
|
||||
#define SF_MONSTER_GAG 2 // No idle noises from this monster
|
||||
/**
|
||||
* Monster Spawnflags
|
||||
*/
|
||||
#define SF_MONSTER_WAIT_TILL_SEEN 1 // Spawnflag that makes monsters wait until player can see them before attacking
|
||||
#define SF_MONSTER_GAG 2 // No idle noises from this monster
|
||||
#define SF_MONSTER_HITMONSTERCLIP 4
|
||||
#define SF_MONSTER_PRISONER 16 // Monster won't attack anyone, no one will attacke him
|
||||
#define SF_MONSTER_WAIT_FOR_SCRIPT 128 // Spawnflag that makes monsters wait to check for attacking until the script is done or they've been attacked
|
||||
#define SF_MONSTER_WAIT_FOR_SCRIPT 128 // Spawnflag that makes monsters wait to check for attacking until the script is done or they've been attacked
|
||||
#define SF_MONSTER_PREDISASTER 256 // This is a predisaster scientist or barney; influences how they speak
|
||||
#define SF_MONSTER_FADECORPSE 512 // Fade out corpse after death
|
||||
#define SF_MONSTER_FALL_TO_GROUND 0x80000000
|
||||
@ -452,62 +585,77 @@
|
||||
#define SF_MONSTER_TURRET_STARTINACTIVE 64
|
||||
#define SF_MONSTER_WAIT_UNTIL_PROVOKED 64 // Don't attack the player unless provoked
|
||||
|
||||
// info_decal
|
||||
/**
|
||||
* info_decal
|
||||
*/
|
||||
#define SF_DECAL_NOTINDEATHMATCH 2048
|
||||
|
||||
// worldspawn
|
||||
/**
|
||||
* worldspawn
|
||||
*/
|
||||
#define SF_WORLD_DARK 0x0001 // Fade from black at startup
|
||||
#define SF_WORLD_TITLE 0x0002 // Display game title at startup
|
||||
#define SF_WORLD_FORCETEAM 0x0004 // Force teams
|
||||
|
||||
// Set this bit on guns and stuff that should never respawn
|
||||
/**
|
||||
* Set this bit on guns and stuff that should never respawn
|
||||
*/
|
||||
#define SF_NORESPAWN (1<<30)
|
||||
|
||||
// Valve Mod Weapon Constants
|
||||
#define HLI_HEALTHKIT 1
|
||||
#define HLI_ANTIDOTE 2
|
||||
#define HLI_SECURITY 3
|
||||
#define HLI_BATTERY 4
|
||||
/**
|
||||
* @endsection
|
||||
*/
|
||||
|
||||
#define HLW_NONE 0
|
||||
#define HLW_CROWBAR 1
|
||||
#define HLW_GLOCK 2
|
||||
#define HLW_PYTHON 3
|
||||
#define HLW_MP5 4
|
||||
#define HLW_CHAINGUN 5
|
||||
#define HLW_CROSSBOW 6
|
||||
#define HLW_SHOTGUN 7
|
||||
#define HLW_RPG 8
|
||||
#define HLW_GAUSS 9
|
||||
#define HLW_EGON 10
|
||||
#define HLW_HORNETGUN 11
|
||||
#define HLW_HANDGRENADE 12
|
||||
#define HLW_TRIPMINE 13
|
||||
#define HLW_SATCHEL 14
|
||||
#define HLW_SNARK 15
|
||||
#define HLW_SUIT 31
|
||||
#define HLW_ALLWEAPONS (~(1<<HLW_SUIT))
|
||||
/**
|
||||
* Valve Mod Weapon Constants
|
||||
*/
|
||||
#define HLI_HEALTHKIT 1
|
||||
#define HLI_ANTIDOTE 2
|
||||
#define HLI_SECURITY 3
|
||||
#define HLI_BATTERY 4
|
||||
|
||||
#define HLW_NONE 0
|
||||
#define HLW_CROWBAR 1
|
||||
#define HLW_GLOCK 2
|
||||
#define HLW_PYTHON 3
|
||||
#define HLW_MP5 4
|
||||
#define HLW_CHAINGUN 5
|
||||
#define HLW_CROSSBOW 6
|
||||
#define HLW_SHOTGUN 7
|
||||
#define HLW_RPG 8
|
||||
#define HLW_GAUSS 9
|
||||
#define HLW_EGON 10
|
||||
#define HLW_HORNETGUN 11
|
||||
#define HLW_HANDGRENADE 12
|
||||
#define HLW_TRIPMINE 13
|
||||
#define HLW_SATCHEL 14
|
||||
#define HLW_SNARK 15
|
||||
#define HLW_SUIT 31
|
||||
#define HLW_ALLWEAPONS (~(1<<HLW_SUIT))
|
||||
|
||||
|
||||
#define FEV_NOTHOST (1<<0) // Skip local host for event send.
|
||||
#define FEV_RELIABLE (1<<1) // Send the event reliably. You must specify the origin and angles
|
||||
// for this to work correctly on the server for anything
|
||||
// that depends on the event origin/angles. I.e., the origin/angles are not
|
||||
// taken from the invoking edict for reliable events.
|
||||
#define FEV_GLOBAL (1<<2) // Don't restrict to PAS/PVS, send this event to _everybody_ on the server ( useful for stopping CHAN_STATIC
|
||||
// sounds started by client event when client is not in PVS anymore ( hwguy in TFC e.g. ).
|
||||
#define FEV_UPDATE (1<<3) // If this client already has one of these events in its queue, just update the event instead of sending it as a duplicate
|
||||
#define FEV_HOSTONLY (1<<4) // Only send to entity specified as the invoker
|
||||
#define FEV_SERVER (1<<5) // Only send if the event was created on the server.
|
||||
#define FEV_CLIENT (1<<6) // Only issue event client side ( from shared code )
|
||||
#define FEV_NOTHOST (1<<0) // Skip local host for event send.
|
||||
#define FEV_RELIABLE (1<<1) // Send the event reliably. You must specify the origin and angles
|
||||
// for this to work correctly on the server for anything
|
||||
// that depends on the event origin/angles. I.e., the origin/angles are not
|
||||
// taken from the invoking edict for reliable events.
|
||||
#define FEV_GLOBAL (1<<2) // Don't restrict to PAS/PVS, send this event to _everybody_ on the server ( useful for stopping CHAN_STATIC
|
||||
// sounds started by client event when client is not in PVS anymore ( hwguy in TFC e.g. ).
|
||||
#define FEV_UPDATE (1<<3) // If this client already has one of these events in its queue, just update the event instead of sending it as a duplicate
|
||||
#define FEV_HOSTONLY (1<<4) // Only send to entity specified as the invoker
|
||||
#define FEV_SERVER (1<<5) // Only send if the event was created on the server.
|
||||
#define FEV_CLIENT (1<<6) // Only issue event client side ( from shared code )
|
||||
|
||||
// These are caps bits to indicate what an object's capabilities (currently used for save/restore and level transitions)
|
||||
#define FCAP_CUSTOMSAVE 0x00000001
|
||||
#define FCAP_ACROSS_TRANSITION 0x00000002 // should transfer between transitions
|
||||
#define FCAP_MUST_SPAWN 0x00000004 // Spawn after restore
|
||||
#define FCAP_DONT_SAVE 0x80000000 // Don't save this
|
||||
#define FCAP_IMPULSE_USE 0x00000008 // can be used by the player
|
||||
#define FCAP_CONTINUOUS_USE 0x00000010 // can be used by the player
|
||||
#define FCAP_ONOFF_USE 0x00000020 // can be used by the player
|
||||
#define FCAP_DIRECTIONAL_USE 0x00000040 // Player sends +/- 1 when using (currently only tracktrains)
|
||||
#define FCAP_MASTER 0x00000080 // Can be used to "master" other entities (like multisource)
|
||||
/**
|
||||
* Cap bits to indicate what an object's capabilities are, currently used for
|
||||
* save/restore and level transitions.
|
||||
*/
|
||||
#define FCAP_CUSTOMSAVE 0x00000001
|
||||
#define FCAP_ACROSS_TRANSITION 0x00000002 // should transfer between transitions
|
||||
#define FCAP_MUST_SPAWN 0x00000004 // Spawn after restore
|
||||
#define FCAP_DONT_SAVE 0x80000000 // Don't save this
|
||||
#define FCAP_IMPULSE_USE 0x00000008 // can be used by the player
|
||||
#define FCAP_CONTINUOUS_USE 0x00000010 // can be used by the player
|
||||
#define FCAP_ONOFF_USE 0x00000020 // can be used by the player
|
||||
#define FCAP_DIRECTIONAL_USE 0x00000040 // Player sends +/- 1 when using (currently only tracktrains)
|
||||
#define FCAP_MASTER 0x00000080 // Can be used to "master" other entities (like multisource)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -64,7 +64,7 @@ native socket_send(_socket, const _data[], _length);
|
||||
native socket_send2(_socket, const _data[], _length);
|
||||
|
||||
/* This function will return true if the state (buffer content) have changed within the last recieve or
|
||||
* the timeout, where timeout is a value in µSeconds, (1 sec =1000000 µsec).
|
||||
* the timeout, where timeout is a value in µSeconds, (1 sec =1000000 µsec).
|
||||
* Use to check if new data is in your socket. */
|
||||
|
||||
native socket_change(_socket, _timeout=100000);
|
||||
|
Loading…
Reference in New Issue
Block a user