updated header

This commit is contained in:
Felix Geyer 2004-02-08 11:31:54 +00:00
parent 983356c77e
commit 4478bb378f
10 changed files with 226 additions and 258 deletions

View File

@ -1,205 +1,201 @@
/* AMX Mod
*
* (c) 2002-2003, OLO
* This file is provided as is (no warranties).
*/
#if defined _amxconst_included
#endinput
#endif
#define _amxconst_included
/* AMX Mod X
*
* (c) 2002-2004, OLO
* modified by BAILOPAN, Manip, PM, SniperBeamer
*
* This file is provided as is (no warranties).
*/
// Uncomment if you are not using Steam
//#define NO_STEAM
#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_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_USER (1<<25) /* flag "z" */
#define ADMIN_LEVEL_H (1<<19) /* flag "t" */
#define ADMIN_MENU (1<<20) /* flag "u" */
#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_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 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 */
/* Destination types for message_begin() */
#define MSG_BROADCAST 0 /* unreliable to all */
#define MSG_ONE 1 /* reliable to one (msg_entity) */
#define MSG_ALL 2 /* reliable to all */
#define MSG_INIT 3 /* write to the init string */
#define MSG_PVS 4 /* Ents in PVS of org */
#define MSG_PAS 5 /* Ents in PAS of org */
#define MSG_PVS_R 6 /* Reliable to PVS */
#define MSG_PAS_R 7 /* Reliable to PAS */
#define MSG_ONE_UNRELIABLE 8 /* Send to one client, but don't put in reliable stream, put in unreliable datagram ( could be dropped ) */
#define MSG_SPEC 9 /* Sends to all spectator proxies */
#define MSG_BROADCAST 0 /* unreliable to all */
#define MSG_ONE 1 /* reliable to one (msg_entity) */
#define MSG_ALL 2 /* reliable to all */
#define MSG_INIT 3 /* write to the init string */
#define MSG_PVS 4 /* Ents in PVS of org */
#define MSG_PAS 5 /* Ents in PAS of org */
#define MSG_PVS_R 6 /* Reliable to PVS */
#define MSG_PAS_R 7 /* Reliable to PAS */
#define MSG_ONE_UNRELIABLE 8 /* Send to one client, but don't put in reliable stream, put in unreliable datagram ( could be dropped ) */
#define MSG_SPEC 9 /* Sends to all spectator proxies */
/* Message types for message_begin() */
#define SVC_TEMPENTITY 23
#define SVC_INTERMISSION 30
#define SVC_CDTRACK 32
#define SVC_WEAPONANIM 35
#define SVC_ROOMTYPE 37
#define SVC_ADDANGLE 38 /* [vec3] add this angle to the view angle */
#define SVC_TEMPENTITY 23
#define SVC_INTERMISSION 30
#define SVC_CDTRACK 32
#define SVC_WEAPONANIM 35
#define SVC_ROOMTYPE 37
#define SVC_ADDANGLE 38 /* [vec3] add this angle to the view angle */
#define SVC_NEWUSERMSG 39
#define SVC_HLTV 50
#define SVC_HLTV 50
/* 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 */
/* Id 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_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_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_GALIL 14
#define CSW_FAMAS 15
#define CSW_USP 16
#define CSW_GLOCK18 17
#define CSW_AWP 18
#define CSW_MP5NAV 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
/* Parts of body for hits */
#define HIT_GENERIC 0 /* none */
#define HIT_HEAD 1
#define HIT_CHEST 2
#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_RIGHTARM 5
#define HIT_LEFTLEG 6
#define HIT_RIGHTLEG 7
#define HIT_RIGHTLEG 7
/* Constants for emit_sound() */
/* Channels */
#define CHAN_AUTO 0
#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_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_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_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
/* Destination types for client_print() */
enum {
print_notify = 1,
print_console,
print_chat,
print_center,
print_notify = 1,
print_console,
print_chat,
print_center,
}
/* Destination types for engclient_print() */
enum {
engprint_console = 0,
engprint_center,
engprint_chat,
engprint_console = 0,
engprint_center,
engprint_chat,
}
/* Render for set_user_rendering() */
enum {
kRenderNormal, /* 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, /* 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() */
enum {
kRenderFxNone = 0,
kRenderFxPulseSlow,
kRenderFxPulseFast,
kRenderFxPulseSlowWide,
kRenderFxPulseFastWide,
kRenderFxFadeSlow,
kRenderFxFadeFast,
kRenderFxSolidSlow,
kRenderFxSolidFast,
kRenderFxStrobeSlow,
kRenderFxStrobeFast,
kRenderFxStrobeFaster,
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!) */
kRenderFxNone = 0,
kRenderFxPulseSlow,
kRenderFxPulseFast,
kRenderFxPulseSlowWide,
kRenderFxPulseFastWide,
kRenderFxFadeSlow,
kRenderFxFadeFast,
kRenderFxSolidSlow,
kRenderFxSolidFast,
kRenderFxStrobeSlow,
kRenderFxStrobeFast,
kRenderFxStrobeFaster,
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!) */
}
enum {
force_exactfile, /* File on client must exactly match server's file */
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 */
}
}

View File

@ -1,26 +1,23 @@
/* AMX Mod misc.
*
* (c) 2002-2003, OLO
* This file is provided as is (no warranties).
*/
/* AMX Mod X misc.
*
* (c) 2002-2004, OLO
* modified by BAILOPAN, Manip, PM, SniperBeamer
*
* This file is provided as is (no warranties).
*/
#if defined _amxmisc_included
#endinput
#endif
#define _amxmisc_included
stock cmd_access(a,b,c,d){
if ( ((get_user_flags(a)&b)!=b) && (a!=(is_dedicated_server()?0:1)) ){
console_print(a,"You have no access to that command")
return 0
stock bool:cmd_access(id,level,cid,num) {
if ( ((get_user_flags(id)&level)!=level) && (id!=(is_dedicated_server()?0:1)) ) {
console_print(id,"You have no access to that command")
return false
}
if (read_argc() < d){
if (read_argc() < num) {
new hcmd[32], hinfo[128], hflag
get_concmd(c,hcmd,31,hflag,hinfo,127,b)
console_print(a,"Usage: %s %s",hcmd,hinfo)
return 0
get_concmd(cid,hcmd,31,hflag,hinfo,127,level)
console_print(id,"Usage: %s %s",hcmd,hinfo)
return false
}
return 1
return true
}
stock access(id,level)
@ -34,36 +31,36 @@ stock access(id,level)
*/
stock cmd_target(id,const arg[],flags = 1) {
new player = find_player("bl",arg)
if (player){
if ( player != find_player("blj",arg) ){
if (player) {
if ( player != find_player("blj",arg) ) {
console_print(id,"There are more clients matching to your argument")
return 0
}
}
else if ( ( player = find_player("c",arg) )==0 && arg[0]=='#' && arg[1] )
player = find_player("k",strtonum(arg[1]))
if (!player){
if (!player) {
console_print(id,"Client with that name or userid not found")
return 0
}
if (flags & 1){
if ((get_user_flags(player)&ADMIN_IMMUNITY) && ((flags&2)?(id!=player):true) ){
if (flags & 1) {
if ((get_user_flags(player)&ADMIN_IMMUNITY) && ((flags&2)?(id!=player):true) ) {
new imname[32]
get_user_name(player,imname,31)
console_print(id,"Client ^"%s^" has immunity",imname)
return 0
}
}
if (flags & 4){
if (!is_user_alive(player)){
if (flags & 4) {
if (!is_user_alive(player)) {
new imname[32]
get_user_name(player,imname,31)
console_print(id,"That action can't be performed on dead client ^"%s^"",imname)
return 0
}
}
if (flags & 8){
if (is_user_bot(player)){
if (flags & 8) {
if (is_user_bot(player)) {
new imname[32]
get_user_name(player,imname,31)
console_print(id,"That action can't be performed on bot ^"%s^"",imname)
@ -73,9 +70,9 @@ stock cmd_target(id,const arg[],flags = 1) {
return player
}
stock show_activity( id, const name[], {Float,_}: ... ){
stock show_activity( id, const name[], {Float,_}: ... ) {
new buffer[128]
format_args( buffer , 127 , 2 )
format_args( buffer , 127 , 2 )
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"%s %s: %s",
(get_user_flags(id) & ADMIN_USER) ? "PLAYER" : "ADMIN" , name , buffer )
@ -84,7 +81,7 @@ stock show_activity( id, const name[], {Float,_}: ... ){
}
}
stock is_running(const arg[]){
stock is_running(const arg[]) {
new mod_name[32]
get_modname(mod_name,31)
return equal(mod_name,arg)
@ -97,8 +94,8 @@ stock build_path( path[] , len , {Float,_}:... ) {
return replace( path , len , "$basedir", basedir )
}
stock get_basedir( name[], len )
stock get_basedir( name[], len )
return get_localinfo( "amx_basedir", name , len )
stock get_logfile( name[], len )
return get_time("admin%m%d.log",name,len)
stock get_logfile( name[], len )
return get_time("admin%m%d.log",name,len)

View File

@ -1,13 +1,10 @@
/* AMX Mod functions
*
* (c) 2002-2003, OLO
* This file is provided as is (no warranties).
*/
#if defined _amxmod_included
#endinput
#endif
#define _amxmod_included
/* AMX Mod X functions
*
* (c) 2002-2004, OLO
* modified by BAILOPAN, Manip, PM, SniperBeamer
*
* This file is provided as is (no warranties).
*/
#include <core>
#include <float>
@ -556,4 +553,4 @@ native set_xvar_num( id, value = 0 );
/* Sets a float value of a public variable. Id is a value
* returned by get_xvar_id(...) native. */
native set_xvar_float( id, Float:value = 0.0 );
native set_xvar_float( id, Float:value = 0.0 );

View File

@ -1,12 +1,9 @@
/* Core functions
*
* (c) Copyright 1998-2002, ITB CompuPhase
* This file is provided as is (no warranties).
*/
#if defined _core_included
#endinput
#endif
#define _core_included
*
* (c) Copyright 1998-2003, ITB CompuPhase
*
* This file is provided as is (no warranties).
*/
native heapspace();

View File

@ -1,13 +1,10 @@
/* CS Stats functions
*
* (c) 2002-2003, OLO
* This file is provided as is (no warranties).
*/
#if defined _csstats_included
#endinput
#endif
#define _csstats_included
*
* (c) 2002-2004, OLO
* modified by BAILOPAN, Manip, PM, SniperBeamer
*
* This file is provided as is (no warranties).
*/
/* Gets stats from given weapon index. If wpnindex is 0
* then the stats are from all weapons. If weapon has not been used function

View File

@ -1,14 +1,10 @@
/* Files functions
*
* (c) 2002-2003, OLO
* This file is provided as is (no warranties).
*/
#if defined _file_included
#endinput
#endif
#define _file_included
*
* (c) 2002-2004, OLO
* modified by BAILOPAN, Manip, PM, SniperBeamer
*
* This file is provided as is (no warranties).
*/
/* Reads content from directory.
* Returns index of next element or 0 when end of dir. is reached. */
@ -31,4 +27,4 @@ native file_exists(const file[]);
When flag is set to 1 returns number of lines in the file,
and when flags is 2, function returns 1 if the file ends
with line feed. If file doesn't exist returns -1.*/
native file_size(const file[], flag=0);
native file_size(const file[], flag=0);

View File

@ -1,13 +1,10 @@
/* Fun functions
*
* (c) 2002-2003, OLO
* This file is provided as is (no warranties).
*/
#if defined _fun_included
#endinput
#endif
#define _fun_included
*
* (c) 2002-2004, OLO
* modified by BAILOPAN, Manip, PM, SniperBeamer
*
* This file is provided as is (no warranties).
*/
/* Sets who can listen who. Function returns 0
* if for some reasons this setting can't be done. */
@ -83,4 +80,4 @@ native Float:get_user_gravity(index);
native set_user_money(index,money,flash=1);
/* Returns users money. */
native get_user_money(index);
native get_user_money(index);

View File

@ -1,13 +1,10 @@
/* MySQL functions
*
* (c) Copyright 2002, dJeyL
* This file is provided as is (no warranties).
*/
#if defined _mysql_included
#endinput
#endif
#define _mysql_included
*
* (c) Copyright 2002-2004, dJeyL
* modified by BAILOPAN, Manip, PM, SniperBeamer
*
* This file is provided as is (no warranties).
*/
/* Opens connection. If already such exists then that will be used.
* Function returns sql id to use with other sql natives.

View File

@ -1,13 +1,10 @@
/* Strings manipulation
*
* (c) 2002-2003, OLO
* This file is provided as is (no warranties).
*/
#if defined _string_included
#endinput
#endif
#define _string_included
*
* (c) 2002-2004, OLO
* modified by BAILOPAN, Manip, PM, SniperBeamer
*
* This file is provided as is (no warranties).
*/
/* Checks if source contains string. On success function
* returns position in source, on failure returns -1. */

View File

@ -1,14 +1,11 @@
/* Vault
*
* (c) 2002-2003, OLO
* (c) 2002-2004, OLO
* modified by BAILOPAN, Manip, PM, SniperBeamer
*
* This file is provided as is (no warranties).
*/
#if defined _vault_included
#endinput
#endif
#define _vault_included
/* Reads a data from given key.
* If len is set to zero then get_vaultdata
* returns value as an number. */
@ -21,4 +18,4 @@ native set_vaultdata(const key[], const data[] = "" );
native remove_vaultdata(const key[]);
/* Checks if a key exists in the vault.*/
native vaultdata_exists(const key[]);
native vaultdata_exists(const key[]);