commit
96d5670b18
10
.gitattributes
vendored
Normal file
10
.gitattributes
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
*.sp text eol=native
|
||||
*.inc text eol=native
|
||||
|
||||
*.txt text eol=crlf
|
||||
*.cfg text eol=crlf
|
||||
|
||||
*.sh text eol=lf
|
||||
*.bat text eol=crlf
|
||||
|
||||
Makefile text eol=lf
|
4
Makefile
4
Makefile
@ -4,8 +4,8 @@
|
||||
SOURCEDIR=src
|
||||
SMINCLUDES=env/include
|
||||
BUILDDIR=build
|
||||
SPCOMP_LINUX=env/linux/bin/spcomp-1.4.1
|
||||
SPCOMP_DARWIN=env/darwin/bin/spcomp-1.4.1
|
||||
SPCOMP_LINUX=env/linux/bin/spcomp-1.6.0
|
||||
SPCOMP_DARWIN=env/darwin/bin/spcomp-1.6.0
|
||||
DOS2UNIX_LINUX=dos2unix -p
|
||||
DOS2UNIX_DARWIN=env/darwin/bin/dos2unix -p
|
||||
VERSIONDUMP=./updateversion.sh
|
||||
|
6
build.sh
6
build.sh
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
VERSION="zombiereloaded-3.1"
|
||||
REVISION=$(hg id -n)
|
||||
REVISION=$(git rev-parse --short HEAD)
|
||||
|
||||
SYNTAX="Usage: $0 [--patch <base rev>]"
|
||||
|
||||
@ -18,7 +18,7 @@ SOURCE_DEST=$RELEASEDIR/addons/sourcemod/scripting
|
||||
DOCS_DEST=$RELEASEDIR/zrdocs
|
||||
PLUGINDIR=$RELEASEDIR/addons/sourcemod/plugins
|
||||
EXTENSIONDIR=$RELEASEDIR/addons/sourcemod/extensions
|
||||
ZIPFILE=$VERSION-r$REVISION.zip
|
||||
ZIPFILE=$VERSION-$REVISION.zip
|
||||
|
||||
MAKEPATCH=false
|
||||
|
||||
@ -47,7 +47,7 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ZIPFILE=$VERSION-patch-r$PATCHREV-r$REVISION.zip
|
||||
ZIPFILE=$VERSION-patch-$PATCHREV-$REVISION.zip
|
||||
else
|
||||
echo "Missing base revision number. $SYNTAX"
|
||||
exit 1
|
||||
|
50
compile.bat
50
compile.bat
@ -1,25 +1,25 @@
|
||||
@echo off
|
||||
|
||||
set SOURCEDIR=src
|
||||
set SMINCLUDES=env\include
|
||||
set BUILDDIR=build
|
||||
set SPCOMP=env\win32\bin\spcomp-1.4.1.exe
|
||||
set VERSIONDUMP=updateversion.bat
|
||||
|
||||
:: Dump version and revision information first.
|
||||
echo Updating version and revision info...
|
||||
start /wait %VERSIONDUMP%
|
||||
|
||||
:: Make build directory.
|
||||
if not exist "%BUILDDIR%" (
|
||||
mkdir %BUILDDIR%
|
||||
)
|
||||
|
||||
:: Compile.
|
||||
echo Starting compiler:
|
||||
%SPCOMP% -i%SOURCEDIR% -i%SOURCEDIR%/include -i%SMINCLUDES% -o%BUILDDIR%/zombiereloaded.smx %SOURCEDIR%\zombiereloaded.sp
|
||||
|
||||
echo Compiling done. This script is looped, close if you're done.
|
||||
pause
|
||||
|
||||
compile.bat
|
||||
@echo off
|
||||
|
||||
set SOURCEDIR=src
|
||||
set SMINCLUDES=env\include
|
||||
set BUILDDIR=build
|
||||
set SPCOMP=env\win32\bin\spcomp-1.6.0.exe
|
||||
set VERSIONDUMP=updateversion.bat
|
||||
|
||||
:: Dump version and revision information first.
|
||||
echo Updating version and revision info...
|
||||
start /wait %VERSIONDUMP%
|
||||
|
||||
:: Make build directory.
|
||||
if not exist "%BUILDDIR%" (
|
||||
mkdir %BUILDDIR%
|
||||
)
|
||||
|
||||
:: Compile.
|
||||
echo Starting compiler:
|
||||
%SPCOMP% -i%SOURCEDIR% -i%SOURCEDIR%/include -i%SMINCLUDES% -o%BUILDDIR%/zombiereloaded.smx %SOURCEDIR%\zombiereloaded.sp
|
||||
|
||||
echo Compiling done. This script is looped, close if you're done.
|
||||
pause
|
||||
|
||||
compile.bat
|
||||
|
@ -1,30 +1,30 @@
|
||||
This plugin has a command for dumping detailed version info (zr_version) based
|
||||
on info from a automatically generated file (hgversion.h.inc).
|
||||
|
||||
There's a script that generate this file and must be executed every time before
|
||||
compiling:
|
||||
|
||||
Linux: updateversion.sh
|
||||
Windows: updateversion.bat (Executes updateversion.sh using Cygwin)
|
||||
|
||||
Mercurial (or TortoiseHG) must be installed for this script to work. If you
|
||||
don't have Mercurial, there's an option to disable version info. In
|
||||
zombiereloaded.sp there's a line like this:
|
||||
|
||||
#define ADD_VERSION_INFO
|
||||
|
||||
To disable it, comment that line like this:
|
||||
|
||||
//#define ADD_VERSION_INFO
|
||||
|
||||
Then you should be able to compile without hgversion.h.inc.
|
||||
|
||||
On linux use the makefile to compile since that one will do most of the work.
|
||||
Make sure you clean any existing builds before compiling:
|
||||
|
||||
make clean
|
||||
make
|
||||
|
||||
For compiling on windows, run:
|
||||
|
||||
compile.bat
|
||||
This plugin has a command for dumping detailed version info (zr_version) based
|
||||
on info from a automatically generated file (hgversion.h.inc).
|
||||
|
||||
There's a script that generate this file and must be executed every time before
|
||||
compiling:
|
||||
|
||||
Linux: updateversion.sh
|
||||
Windows: updateversion.bat (Executes updateversion.sh using Cygwin)
|
||||
|
||||
Mercurial (or TortoiseHG) must be installed for this script to work. If you
|
||||
don't have Mercurial, there's an option to disable version info. In
|
||||
zombiereloaded.sp there's a line like this:
|
||||
|
||||
#define ADD_VERSION_INFO
|
||||
|
||||
To disable it, comment that line like this:
|
||||
|
||||
//#define ADD_VERSION_INFO
|
||||
|
||||
Then you should be able to compile without hgversion.h.inc.
|
||||
|
||||
On linux use the makefile to compile since that one will do most of the work.
|
||||
Make sure you clean any existing builds before compiling:
|
||||
|
||||
make clean
|
||||
make
|
||||
|
||||
For compiling on windows, run:
|
||||
|
||||
compile.bat
|
||||
|
@ -1,33 +1,33 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// ZOMBIE:RELOADED
|
||||
// Downloads configuration
|
||||
//
|
||||
// See Download List (3.6) section in the manual for detailed info.
|
||||
//
|
||||
// ============================================================================
|
||||
// * Each uncommented line will be used as a file path for clients to download.
|
||||
// ----------------------------------------------------------------------------
|
||||
// Defaults:
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
materials/models/player/zh/Zombie_Classic_sheet.vmt
|
||||
materials/models/player/zh/corpse1.vmt
|
||||
materials/models/player/zh/Charple1_sheet.vmt
|
||||
|
||||
// hellknight
|
||||
materials/models/player/ics/hellknight_red/estuche.vmt
|
||||
materials/models/player/ics/hellknight_red/estuche.vtf
|
||||
materials/models/player/ics/hellknight_red/hellknight.vmt
|
||||
materials/models/player/ics/hellknight_red/hellknight.vtf
|
||||
materials/models/player/ics/hellknight_red/hellknight_normal.vtf
|
||||
|
||||
// team win overlays
|
||||
materials/overlays/zr/zombies_win.vtf
|
||||
materials/overlays/zr/zombies_win.vmt
|
||||
materials/overlays/zr/humans_win.vtf
|
||||
materials/overlays/zr/humans_win.vmt
|
||||
|
||||
// zvision
|
||||
materials/overlays/zr/zvision.vtf
|
||||
materials/overlays/zr/zvision.vmt
|
||||
// ============================================================================
|
||||
//
|
||||
// ZOMBIE:RELOADED
|
||||
// Downloads configuration
|
||||
//
|
||||
// See Download List (3.6) section in the manual for detailed info.
|
||||
//
|
||||
// ============================================================================
|
||||
// * Each uncommented line will be used as a file path for clients to download.
|
||||
// ----------------------------------------------------------------------------
|
||||
// Defaults:
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
materials/models/player/zh/Zombie_Classic_sheet.vmt
|
||||
materials/models/player/zh/corpse1.vmt
|
||||
materials/models/player/zh/Charple1_sheet.vmt
|
||||
|
||||
// hellknight
|
||||
materials/models/player/ics/hellknight_red/estuche.vmt
|
||||
materials/models/player/ics/hellknight_red/estuche.vtf
|
||||
materials/models/player/ics/hellknight_red/hellknight.vmt
|
||||
materials/models/player/ics/hellknight_red/hellknight.vtf
|
||||
materials/models/player/ics/hellknight_red/hellknight_normal.vtf
|
||||
|
||||
// team win overlays
|
||||
materials/overlays/zr/zombies_win.vtf
|
||||
materials/overlays/zr/zombies_win.vmt
|
||||
materials/overlays/zr/humans_win.vtf
|
||||
materials/overlays/zr/humans_win.vmt
|
||||
|
||||
// zvision
|
||||
materials/overlays/zr/zvision.vtf
|
||||
materials/overlays/zr/zvision.vmt
|
||||
|
@ -1,127 +1,127 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// ZOMBIE:RELOADED
|
||||
// Hitgroup configuration
|
||||
//
|
||||
// Check the hitgroup configuration section in the manual for detailed info.
|
||||
//
|
||||
// ============================================================================
|
||||
//
|
||||
// SHORT DESCRIPTIONS
|
||||
//
|
||||
// Attribute: Values: Description:
|
||||
// ----------------------------------------------------------------------------
|
||||
// index number The hitgroup index.
|
||||
// damage on/off Allow damage to be done on this hitgroup for zombies.
|
||||
// knockback decimal The knockback multiplier for this hitgroup.
|
||||
|
||||
"hitgroups" // Counter-Strike: Source hitgroups
|
||||
{
|
||||
"Generic"
|
||||
{
|
||||
// General
|
||||
"index" "0"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "1.0"
|
||||
}
|
||||
|
||||
"Head"
|
||||
{
|
||||
// General
|
||||
"index" "1"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "1.2"
|
||||
}
|
||||
|
||||
"Chest"
|
||||
{
|
||||
// General
|
||||
"index" "2"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "1.0"
|
||||
}
|
||||
|
||||
"Stomach"
|
||||
{
|
||||
// General
|
||||
"index" "3"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "1.0"
|
||||
}
|
||||
|
||||
"LeftArm"
|
||||
{
|
||||
// General
|
||||
"index" "4"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "0.9"
|
||||
}
|
||||
|
||||
"RightArm"
|
||||
{
|
||||
// General
|
||||
"index" "5"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "0.9"
|
||||
}
|
||||
|
||||
"LeftLeg"
|
||||
{
|
||||
// General
|
||||
"index" "6"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "0.9"
|
||||
}
|
||||
|
||||
"RightLeg"
|
||||
{
|
||||
// General
|
||||
"index" "7"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "0.9"
|
||||
}
|
||||
|
||||
"Gear"
|
||||
{
|
||||
// General
|
||||
"index" "8"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "1.0"
|
||||
}
|
||||
}
|
||||
// ============================================================================
|
||||
//
|
||||
// ZOMBIE:RELOADED
|
||||
// Hitgroup configuration
|
||||
//
|
||||
// Check the hitgroup configuration section in the manual for detailed info.
|
||||
//
|
||||
// ============================================================================
|
||||
//
|
||||
// SHORT DESCRIPTIONS
|
||||
//
|
||||
// Attribute: Values: Description:
|
||||
// ----------------------------------------------------------------------------
|
||||
// index number The hitgroup index.
|
||||
// damage on/off Allow damage to be done on this hitgroup for zombies.
|
||||
// knockback decimal The knockback multiplier for this hitgroup.
|
||||
|
||||
"hitgroups" // Counter-Strike: Source hitgroups
|
||||
{
|
||||
"Generic"
|
||||
{
|
||||
// General
|
||||
"index" "0"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "1.0"
|
||||
}
|
||||
|
||||
"Head"
|
||||
{
|
||||
// General
|
||||
"index" "1"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "1.2"
|
||||
}
|
||||
|
||||
"Chest"
|
||||
{
|
||||
// General
|
||||
"index" "2"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "1.0"
|
||||
}
|
||||
|
||||
"Stomach"
|
||||
{
|
||||
// General
|
||||
"index" "3"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "1.0"
|
||||
}
|
||||
|
||||
"LeftArm"
|
||||
{
|
||||
// General
|
||||
"index" "4"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "0.9"
|
||||
}
|
||||
|
||||
"RightArm"
|
||||
{
|
||||
// General
|
||||
"index" "5"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "0.9"
|
||||
}
|
||||
|
||||
"LeftLeg"
|
||||
{
|
||||
// General
|
||||
"index" "6"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "0.9"
|
||||
}
|
||||
|
||||
"RightLeg"
|
||||
{
|
||||
// General
|
||||
"index" "7"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "0.9"
|
||||
}
|
||||
|
||||
"Gear"
|
||||
{
|
||||
// General
|
||||
"index" "8"
|
||||
|
||||
// Damage
|
||||
"damage" "on"
|
||||
|
||||
// Knockback
|
||||
"knockback" "1.0"
|
||||
}
|
||||
}
|
||||
|
@ -1,98 +1,98 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// ZOMBIE:RELOADED
|
||||
// Model configuration
|
||||
//
|
||||
// See Model Configuration (3.5) section in the manual for detailed info.
|
||||
//
|
||||
// ============================================================================
|
||||
//
|
||||
// SHORT DESCRIPTIONS
|
||||
//
|
||||
// Attribute: Description:
|
||||
// ----------------------------------------------------------------------------
|
||||
// name Name of model file, without extension.
|
||||
// path Path to model files. MUST end with "/".
|
||||
// team Model type:
|
||||
// "zombies"
|
||||
// "humans"
|
||||
// access Access type:
|
||||
// "public" - Everyone can use the model.
|
||||
// "admins" - Model can only be used by admins.
|
||||
// "hidden" - Model is excluded from public random selections.
|
||||
// "motherzombies" - Model can only be used by mother zombies.
|
||||
// "group" - Use group authentication.
|
||||
// group If access is "group": A SourceMod group name. Otherwise blank ("").
|
||||
|
||||
"models"
|
||||
{
|
||||
"zh_charple001"
|
||||
{
|
||||
"name" "zh_charple001"
|
||||
"path" "models/player/zh/"
|
||||
"team" "zombies"
|
||||
"access" "public"
|
||||
"group" ""
|
||||
}
|
||||
|
||||
"zh_zombie003"
|
||||
{
|
||||
"name" "zh_zombie003"
|
||||
"path" "models/player/zh/"
|
||||
"team" "zombies"
|
||||
"access" "public"
|
||||
"group" ""
|
||||
}
|
||||
|
||||
"zh_corpse002"
|
||||
{
|
||||
"name" "zh_corpse002"
|
||||
"path" "models/player/zh/"
|
||||
"team" "zombies"
|
||||
"access" "public"
|
||||
"group" ""
|
||||
}
|
||||
|
||||
"t_guerilla"
|
||||
{
|
||||
"name" "t_guerilla"
|
||||
"path" "models/player/ics/hellknight_red/"
|
||||
"team" "zombies"
|
||||
"access" "public"
|
||||
"group" ""
|
||||
}
|
||||
|
||||
// Special model examples:
|
||||
// -----------------------
|
||||
|
||||
// Only admins can use this zombie model.
|
||||
//"admin_zombie"
|
||||
//{
|
||||
// "name" "1337model"
|
||||
// "path" "models/player/adminmodels/"
|
||||
// "team" "zombies"
|
||||
// "access" "admins"
|
||||
// "group" ""
|
||||
//}
|
||||
|
||||
// Only members of the zr_vip group in SourceMod can use this human model.
|
||||
//"vip_human"
|
||||
//{
|
||||
// "name" "vipmodel"
|
||||
// "path" "models/player/vip/"
|
||||
// "team" "humans"
|
||||
// "access" "group"
|
||||
// "group" "zr_vip"
|
||||
//}
|
||||
|
||||
// This model will be excluded from public random selections. Only classes
|
||||
// that use "random_hidden" or explicit specify this model will be able to use it.
|
||||
//"hidden"
|
||||
//{
|
||||
// "name" "hiddenmodel"
|
||||
// "path" "models/player/"
|
||||
// "team" "humans"
|
||||
// "access" "hidden"
|
||||
// "group" ""
|
||||
//}
|
||||
}
|
||||
// ============================================================================
|
||||
//
|
||||
// ZOMBIE:RELOADED
|
||||
// Model configuration
|
||||
//
|
||||
// See Model Configuration (3.5) section in the manual for detailed info.
|
||||
//
|
||||
// ============================================================================
|
||||
//
|
||||
// SHORT DESCRIPTIONS
|
||||
//
|
||||
// Attribute: Description:
|
||||
// ----------------------------------------------------------------------------
|
||||
// name Name of model file, without extension.
|
||||
// path Path to model files. MUST end with "/".
|
||||
// team Model type:
|
||||
// "zombies"
|
||||
// "humans"
|
||||
// access Access type:
|
||||
// "public" - Everyone can use the model.
|
||||
// "admins" - Model can only be used by admins.
|
||||
// "hidden" - Model is excluded from public random selections.
|
||||
// "motherzombies" - Model can only be used by mother zombies.
|
||||
// "group" - Use group authentication.
|
||||
// group If access is "group": A SourceMod group name. Otherwise blank ("").
|
||||
|
||||
"models"
|
||||
{
|
||||
"zh_charple001"
|
||||
{
|
||||
"name" "zh_charple001"
|
||||
"path" "models/player/zh/"
|
||||
"team" "zombies"
|
||||
"access" "public"
|
||||
"group" ""
|
||||
}
|
||||
|
||||
"zh_zombie003"
|
||||
{
|
||||
"name" "zh_zombie003"
|
||||
"path" "models/player/zh/"
|
||||
"team" "zombies"
|
||||
"access" "public"
|
||||
"group" ""
|
||||
}
|
||||
|
||||
"zh_corpse002"
|
||||
{
|
||||
"name" "zh_corpse002"
|
||||
"path" "models/player/zh/"
|
||||
"team" "zombies"
|
||||
"access" "public"
|
||||
"group" ""
|
||||
}
|
||||
|
||||
"t_guerilla"
|
||||
{
|
||||
"name" "t_guerilla"
|
||||
"path" "models/player/ics/hellknight_red/"
|
||||
"team" "zombies"
|
||||
"access" "public"
|
||||
"group" ""
|
||||
}
|
||||
|
||||
// Special model examples:
|
||||
// -----------------------
|
||||
|
||||
// Only admins can use this zombie model.
|
||||
//"admin_zombie"
|
||||
//{
|
||||
// "name" "1337model"
|
||||
// "path" "models/player/adminmodels/"
|
||||
// "team" "zombies"
|
||||
// "access" "admins"
|
||||
// "group" ""
|
||||
//}
|
||||
|
||||
// Only members of the zr_vip group in SourceMod can use this human model.
|
||||
//"vip_human"
|
||||
//{
|
||||
// "name" "vipmodel"
|
||||
// "path" "models/player/vip/"
|
||||
// "team" "humans"
|
||||
// "access" "group"
|
||||
// "group" "zr_vip"
|
||||
//}
|
||||
|
||||
// This model will be excluded from public random selections. Only classes
|
||||
// that use "random_hidden" or explicit specify this model will be able to use it.
|
||||
//"hidden"
|
||||
//{
|
||||
// "name" "hiddenmodel"
|
||||
// "path" "models/player/"
|
||||
// "team" "humans"
|
||||
// "access" "hidden"
|
||||
// "group" ""
|
||||
//}
|
||||
}
|
||||
|
@ -1,298 +1,298 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Zombie:Reloaded Class configuration
|
||||
//
|
||||
// See Class Configuration (3.7) in the manual for detailed info.
|
||||
//
|
||||
// ============================================================================
|
||||
//
|
||||
// SHORT DESCRIPTIONS
|
||||
//
|
||||
// Attribute: Values: Description:
|
||||
// ----------------------------------------------------------------------------
|
||||
// enabled yes/no Enables or disables a class.
|
||||
// team number Specifies what team the class belongs to:
|
||||
// 0 - Zombies
|
||||
// 1 - Humans
|
||||
// 2 - Admin mode classes (incomplete feautre!)
|
||||
// team_default yes/no Marks the class as the default class in the team.
|
||||
// flags number Special class flags (bit field). To combine multiple flags
|
||||
// use a sum of the flag values. Available flags:
|
||||
// 1 - Admins only
|
||||
// 2 - Mother zombies only
|
||||
// group text Restrict class to member of this SourceMod group. Leave blank for no restriction.
|
||||
// name text The class name used in class menu.
|
||||
// description text The class description used in class menu.
|
||||
// model_path text Path to model to use. Relative to cstrike folder.
|
||||
// alpha_initial number Initial transparency setting.
|
||||
// alpha_damaged number Transparency when damaged.
|
||||
// alpha_damage number How much damage to do before switching alpha.
|
||||
// overlay_path text Overlay displayed at the player.
|
||||
// nvgs yes/no Give and turn on night vision.
|
||||
// fov number Field of view value. 90 is default.
|
||||
// has_napalm yes/no Allows player to throw napalm grenades. Humans only.
|
||||
// napalm_time decimal Napalm burn duration. Zombies only.
|
||||
// immunity_mode text Special immunity modes. Some modes only works on humans or zombies:
|
||||
// "none" - Instant infection.
|
||||
// "kill" - Humans are instantly killed instead of turning zombies when attacked by zombies.
|
||||
// "full" - Completely immune. Humans can't be infected, zombies don't receive damage or knock back. Careful with this, it might not be that fun.
|
||||
// "infect" - Humans are immune to infections until HP go below a threshold. Threshold at zero enable stabbing to death.
|
||||
// "damage" - Zombies are immune to damage from humans/grenades, but still vulnerable to knock back.
|
||||
// "delay" - Delay infection for a certain number of seconds.
|
||||
// "shield" - Shield against infections (humans) or knock back (zombies) for a certain amount of seconds (similar to TF2's übercharge). Deploy with "zshield" command.
|
||||
// immunity_amount number Immunity data value (humans only). Depends on the immunity mode above:
|
||||
// "infect" - HP threshold. Infection will be allowed when HP go below this value. Zero will enable stabbing to death.
|
||||
// "delay" - Number of seconds the infection is delayed since first hit by a zombie.
|
||||
// "shield" - Number of seconds the shield is active.
|
||||
// immunity_cooldown number Number of seconds of cooldown for temporary immunity actions, depending on mode.
|
||||
// "delay" - Number of seconds the delay is reduced every time a zombie attack, while a delayed infection is in progress.
|
||||
// "shield" - Number of seconds the player has to wait before the shield can be used again.
|
||||
// no_fall_damage on/off Disables fall damage.
|
||||
// health number How many health points to give.
|
||||
// health_regen_interval decimal Sets the regeneration interval. 0 to disable.
|
||||
// health_regen_amount number How much HP to give per interval.
|
||||
// health_infect_gain number How much HP to give when the player infects someone. Zombies only.
|
||||
// kill_bonus number How many points to give per kill. Zombies only.
|
||||
// speed decimal The player speed. In LMV mode 300 is normal speed, 600 is double speed.
|
||||
// knockback decimal Force of the knockback when shot at. Zombies only.
|
||||
// jump_height decimal Multiplier of the players jump height. 0.0 means no jump boost, 1.0 is normal.
|
||||
// jump_distance decimal Multiplier of the players jump distance. 0.0 means no forward jump boost, 1.0 is normal.
|
||||
|
||||
"classes"
|
||||
{
|
||||
// ------------------------------------------
|
||||
//
|
||||
// Zombie classes
|
||||
//
|
||||
// ------------------------------------------
|
||||
"zombie_nemesis"
|
||||
{
|
||||
// General
|
||||
"enabled" "yes"
|
||||
"team" "0"
|
||||
"team_default" "yes"
|
||||
"flags" "0"
|
||||
"group" ""
|
||||
|
||||
"name" "Nemesis"
|
||||
"description" "+++ Everything!"
|
||||
|
||||
// Model
|
||||
"model_path" "models/player/ics/hellknight_red/t_guerilla.mdl"
|
||||
"alpha_initial" "255"
|
||||
"alpha_damaged" "255"
|
||||
"alpha_damage" "0"
|
||||
|
||||
// Hud
|
||||
"overlay_path" "overlays/zr/zvision"
|
||||
"nvgs" "no"
|
||||
"fov" "120"
|
||||
|
||||
// Effects
|
||||
"has_napalm" "no"
|
||||
"napalm_time" "15.0"
|
||||
|
||||
// Player behavior
|
||||
"immunity_mode" "none"
|
||||
"immunity_amount" "1"
|
||||
"immunity_cooldown" "60"
|
||||
"no_fall_damage" "yes"
|
||||
|
||||
"health" "64000"
|
||||
"health_regen_interval" "0.0"
|
||||
"health_regen_amount" "0"
|
||||
"health_infect_gain" "100"
|
||||
"kill_bonus" "2"
|
||||
|
||||
"speed" "400"
|
||||
"knockback" "1.8"
|
||||
"jump_height" "1.3"
|
||||
"jump_distance" "1.6"
|
||||
}
|
||||
|
||||
// ------------------------------------------
|
||||
//
|
||||
// Human classes
|
||||
//
|
||||
// ------------------------------------------
|
||||
|
||||
"human_normal"
|
||||
{
|
||||
// General
|
||||
"enabled" "yes"
|
||||
"team" "1"
|
||||
"team_default" "yes"
|
||||
"flags" "0"
|
||||
"group" ""
|
||||
|
||||
"name" "Normal Human"
|
||||
"description" "Default Counter-Strike settings"
|
||||
|
||||
// Model
|
||||
"model_path" "default"
|
||||
"alpha_initial" "255"
|
||||
"alpha_damaged" "255"
|
||||
"alpha_damage" "0"
|
||||
|
||||
// Hud
|
||||
"overlay_path" ""
|
||||
"nvgs" "no"
|
||||
"fov" "90"
|
||||
|
||||
// Effects
|
||||
"has_napalm" "yes"
|
||||
"napalm_time" "0.0"
|
||||
|
||||
// Player behavior
|
||||
"immunity_mode" "kill"
|
||||
"immunity_amount" "1"
|
||||
"immunity_cooldown" "60"
|
||||
"no_fall_damage" "no"
|
||||
|
||||
"health" "100"
|
||||
"health_regen_interval" "0.0"
|
||||
"health_regen_amount" "0"
|
||||
"health_infect_gain" "0"
|
||||
"kill_bonus" "2"
|
||||
|
||||
"speed" "300"
|
||||
"knockback" "0"
|
||||
"jump_height" "1.0"
|
||||
"jump_distance" "1.0"
|
||||
}
|
||||
|
||||
"human_speedy"
|
||||
{
|
||||
// General
|
||||
"enabled" "yes"
|
||||
"team" "1"
|
||||
"team_default" "no"
|
||||
"flags" "0"
|
||||
"group" ""
|
||||
|
||||
"name" "Speedy"
|
||||
"description" "+Speed"
|
||||
|
||||
// Model
|
||||
"model_path" "default"
|
||||
"alpha_initial" "255"
|
||||
"alpha_damaged" "255"
|
||||
"alpha_damage" "0"
|
||||
|
||||
// Hud
|
||||
"overlay_path" ""
|
||||
"nvgs" "no"
|
||||
"fov" "90"
|
||||
|
||||
// Effects
|
||||
"has_napalm" "no"
|
||||
"napalm_time" "0.0"
|
||||
|
||||
// Player behavior
|
||||
"immunity_mode" "kill"
|
||||
"immunity_amount" "1"
|
||||
"immunity_cooldown" "60"
|
||||
"no_fall_damage" "0"
|
||||
|
||||
"health" "100"
|
||||
"health_regen_interval" "0.0"
|
||||
"health_regen_amount" "0"
|
||||
"health_infect_gain" "0"
|
||||
"kill_bonus" "1"
|
||||
|
||||
"speed" "360"
|
||||
"knockback" "0"
|
||||
"jump_height" "1.0"
|
||||
"jump_distance" "1.0"
|
||||
}
|
||||
|
||||
"human_light"
|
||||
{
|
||||
// General
|
||||
"enabled" "yes"
|
||||
"team" "1"
|
||||
"team_default" "no"
|
||||
"flags" "0"
|
||||
"group" ""
|
||||
|
||||
"name" "Light"
|
||||
"description" "-Speed | +Jump | +Immunity"
|
||||
|
||||
// Model
|
||||
"model_path" "default"
|
||||
"alpha_initial" "255"
|
||||
"alpha_damaged" "255"
|
||||
"alpha_damage" "0"
|
||||
|
||||
// Hud
|
||||
"overlay_path" ""
|
||||
"nvgs" "no"
|
||||
"fov" "90"
|
||||
|
||||
// Effects
|
||||
"has_napalm" "yes"
|
||||
"napalm_time" "0.0"
|
||||
|
||||
// Player behavior
|
||||
"immunity_mode" "kill"
|
||||
"immunity_amount" "1"
|
||||
"immunity_cooldown" "60"
|
||||
"no_fall_damage" "yes"
|
||||
|
||||
"health" "100"
|
||||
"health_regen_interval" "0.0"
|
||||
"health_regen_amount" "0"
|
||||
"health_infect_gain" "0"
|
||||
"kill_bonus" "1"
|
||||
|
||||
"speed" "260"
|
||||
"knockback" "0"
|
||||
"jump_height" "1.4"
|
||||
"jump_distance" "1.4"
|
||||
}
|
||||
|
||||
"human_stealth"
|
||||
{
|
||||
// General
|
||||
"enabled" "yes"
|
||||
"team" "1"
|
||||
"team_default" "no"
|
||||
"flags" "0"
|
||||
"group" ""
|
||||
|
||||
"name" "Stealth"
|
||||
"description" "Slow, but almost invisible"
|
||||
|
||||
// Model
|
||||
"model_path" "default"
|
||||
"alpha_initial" "15"
|
||||
"alpha_damaged" "15"
|
||||
"alpha_damage" "0"
|
||||
|
||||
// Hud
|
||||
"overlay_path" ""
|
||||
"nvgs" "no"
|
||||
"fov" "90"
|
||||
|
||||
// Effects
|
||||
"has_napalm" "yes"
|
||||
"napalm_time" "0.0"
|
||||
|
||||
// Player behavior
|
||||
"immunity_mode" "kill"
|
||||
"immunity_amount" "1"
|
||||
"immunity_cooldown" "60"
|
||||
"no_fall_damage" "yes"
|
||||
|
||||
"health" "100"
|
||||
"health_regen_interval" "0.0"
|
||||
"health_regen_amount" "0"
|
||||
"health_infect_gain" "0"
|
||||
"kill_bonus" "1"
|
||||
|
||||
"speed" "260"
|
||||
"knockback" "0"
|
||||
"jump_height" "1.4"
|
||||
"jump_distance" "1.4"
|
||||
}
|
||||
}
|
||||
// ============================================================================
|
||||
//
|
||||
// Zombie:Reloaded Class configuration
|
||||
//
|
||||
// See Class Configuration (3.7) in the manual for detailed info.
|
||||
//
|
||||
// ============================================================================
|
||||
//
|
||||
// SHORT DESCRIPTIONS
|
||||
//
|
||||
// Attribute: Values: Description:
|
||||
// ----------------------------------------------------------------------------
|
||||
// enabled yes/no Enables or disables a class.
|
||||
// team number Specifies what team the class belongs to:
|
||||
// 0 - Zombies
|
||||
// 1 - Humans
|
||||
// 2 - Admin mode classes (incomplete feautre!)
|
||||
// team_default yes/no Marks the class as the default class in the team.
|
||||
// flags number Special class flags (bit field). To combine multiple flags
|
||||
// use a sum of the flag values. Available flags:
|
||||
// 1 - Admins only
|
||||
// 2 - Mother zombies only
|
||||
// group text Restrict class to member of this SourceMod group. Leave blank for no restriction.
|
||||
// name text The class name used in class menu.
|
||||
// description text The class description used in class menu.
|
||||
// model_path text Path to model to use. Relative to cstrike folder.
|
||||
// alpha_initial number Initial transparency setting.
|
||||
// alpha_damaged number Transparency when damaged.
|
||||
// alpha_damage number How much damage to do before switching alpha.
|
||||
// overlay_path text Overlay displayed at the player.
|
||||
// nvgs yes/no Give and turn on night vision.
|
||||
// fov number Field of view value. 90 is default.
|
||||
// has_napalm yes/no Allows player to throw napalm grenades. Humans only.
|
||||
// napalm_time decimal Napalm burn duration. Zombies only.
|
||||
// immunity_mode text Special immunity modes. Some modes only works on humans or zombies:
|
||||
// "none" - Instant infection.
|
||||
// "kill" - Humans are instantly killed instead of turning zombies when attacked by zombies.
|
||||
// "full" - Completely immune. Humans can't be infected, zombies don't receive damage or knock back. Careful with this, it might not be that fun.
|
||||
// "infect" - Humans are immune to infections until HP go below a threshold. Threshold at zero enable stabbing to death.
|
||||
// "damage" - Zombies are immune to damage from humans/grenades, but still vulnerable to knock back.
|
||||
// "delay" - Delay infection for a certain number of seconds.
|
||||
// "shield" - Shield against infections (humans) or knock back (zombies) for a certain amount of seconds (similar to TF2's übercharge). Deploy with "zshield" command.
|
||||
// immunity_amount number Immunity data value (humans only). Depends on the immunity mode above:
|
||||
// "infect" - HP threshold. Infection will be allowed when HP go below this value. Zero will enable stabbing to death.
|
||||
// "delay" - Number of seconds the infection is delayed since first hit by a zombie.
|
||||
// "shield" - Number of seconds the shield is active.
|
||||
// immunity_cooldown number Number of seconds of cooldown for temporary immunity actions, depending on mode.
|
||||
// "delay" - Number of seconds the delay is reduced every time a zombie attack, while a delayed infection is in progress.
|
||||
// "shield" - Number of seconds the player has to wait before the shield can be used again.
|
||||
// no_fall_damage on/off Disables fall damage.
|
||||
// health number How many health points to give.
|
||||
// health_regen_interval decimal Sets the regeneration interval. 0 to disable.
|
||||
// health_regen_amount number How much HP to give per interval.
|
||||
// health_infect_gain number How much HP to give when the player infects someone. Zombies only.
|
||||
// kill_bonus number How many points to give per kill. Zombies only.
|
||||
// speed decimal The player speed. In LMV mode 300 is normal speed, 600 is double speed.
|
||||
// knockback decimal Force of the knockback when shot at. Zombies only.
|
||||
// jump_height decimal Multiplier of the players jump height. 0.0 means no jump boost, 1.0 is normal.
|
||||
// jump_distance decimal Multiplier of the players jump distance. 0.0 means no forward jump boost, 1.0 is normal.
|
||||
|
||||
"classes"
|
||||
{
|
||||
// ------------------------------------------
|
||||
//
|
||||
// Zombie classes
|
||||
//
|
||||
// ------------------------------------------
|
||||
"zombie_nemesis"
|
||||
{
|
||||
// General
|
||||
"enabled" "yes"
|
||||
"team" "0"
|
||||
"team_default" "yes"
|
||||
"flags" "0"
|
||||
"group" ""
|
||||
|
||||
"name" "Nemesis"
|
||||
"description" "+++ Everything!"
|
||||
|
||||
// Model
|
||||
"model_path" "models/player/ics/hellknight_red/t_guerilla.mdl"
|
||||
"alpha_initial" "255"
|
||||
"alpha_damaged" "255"
|
||||
"alpha_damage" "0"
|
||||
|
||||
// Hud
|
||||
"overlay_path" "overlays/zr/zvision"
|
||||
"nvgs" "no"
|
||||
"fov" "120"
|
||||
|
||||
// Effects
|
||||
"has_napalm" "no"
|
||||
"napalm_time" "15.0"
|
||||
|
||||
// Player behavior
|
||||
"immunity_mode" "none"
|
||||
"immunity_amount" "1"
|
||||
"immunity_cooldown" "60"
|
||||
"no_fall_damage" "yes"
|
||||
|
||||
"health" "64000"
|
||||
"health_regen_interval" "0.0"
|
||||
"health_regen_amount" "0"
|
||||
"health_infect_gain" "100"
|
||||
"kill_bonus" "2"
|
||||
|
||||
"speed" "400"
|
||||
"knockback" "1.8"
|
||||
"jump_height" "1.3"
|
||||
"jump_distance" "1.6"
|
||||
}
|
||||
|
||||
// ------------------------------------------
|
||||
//
|
||||
// Human classes
|
||||
//
|
||||
// ------------------------------------------
|
||||
|
||||
"human_normal"
|
||||
{
|
||||
// General
|
||||
"enabled" "yes"
|
||||
"team" "1"
|
||||
"team_default" "yes"
|
||||
"flags" "0"
|
||||
"group" ""
|
||||
|
||||
"name" "Normal Human"
|
||||
"description" "Default Counter-Strike settings"
|
||||
|
||||
// Model
|
||||
"model_path" "default"
|
||||
"alpha_initial" "255"
|
||||
"alpha_damaged" "255"
|
||||
"alpha_damage" "0"
|
||||
|
||||
// Hud
|
||||
"overlay_path" ""
|
||||
"nvgs" "no"
|
||||
"fov" "90"
|
||||
|
||||
// Effects
|
||||
"has_napalm" "yes"
|
||||
"napalm_time" "0.0"
|
||||
|
||||
// Player behavior
|
||||
"immunity_mode" "kill"
|
||||
"immunity_amount" "1"
|
||||
"immunity_cooldown" "60"
|
||||
"no_fall_damage" "no"
|
||||
|
||||
"health" "100"
|
||||
"health_regen_interval" "0.0"
|
||||
"health_regen_amount" "0"
|
||||
"health_infect_gain" "0"
|
||||
"kill_bonus" "2"
|
||||
|
||||
"speed" "300"
|
||||
"knockback" "0"
|
||||
"jump_height" "1.0"
|
||||
"jump_distance" "1.0"
|
||||
}
|
||||
|
||||
"human_speedy"
|
||||
{
|
||||
// General
|
||||
"enabled" "yes"
|
||||
"team" "1"
|
||||
"team_default" "no"
|
||||
"flags" "0"
|
||||
"group" ""
|
||||
|
||||
"name" "Speedy"
|
||||
"description" "+Speed"
|
||||
|
||||
// Model
|
||||
"model_path" "default"
|
||||
"alpha_initial" "255"
|
||||
"alpha_damaged" "255"
|
||||
"alpha_damage" "0"
|
||||
|
||||
// Hud
|
||||
"overlay_path" ""
|
||||
"nvgs" "no"
|
||||
"fov" "90"
|
||||
|
||||
// Effects
|
||||
"has_napalm" "no"
|
||||
"napalm_time" "0.0"
|
||||
|
||||
// Player behavior
|
||||
"immunity_mode" "kill"
|
||||
"immunity_amount" "1"
|
||||
"immunity_cooldown" "60"
|
||||
"no_fall_damage" "0"
|
||||
|
||||
"health" "100"
|
||||
"health_regen_interval" "0.0"
|
||||
"health_regen_amount" "0"
|
||||
"health_infect_gain" "0"
|
||||
"kill_bonus" "1"
|
||||
|
||||
"speed" "360"
|
||||
"knockback" "0"
|
||||
"jump_height" "1.0"
|
||||
"jump_distance" "1.0"
|
||||
}
|
||||
|
||||
"human_light"
|
||||
{
|
||||
// General
|
||||
"enabled" "yes"
|
||||
"team" "1"
|
||||
"team_default" "no"
|
||||
"flags" "0"
|
||||
"group" ""
|
||||
|
||||
"name" "Light"
|
||||
"description" "-Speed | +Jump | +Immunity"
|
||||
|
||||
// Model
|
||||
"model_path" "default"
|
||||
"alpha_initial" "255"
|
||||
"alpha_damaged" "255"
|
||||
"alpha_damage" "0"
|
||||
|
||||
// Hud
|
||||
"overlay_path" ""
|
||||
"nvgs" "no"
|
||||
"fov" "90"
|
||||
|
||||
// Effects
|
||||
"has_napalm" "yes"
|
||||
"napalm_time" "0.0"
|
||||
|
||||
// Player behavior
|
||||
"immunity_mode" "kill"
|
||||
"immunity_amount" "1"
|
||||
"immunity_cooldown" "60"
|
||||
"no_fall_damage" "yes"
|
||||
|
||||
"health" "100"
|
||||
"health_regen_interval" "0.0"
|
||||
"health_regen_amount" "0"
|
||||
"health_infect_gain" "0"
|
||||
"kill_bonus" "1"
|
||||
|
||||
"speed" "260"
|
||||
"knockback" "0"
|
||||
"jump_height" "1.4"
|
||||
"jump_distance" "1.4"
|
||||
}
|
||||
|
||||
"human_stealth"
|
||||
{
|
||||
// General
|
||||
"enabled" "yes"
|
||||
"team" "1"
|
||||
"team_default" "no"
|
||||
"flags" "0"
|
||||
"group" ""
|
||||
|
||||
"name" "Stealth"
|
||||
"description" "Slow, but almost invisible"
|
||||
|
||||
// Model
|
||||
"model_path" "default"
|
||||
"alpha_initial" "15"
|
||||
"alpha_damaged" "15"
|
||||
"alpha_damage" "0"
|
||||
|
||||
// Hud
|
||||
"overlay_path" ""
|
||||
"nvgs" "no"
|
||||
"fov" "90"
|
||||
|
||||
// Effects
|
||||
"has_napalm" "yes"
|
||||
"napalm_time" "0.0"
|
||||
|
||||
// Player behavior
|
||||
"immunity_mode" "kill"
|
||||
"immunity_amount" "1"
|
||||
"immunity_cooldown" "60"
|
||||
"no_fall_damage" "yes"
|
||||
|
||||
"health" "100"
|
||||
"health_regen_interval" "0.0"
|
||||
"health_regen_amount" "0"
|
||||
"health_infect_gain" "0"
|
||||
"kill_bonus" "1"
|
||||
|
||||
"speed" "260"
|
||||
"knockback" "0"
|
||||
"jump_height" "1.4"
|
||||
"jump_distance" "1.4"
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
// Dummy config that's not doing anything so classic settings will be kept. It's
|
||||
// still possible to add stuff here for configuring classic mode if something
|
||||
// differ from the default configuration.
|
||||
|
||||
// Used by randommode.cfg.
|
||||
// Dummy config that's not doing anything so classic settings will be kept. It's
|
||||
// still possible to add stuff here for configuring classic mode if something
|
||||
// differ from the default configuration.
|
||||
|
||||
// Used by randommode.cfg.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Place this in cfg/sourcemod/zombiereloaded to use it.
|
||||
|
||||
// Enable a random mode in cs_italy.
|
||||
exec sourcemod/zombiereloaded/randommode.cfg
|
||||
// Place this in cfg/sourcemod/zombiereloaded to use it.
|
||||
|
||||
// Enable a random mode in cs_italy.
|
||||
exec sourcemod/zombiereloaded/randommode.cfg
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Place this in cfg/sourcemod/zombiereloaded to use it.
|
||||
|
||||
// Use swarm mode in de_dust.
|
||||
exec sourcemod/zombiereloaded/swarm.cfg
|
||||
// Place this in cfg/sourcemod/zombiereloaded to use it.
|
||||
|
||||
// Use swarm mode in de_dust.
|
||||
exec sourcemod/zombiereloaded/swarm.cfg
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Place this in cfg/sourcemod/zombiereloaded to use it.
|
||||
|
||||
// Use swarm mode in de_dust. Swarm mode also has a post map config that must
|
||||
// be executed.
|
||||
exec sourcemod/zombiereloaded/swarm.post.cfg
|
||||
// Place this in cfg/sourcemod/zombiereloaded to use it.
|
||||
|
||||
// Use swarm mode in de_dust. Swarm mode also has a post map config that must
|
||||
// be executed.
|
||||
exec sourcemod/zombiereloaded/swarm.post.cfg
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Place this in cfg/sourcemod/zombiereloaded to use it.
|
||||
|
||||
// Use nemesis mode in de_dust2.
|
||||
exec sourcemod/zombiereloaded/nemesis.cfg
|
||||
// Place this in cfg/sourcemod/zombiereloaded to use it.
|
||||
|
||||
// Use nemesis mode in de_dust2.
|
||||
exec sourcemod/zombiereloaded/nemesis.cfg
|
||||
|
@ -1,25 +1,25 @@
|
||||
// Configures ZR in nemesis mode. Everyone but a small group of humans are
|
||||
// infected. Execute this config from a pre map config file.
|
||||
|
||||
// Using a custom class set with the nemesis class. All human classes are
|
||||
// instantly killed when attacked by the zombie.
|
||||
zr_config_path_playerclasses "configs/zr/playerclasses-nemesis.txt"
|
||||
|
||||
// Set default zombie to the nemesis class.
|
||||
zr_classes_default_zombie "Nemesis"
|
||||
|
||||
// Use absolute infection mode.
|
||||
zr_infect_mzombie_mode absolute
|
||||
|
||||
// One mother zombie.
|
||||
zr_infect_mzombie_ratio 1
|
||||
|
||||
// Zombies must be teleported to spawn on mother zombie infect, or the humans
|
||||
// will be doomed.
|
||||
zr_infect_mzombie_respawn 1
|
||||
|
||||
// Disable respawning of dead players.
|
||||
zr_respawn 0
|
||||
|
||||
// Disable zspawn command.
|
||||
zr_zspawn 0
|
||||
// Configures ZR in nemesis mode. Everyone but a small group of humans are
|
||||
// infected. Execute this config from a pre map config file.
|
||||
|
||||
// Using a custom class set with the nemesis class. All human classes are
|
||||
// instantly killed when attacked by the zombie.
|
||||
zr_config_path_playerclasses "configs/zr/playerclasses-nemesis.txt"
|
||||
|
||||
// Set default zombie to the nemesis class.
|
||||
zr_classes_default_zombie "Nemesis"
|
||||
|
||||
// Use absolute infection mode.
|
||||
zr_infect_mzombie_mode absolute
|
||||
|
||||
// One mother zombie.
|
||||
zr_infect_mzombie_ratio 1
|
||||
|
||||
// Zombies must be teleported to spawn on mother zombie infect, or the humans
|
||||
// will be doomed.
|
||||
zr_infect_mzombie_respawn 1
|
||||
|
||||
// Disable respawning of dead players.
|
||||
zr_respawn 0
|
||||
|
||||
// Disable zspawn command.
|
||||
zr_zspawn 0
|
||||
|
@ -1,7 +1,7 @@
|
||||
cfglist_create zr_modes
|
||||
cfglist_add zr_modes sourcemod/zombiereloaded/classic.cfg
|
||||
cfglist_add zr_modes sourcemod/zombiereloaded/nemesis.cfg
|
||||
cfglist_add zr_modes sourcemod/zombiereloaded/survivor.cfg
|
||||
cfglist_add zr_modes sourcemod/zombiereloaded/swarm.cfg
|
||||
cfglist_exec_random zr_modes
|
||||
cfglist_delete zr_modes
|
||||
cfglist_create zr_modes
|
||||
cfglist_add zr_modes sourcemod/zombiereloaded/classic.cfg
|
||||
cfglist_add zr_modes sourcemod/zombiereloaded/nemesis.cfg
|
||||
cfglist_add zr_modes sourcemod/zombiereloaded/survivor.cfg
|
||||
cfglist_add zr_modes sourcemod/zombiereloaded/swarm.cfg
|
||||
cfglist_exec_random zr_modes
|
||||
cfglist_delete zr_modes
|
||||
|
@ -1,25 +1,25 @@
|
||||
// Configures ZR in survivor mode. Everyone but a small group of humans are
|
||||
// infected. Execute this config from a pre map config file.
|
||||
|
||||
// Optional. Change to a different set of classes and models here if you want to
|
||||
// use different classes. For instance:
|
||||
// zr_config_path_playerclasses "configs/zr/playerclasses-survivor.txt"
|
||||
// zr_config_path_models "configs/zr/models-survivor.txt"
|
||||
|
||||
// Use absolute infection mode.
|
||||
zr_infect_mzombie_mode absolute
|
||||
|
||||
// Number of humans. Must be negative in this mode. For instance, -5 will give
|
||||
// four remaining humans after mother zombie infection, the rest will be zombies.
|
||||
zr_infect_mzombie_ratio -5
|
||||
|
||||
// Zombies must be teleported to spawn on mother zombie infect, or the humans
|
||||
// will be doomed.
|
||||
zr_infect_mzombie_respawn 1
|
||||
|
||||
// Respawn in zombie team.
|
||||
zr_respawn 1
|
||||
zr_respawn_team_zombie 1
|
||||
|
||||
// Prevent zombies suiciding to get on human team.
|
||||
zr_respawn_team_zombie_world 1
|
||||
// Configures ZR in survivor mode. Everyone but a small group of humans are
|
||||
// infected. Execute this config from a pre map config file.
|
||||
|
||||
// Optional. Change to a different set of classes and models here if you want to
|
||||
// use different classes. For instance:
|
||||
// zr_config_path_playerclasses "configs/zr/playerclasses-survivor.txt"
|
||||
// zr_config_path_models "configs/zr/models-survivor.txt"
|
||||
|
||||
// Use absolute infection mode.
|
||||
zr_infect_mzombie_mode absolute
|
||||
|
||||
// Number of humans. Must be negative in this mode. For instance, -5 will give
|
||||
// four remaining humans after mother zombie infection, the rest will be zombies.
|
||||
zr_infect_mzombie_ratio -5
|
||||
|
||||
// Zombies must be teleported to spawn on mother zombie infect, or the humans
|
||||
// will be doomed.
|
||||
zr_infect_mzombie_respawn 1
|
||||
|
||||
// Respawn in zombie team.
|
||||
zr_respawn 1
|
||||
zr_respawn_team_zombie 1
|
||||
|
||||
// Prevent zombies suiciding to get on human team.
|
||||
zr_respawn_team_zombie_world 1
|
||||
|
@ -1,31 +1,31 @@
|
||||
// Configures ZR in swarm mode. A large group of humans are infected, while the
|
||||
// rest fight to the death (immune from infection).
|
||||
|
||||
// Execute this config from a pre map config file. Remember to also execute
|
||||
// swarm.post.cfg from a post map config file.
|
||||
|
||||
// Optional. Change to a different set of classes and models here if you want to
|
||||
// use different classes. Remember to use immunity mode "infect" and amount "0"
|
||||
// on all human classes.
|
||||
// zr_config_path_playerclasses "configs/zr/playerclasses-swarm.txt"
|
||||
// zr_config_path_models "configs/zr/models-swarm.txt"
|
||||
|
||||
// Use dynamic infection mode.
|
||||
zr_infect_mzombie_mode dynamic
|
||||
|
||||
// Infection ratio. Infect every second player (50%). Use a higher number to get
|
||||
// fewer zombies.
|
||||
zr_infect_mzombie_ratio 2
|
||||
|
||||
// Teleport zombies to spawn on mother zombie infection.
|
||||
zr_infect_mzombie_respawn 1
|
||||
|
||||
// Disable respawning.
|
||||
zr_respawn 0
|
||||
zr_zspawn 0
|
||||
|
||||
// Use the ConfigList plugin to post execute swarm.post.cfg. ZR will detect this
|
||||
// plugin and execute the "zr_post_exec" list if it exists.
|
||||
cfglist_delete zr_post_exec
|
||||
cfglist_create zr_post_exec
|
||||
cfglist_add zr_post_exec sourcemod/zombiereloaded/swarm.post.cfg
|
||||
// Configures ZR in swarm mode. A large group of humans are infected, while the
|
||||
// rest fight to the death (immune from infection).
|
||||
|
||||
// Execute this config from a pre map config file. Remember to also execute
|
||||
// swarm.post.cfg from a post map config file.
|
||||
|
||||
// Optional. Change to a different set of classes and models here if you want to
|
||||
// use different classes. Remember to use immunity mode "infect" and amount "0"
|
||||
// on all human classes.
|
||||
// zr_config_path_playerclasses "configs/zr/playerclasses-swarm.txt"
|
||||
// zr_config_path_models "configs/zr/models-swarm.txt"
|
||||
|
||||
// Use dynamic infection mode.
|
||||
zr_infect_mzombie_mode dynamic
|
||||
|
||||
// Infection ratio. Infect every second player (50%). Use a higher number to get
|
||||
// fewer zombies.
|
||||
zr_infect_mzombie_ratio 2
|
||||
|
||||
// Teleport zombies to spawn on mother zombie infection.
|
||||
zr_infect_mzombie_respawn 1
|
||||
|
||||
// Disable respawning.
|
||||
zr_respawn 0
|
||||
zr_zspawn 0
|
||||
|
||||
// Use the ConfigList plugin to post execute swarm.post.cfg. ZR will detect this
|
||||
// plugin and execute the "zr_post_exec" list if it exists.
|
||||
cfglist_delete zr_post_exec
|
||||
cfglist_create zr_post_exec
|
||||
cfglist_add zr_post_exec sourcemod/zombiereloaded/swarm.post.cfg
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Configures ZR in swarm mode. Execute this file from a _post_ map config file.
|
||||
|
||||
// Make all human classes immune to infection (stab to death). These changes
|
||||
// will be reset when reloading or changing the map.
|
||||
zr_class_modify humans immunity_mode infect
|
||||
zr_class_modify humans immunity_amount 0
|
||||
// Configures ZR in swarm mode. Execute this file from a _post_ map config file.
|
||||
|
||||
// Make all human classes immune to infection (stab to death). These changes
|
||||
// will be reset when reloading or changing the map.
|
||||
zr_class_modify humans immunity_mode infect
|
||||
zr_class_modify humans immunity_amount 0
|
||||
|
File diff suppressed because it is too large
Load Diff
23
docs/codestyle.txt
Normal file
23
docs/codestyle.txt
Normal file
@ -0,0 +1,23 @@
|
||||
Zombie:Reloaded Code Guidelines
|
||||
===============================
|
||||
|
||||
This is a draft of coding guidelines for Zombie:Reloaded. If something is not
|
||||
mentioned here, study the existing code to ensure consistency.
|
||||
|
||||
Most of the code was written before we decided on the code style, so we may even
|
||||
break our own rules according to this document.
|
||||
|
||||
Highly recommended book:
|
||||
Clean Code: A Handbook of Agile Software Craftsmanship (2008)
|
||||
Robert C. Martin
|
||||
|
||||
* Curly braces on separate lines.
|
||||
* Indent with 4 spaces instead of tabs (configure your editor).
|
||||
* Unix line endings.
|
||||
* Always use curly braces with control statements (if, for, while, do).
|
||||
* UTF-8 file encoding without BOM.
|
||||
* Extract code into multiple functions if code is too complex. ZR is still bad
|
||||
at following this rule.
|
||||
* If the code needs comments, it should be refactored/renamed to better explain
|
||||
what it's doing. ZR has a lot of unnecessary comments, mostly because it's not
|
||||
following the single purpose-function rule above.
|
1348
docs/license.txt
1348
docs/license.txt
File diff suppressed because it is too large
Load Diff
@ -1,261 +1,261 @@
|
||||
===============================================================================
|
||||
|
||||
Zombie:Reloaded Beta 2
|
||||
|
||||
Patch Changelog
|
||||
|
||||
===============================================================================
|
||||
|
||||
For detailed info about changes in configuration files, see diff-files in the
|
||||
"changes" directory. They describe added and removed lines for each patch
|
||||
released. If the file is empty there are no config changes in that patch.
|
||||
|
||||
2009.12.11 - r545
|
||||
-------------------
|
||||
|
||||
* Initial beta 2 release. See zr_3.0-b2_release_notes.txt.
|
||||
|
||||
|
||||
2009.12.17 - r555
|
||||
-------------------
|
||||
|
||||
* Fixed too short translation buffer on yes/no phrases.
|
||||
* Fixed warning about invalid class attribute.
|
||||
|
||||
|
||||
2009.12.23 - r557
|
||||
-------------------
|
||||
|
||||
* Added russian translation by exvel.
|
||||
|
||||
|
||||
2009.12.25 - r565
|
||||
-------------------
|
||||
|
||||
* Fixed incorrect link in docs.
|
||||
* Removed redundant check for class menu command.
|
||||
* Fixed suicide intercept message not displayed in chat. Text from chat will
|
||||
still appear in console if written from console.
|
||||
* Added source code for current snapshot in release package.
|
||||
|
||||
|
||||
2010.01.07 - r580
|
||||
-------------------
|
||||
|
||||
* Added zrdocs/changes.diff in patches that will describe changes in text files
|
||||
since the main release, in unified diff format. Use a editor that support
|
||||
diff coloring for easier reading.
|
||||
* Fixed players not extinguished properly when in water.
|
||||
* Fixed invalid default values in some has_napalm class attributes.
|
||||
* Fixed the display bug in ZTele showing 0/X uses instead of 1/X.
|
||||
* Changed to error types to be fatal and stop plugin to prevent further errors
|
||||
(fixes rare invalid handle error in weapon module).
|
||||
* Fixed weapon not rendering correctly in rare cases.
|
||||
* Added a cvar to allow zombies to pick up weapons at the end of the round.
|
||||
|
||||
|
||||
2010.01.25 - r584
|
||||
-------------------
|
||||
|
||||
* Simplified english and norwegian zmarket menu phrases.
|
||||
* Fixed account module giving money to zombies hurting themself with
|
||||
self-inflicted damage
|
||||
* Fixed zr_damage_suicide_human not working when enabled.
|
||||
* Switched the plugin to use SDK Hooks extension instead of ZR Tools (r584 and
|
||||
newer). Run this on SourceMod 1.3 or newer.
|
||||
|
||||
|
||||
2010.02.14 - r595
|
||||
-------------------
|
||||
|
||||
* Added patch changelog.
|
||||
* Fixed unlimited ammo exploit in ZMarket menu.
|
||||
* Fixed admin classes not restored from cookies.
|
||||
* Fixed a bug in client listing menus when selecting a client that left the
|
||||
game caused errors.
|
||||
* Fixed the default sky on the first map not reverting properly if
|
||||
zr_veffects_sky was enabled in zombiereloaded.cfg.
|
||||
* Fixed players not extinguished when in water.
|
||||
* Stopped the "Zombies can't use weapons" message when using autobuy outside of
|
||||
a buyzone.
|
||||
* Fixed problems that came up if a client was infected through admin after the
|
||||
round started, but before the freezetime expired.
|
||||
* Fixed a bug where zr_suicide_cmds was being ignored and only the default
|
||||
value was being used.
|
||||
|
||||
2010.02.23 - r598
|
||||
-------------------
|
||||
|
||||
* Fixed cookies being reset on some occasions and admin-dependant classes are
|
||||
restored properly as well.
|
||||
|
||||
|
||||
2010.04.05 - r607
|
||||
-------------------
|
||||
|
||||
* Separated patch difflog (changes.diff) into separate file for each patch
|
||||
released.
|
||||
* Added scream and moan commands for zombies, with spam protection.
|
||||
* Added missing note about no_fall_damage class attribute in docs.
|
||||
* Fixed class attributes applied too early (moved to spawn post event). This
|
||||
fixes issues with FOV and bots.
|
||||
* Fixed saved classes not validated by team id when restoring from cookies.
|
||||
|
||||
|
||||
2010.06.03 - r611
|
||||
-------------------
|
||||
|
||||
* Added cvar to enable suicide intercept before the first zombie.
|
||||
* Added cvar for minimum dx level on overlays.
|
||||
* Fixed classes not always restored from cookies.
|
||||
|
||||
|
||||
2010.06.03 - r613
|
||||
-------------------
|
||||
|
||||
* Fixed signatures and round end defines that were updated in CS:S OB.
|
||||
|
||||
|
||||
2010.07.25 - r633
|
||||
-------------------
|
||||
|
||||
* Added support for different speed methods, defaulted to prop offset method.
|
||||
See the manual for more information about the class speed attribute.
|
||||
Important: Class speeds and spawn protection speed must be updated! Use this
|
||||
conversion formula:
|
||||
prop speed offset = ((lmv speed / 300) * 250) - 250
|
||||
If you don't want to update speed values right now, use
|
||||
"zr_classes_speed_method lmv" in zombiereloaded.cfg for backwards
|
||||
compatibility.
|
||||
* Added 'explode' suicide command from OB update to intercept list (bug 190).
|
||||
* Removed unnecessary antistick commands for model hull width, all models have
|
||||
the same hull width.
|
||||
* Removed hint sound on hp display and spawn protection timer. Credits goes to
|
||||
to Tauphi.
|
||||
* Fixed an error that happened when buying ammo and not having a weapon in
|
||||
prim/sec slot.
|
||||
* Fixed class menus being disabled and not checking if the player have access
|
||||
to private classes.
|
||||
* Fixed client not connected error in class module.
|
||||
* Updated compiler. ZR now requires SourceMod 1.3 or newer.
|
||||
|
||||
|
||||
2010.08.28 - r643
|
||||
-------------------
|
||||
|
||||
* Fixed function signatures that were changed after a CS update. Credit goes to
|
||||
psychonic.
|
||||
* Fixed class speed multiplier not properly applied with prop speed method (bug
|
||||
199).
|
||||
* Fixed invalid handle error in ZMarket module (bug 152).
|
||||
* Fixed a rare case where removing weapons didn't work.
|
||||
* Possibly fixed invalid handle error with WeaponsEntityToDisplay (bug 163).
|
||||
* Lowered sv_maxspeed to work around a acceleration issue with spectators.
|
||||
* Added validation error messages for individual attributes when loading
|
||||
classes. Easier than reading bits from a number.
|
||||
* Improved confusing description of the NVGs class attribute.
|
||||
|
||||
2010.10.15 - r644
|
||||
-------------------
|
||||
|
||||
* Changed default speed method to LMV because prop speed offsets are broken at
|
||||
the moment. This will introduce some side effects again; jump and fall speed
|
||||
is affected. Weapon recoil is also affected, but it's not confirmed that it
|
||||
has negative impact on bullets or aiming itself.
|
||||
Note: Those who already changed speed method back to LMV don't need this
|
||||
patch.
|
||||
|
||||
2010.11.14 - r647
|
||||
-------------------
|
||||
|
||||
* Added external plugin API for ZR with basic infection and respawn tools. The
|
||||
following natives and forwards are now available:
|
||||
ZR_IsClientZombie
|
||||
ZR_IsClientHuman
|
||||
ZR_InfectClient
|
||||
ZR_HumanClient
|
||||
ZR_OnClientInfect
|
||||
ZR_OnClientInfected
|
||||
ZR_OnClientHuman
|
||||
ZR_OnClientHumanPost
|
||||
ZR_RespawnClient
|
||||
ZR_OnClientRespawn
|
||||
ZR_OnClientRespawned
|
||||
ZR_SetKilledByWorld
|
||||
ZR_GetKilledByWorld
|
||||
See addons/sourcemod/scripting/include/zr in the package for details.
|
||||
Also see addons/sourcemod/scripting/testsuite/zr for API usage examples.
|
||||
|
||||
2010.11.17 - r648
|
||||
-------------------
|
||||
|
||||
* Fixed players not respawning as zombies when they are supposed to.
|
||||
|
||||
2011.06.17 - r651, r653
|
||||
-------------------------
|
||||
|
||||
* Added improved random number generator from SMLIB.
|
||||
* Fixed dead players being able to get weapons through ZMarket.
|
||||
* Fixed consecutive mother zombie infection prevention not always working.
|
||||
|
||||
2011.06.23 - r657
|
||||
-----------------
|
||||
|
||||
* Added spanish translation by Franc1sco.
|
||||
|
||||
2011.08.05 - r666
|
||||
-----------------
|
||||
|
||||
* Increased class limit to 64 classes.
|
||||
* Fixed the ragdoll module unintentionally removing other valid entities if a
|
||||
ragdoll was attempted to be removed after the round restarted.
|
||||
* Fixed format settings in spanish translation spamming logs.
|
||||
* Fixed index out of bounds error when class limit is reached.
|
||||
* Fixed double inclusion of jump boost module preventing code from compiling on
|
||||
newer compilers.
|
||||
|
||||
2011.10.30 - r669
|
||||
-----------------
|
||||
|
||||
* Fixed internal player spawn post event fired too early (causing invisible
|
||||
models).
|
||||
* Possibly fixed invalid entity error (bug 195).
|
||||
|
||||
2011.12.08 - r671
|
||||
-----------------
|
||||
|
||||
* Updated gamedata file. Thanks to pillepallus.
|
||||
|
||||
2011.12.26 - r673
|
||||
-----------------
|
||||
|
||||
* Added infection countdown. Backported from zr-dev:52955b169945 (655).
|
||||
|
||||
2011.12.27 - r675
|
||||
-----------------
|
||||
|
||||
* Added cvar for disabling team balancing on round end (for use with custom
|
||||
team balancer): zr_roundend_balance_teams. Disabling this will cause players
|
||||
to remain on their current team when a new round starts. If zombies win,
|
||||
everyone will remain on the terrorists team.
|
||||
* Fixed invalid handle error after a map change.
|
||||
* Fixed language code typo in translations.
|
||||
* Infection countdown is no longer displayed if the infection delay is just one
|
||||
second.
|
||||
|
||||
2012.06.10 - r689
|
||||
-----------------
|
||||
* Fixed ragdoll removal not being entirely disabled.
|
||||
* Fixed disabled classes still being validated.
|
||||
* Fixed memory leak in infection countdown feature.
|
||||
* Updated to use new natives in cstrike extension instead of SDK calls (fixing ZR not finding some signatures in some cases). Requires SourceMod 1.4.0 or newer.
|
||||
* Changed ZMarket to auto-buy weapons once settings are loaded (if auto-buy is enabled).
|
||||
|
||||
2012.07.03 - r692
|
||||
-----------------
|
||||
* Replaced RemoveEdict with kill entity input command. This might fix some rare crashes.
|
||||
* Updated gamedata file. Thanks to psychonic and TnTSCS.
|
||||
|
||||
2012.07.04 - r693
|
||||
-----------------
|
||||
* Fixed incorrect offsets in gamedata file.
|
||||
===============================================================================
|
||||
|
||||
Zombie:Reloaded Beta 2
|
||||
|
||||
Patch Changelog
|
||||
|
||||
===============================================================================
|
||||
|
||||
For detailed info about changes in configuration files, see diff-files in the
|
||||
"changes" directory. They describe added and removed lines for each patch
|
||||
released. If the file is empty there are no config changes in that patch.
|
||||
|
||||
2009.12.11 - r545
|
||||
-------------------
|
||||
|
||||
* Initial beta 2 release. See zr_3.0-b2_release_notes.txt.
|
||||
|
||||
|
||||
2009.12.17 - r555
|
||||
-------------------
|
||||
|
||||
* Fixed too short translation buffer on yes/no phrases.
|
||||
* Fixed warning about invalid class attribute.
|
||||
|
||||
|
||||
2009.12.23 - r557
|
||||
-------------------
|
||||
|
||||
* Added russian translation by exvel.
|
||||
|
||||
|
||||
2009.12.25 - r565
|
||||
-------------------
|
||||
|
||||
* Fixed incorrect link in docs.
|
||||
* Removed redundant check for class menu command.
|
||||
* Fixed suicide intercept message not displayed in chat. Text from chat will
|
||||
still appear in console if written from console.
|
||||
* Added source code for current snapshot in release package.
|
||||
|
||||
|
||||
2010.01.07 - r580
|
||||
-------------------
|
||||
|
||||
* Added zrdocs/changes.diff in patches that will describe changes in text files
|
||||
since the main release, in unified diff format. Use a editor that support
|
||||
diff coloring for easier reading.
|
||||
* Fixed players not extinguished properly when in water.
|
||||
* Fixed invalid default values in some has_napalm class attributes.
|
||||
* Fixed the display bug in ZTele showing 0/X uses instead of 1/X.
|
||||
* Changed to error types to be fatal and stop plugin to prevent further errors
|
||||
(fixes rare invalid handle error in weapon module).
|
||||
* Fixed weapon not rendering correctly in rare cases.
|
||||
* Added a cvar to allow zombies to pick up weapons at the end of the round.
|
||||
|
||||
|
||||
2010.01.25 - r584
|
||||
-------------------
|
||||
|
||||
* Simplified english and norwegian zmarket menu phrases.
|
||||
* Fixed account module giving money to zombies hurting themself with
|
||||
self-inflicted damage
|
||||
* Fixed zr_damage_suicide_human not working when enabled.
|
||||
* Switched the plugin to use SDK Hooks extension instead of ZR Tools (r584 and
|
||||
newer). Run this on SourceMod 1.3 or newer.
|
||||
|
||||
|
||||
2010.02.14 - r595
|
||||
-------------------
|
||||
|
||||
* Added patch changelog.
|
||||
* Fixed unlimited ammo exploit in ZMarket menu.
|
||||
* Fixed admin classes not restored from cookies.
|
||||
* Fixed a bug in client listing menus when selecting a client that left the
|
||||
game caused errors.
|
||||
* Fixed the default sky on the first map not reverting properly if
|
||||
zr_veffects_sky was enabled in zombiereloaded.cfg.
|
||||
* Fixed players not extinguished when in water.
|
||||
* Stopped the "Zombies can't use weapons" message when using autobuy outside of
|
||||
a buyzone.
|
||||
* Fixed problems that came up if a client was infected through admin after the
|
||||
round started, but before the freezetime expired.
|
||||
* Fixed a bug where zr_suicide_cmds was being ignored and only the default
|
||||
value was being used.
|
||||
|
||||
2010.02.23 - r598
|
||||
-------------------
|
||||
|
||||
* Fixed cookies being reset on some occasions and admin-dependant classes are
|
||||
restored properly as well.
|
||||
|
||||
|
||||
2010.04.05 - r607
|
||||
-------------------
|
||||
|
||||
* Separated patch difflog (changes.diff) into separate file for each patch
|
||||
released.
|
||||
* Added scream and moan commands for zombies, with spam protection.
|
||||
* Added missing note about no_fall_damage class attribute in docs.
|
||||
* Fixed class attributes applied too early (moved to spawn post event). This
|
||||
fixes issues with FOV and bots.
|
||||
* Fixed saved classes not validated by team id when restoring from cookies.
|
||||
|
||||
|
||||
2010.06.03 - r611
|
||||
-------------------
|
||||
|
||||
* Added cvar to enable suicide intercept before the first zombie.
|
||||
* Added cvar for minimum dx level on overlays.
|
||||
* Fixed classes not always restored from cookies.
|
||||
|
||||
|
||||
2010.06.03 - r613
|
||||
-------------------
|
||||
|
||||
* Fixed signatures and round end defines that were updated in CS:S OB.
|
||||
|
||||
|
||||
2010.07.25 - r633
|
||||
-------------------
|
||||
|
||||
* Added support for different speed methods, defaulted to prop offset method.
|
||||
See the manual for more information about the class speed attribute.
|
||||
Important: Class speeds and spawn protection speed must be updated! Use this
|
||||
conversion formula:
|
||||
prop speed offset = ((lmv speed / 300) * 250) - 250
|
||||
If you don't want to update speed values right now, use
|
||||
"zr_classes_speed_method lmv" in zombiereloaded.cfg for backwards
|
||||
compatibility.
|
||||
* Added 'explode' suicide command from OB update to intercept list (bug 190).
|
||||
* Removed unnecessary antistick commands for model hull width, all models have
|
||||
the same hull width.
|
||||
* Removed hint sound on hp display and spawn protection timer. Credits goes to
|
||||
to Tauphi.
|
||||
* Fixed an error that happened when buying ammo and not having a weapon in
|
||||
prim/sec slot.
|
||||
* Fixed class menus being disabled and not checking if the player have access
|
||||
to private classes.
|
||||
* Fixed client not connected error in class module.
|
||||
* Updated compiler. ZR now requires SourceMod 1.3 or newer.
|
||||
|
||||
|
||||
2010.08.28 - r643
|
||||
-------------------
|
||||
|
||||
* Fixed function signatures that were changed after a CS update. Credit goes to
|
||||
psychonic.
|
||||
* Fixed class speed multiplier not properly applied with prop speed method (bug
|
||||
199).
|
||||
* Fixed invalid handle error in ZMarket module (bug 152).
|
||||
* Fixed a rare case where removing weapons didn't work.
|
||||
* Possibly fixed invalid handle error with WeaponsEntityToDisplay (bug 163).
|
||||
* Lowered sv_maxspeed to work around a acceleration issue with spectators.
|
||||
* Added validation error messages for individual attributes when loading
|
||||
classes. Easier than reading bits from a number.
|
||||
* Improved confusing description of the NVGs class attribute.
|
||||
|
||||
2010.10.15 - r644
|
||||
-------------------
|
||||
|
||||
* Changed default speed method to LMV because prop speed offsets are broken at
|
||||
the moment. This will introduce some side effects again; jump and fall speed
|
||||
is affected. Weapon recoil is also affected, but it's not confirmed that it
|
||||
has negative impact on bullets or aiming itself.
|
||||
Note: Those who already changed speed method back to LMV don't need this
|
||||
patch.
|
||||
|
||||
2010.11.14 - r647
|
||||
-------------------
|
||||
|
||||
* Added external plugin API for ZR with basic infection and respawn tools. The
|
||||
following natives and forwards are now available:
|
||||
ZR_IsClientZombie
|
||||
ZR_IsClientHuman
|
||||
ZR_InfectClient
|
||||
ZR_HumanClient
|
||||
ZR_OnClientInfect
|
||||
ZR_OnClientInfected
|
||||
ZR_OnClientHuman
|
||||
ZR_OnClientHumanPost
|
||||
ZR_RespawnClient
|
||||
ZR_OnClientRespawn
|
||||
ZR_OnClientRespawned
|
||||
ZR_SetKilledByWorld
|
||||
ZR_GetKilledByWorld
|
||||
See addons/sourcemod/scripting/include/zr in the package for details.
|
||||
Also see addons/sourcemod/scripting/testsuite/zr for API usage examples.
|
||||
|
||||
2010.11.17 - r648
|
||||
-------------------
|
||||
|
||||
* Fixed players not respawning as zombies when they are supposed to.
|
||||
|
||||
2011.06.17 - r651, r653
|
||||
-------------------------
|
||||
|
||||
* Added improved random number generator from SMLIB.
|
||||
* Fixed dead players being able to get weapons through ZMarket.
|
||||
* Fixed consecutive mother zombie infection prevention not always working.
|
||||
|
||||
2011.06.23 - r657
|
||||
-----------------
|
||||
|
||||
* Added spanish translation by Franc1sco.
|
||||
|
||||
2011.08.05 - r666
|
||||
-----------------
|
||||
|
||||
* Increased class limit to 64 classes.
|
||||
* Fixed the ragdoll module unintentionally removing other valid entities if a
|
||||
ragdoll was attempted to be removed after the round restarted.
|
||||
* Fixed format settings in spanish translation spamming logs.
|
||||
* Fixed index out of bounds error when class limit is reached.
|
||||
* Fixed double inclusion of jump boost module preventing code from compiling on
|
||||
newer compilers.
|
||||
|
||||
2011.10.30 - r669
|
||||
-----------------
|
||||
|
||||
* Fixed internal player spawn post event fired too early (causing invisible
|
||||
models).
|
||||
* Possibly fixed invalid entity error (bug 195).
|
||||
|
||||
2011.12.08 - r671
|
||||
-----------------
|
||||
|
||||
* Updated gamedata file. Thanks to pillepallus.
|
||||
|
||||
2011.12.26 - r673
|
||||
-----------------
|
||||
|
||||
* Added infection countdown. Backported from zr-dev:52955b169945 (655).
|
||||
|
||||
2011.12.27 - r675
|
||||
-----------------
|
||||
|
||||
* Added cvar for disabling team balancing on round end (for use with custom
|
||||
team balancer): zr_roundend_balance_teams. Disabling this will cause players
|
||||
to remain on their current team when a new round starts. If zombies win,
|
||||
everyone will remain on the terrorists team.
|
||||
* Fixed invalid handle error after a map change.
|
||||
* Fixed language code typo in translations.
|
||||
* Infection countdown is no longer displayed if the infection delay is just one
|
||||
second.
|
||||
|
||||
2012.06.10 - r689
|
||||
-----------------
|
||||
* Fixed ragdoll removal not being entirely disabled.
|
||||
* Fixed disabled classes still being validated.
|
||||
* Fixed memory leak in infection countdown feature.
|
||||
* Updated to use new natives in cstrike extension instead of SDK calls (fixing ZR not finding some signatures in some cases). Requires SourceMod 1.4.0 or newer.
|
||||
* Changed ZMarket to auto-buy weapons once settings are loaded (if auto-buy is enabled).
|
||||
|
||||
2012.07.03 - r692
|
||||
-----------------
|
||||
* Replaced RemoveEdict with kill entity input command. This might fix some rare crashes.
|
||||
* Updated gamedata file. Thanks to psychonic and TnTSCS.
|
||||
|
||||
2012.07.04 - r693
|
||||
-----------------
|
||||
* Fixed incorrect offsets in gamedata file.
|
||||
|
@ -1,105 +1,105 @@
|
||||
===============================================================================
|
||||
|
||||
Zombie:Reloaded Release Notes
|
||||
|
||||
Targets plugin version 3.0.0 Beta 2, 2009.12.11
|
||||
Written by Richard Helgeby
|
||||
|
||||
Last modified: 2009.12.11
|
||||
|
||||
===============================================================================
|
||||
|
||||
Zombie:Reloaded Release Notes
|
||||
|
||||
Targets plugin version 3.0.0 Beta 2, 2009.12.11
|
||||
Written by Richard Helgeby
|
||||
|
||||
Last modified: 2009.12.11
|
||||
|
||||
===============================================================================
|
||||
|
||||
Release Notes For Changes In Beta 2
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Almost all known issues is now fixed. Beta 2 is a result of six months of work
|
||||
on our spare time, which is pretty good in our opinion. There's a few new
|
||||
features and some changes. These are the major news (also see changelog below):
|
||||
|
||||
* Support for group authentication on admin commands, models and classes.
|
||||
See Admin Authentication (3.24) in the user manual for usage information.
|
||||
|
||||
* Class selections and other settings can be saved in cookies (stored in a
|
||||
|
||||
Almost all known issues is now fixed. Beta 2 is a result of six months of work
|
||||
on our spare time, which is pretty good in our opinion. There's a few new
|
||||
features and some changes. These are the major news (also see changelog below):
|
||||
|
||||
* Support for group authentication on admin commands, models and classes.
|
||||
See Admin Authentication (3.24) in the user manual for usage information.
|
||||
|
||||
* Class selections and other settings can be saved in cookies (stored in a
|
||||
database or a file on the server).
|
||||
|
||||
* Class editor for volumetric features. Modify class attributes on players in a
|
||||
certain area. This could be extra jump boost in some places, or lower knock
|
||||
back in tubes and vents. Note that this feature is still a work in progress.
|
||||
|
||||
Documentation for this one isn't written yet. This syntax should help:
|
||||
zr_vol_add <x1> <y1> <z1> <x2> <y2> <z2> classedit <class attribute>=<value>
|
||||
|
||||
This will make players run fast in a certain area (replace coordinates):
|
||||
zr_vol_add -492 -522 497 511 534 681 classedit speed=500
|
||||
|
||||
* Changed model list to Valve's key/values format (same as classes use). Now
|
||||
it's possible to separate models into different groups and teams.
|
||||
|
||||
* There's a compatibility fix in classes for servers with plugins that change
|
||||
models. "model_path" in a class can be set to "no_change" so model can be
|
||||
changed by another plugin than Zombie:Reloaded.
|
||||
|
||||
* The user manual is converted to a nice looking HTML manual with links for
|
||||
quick navigation. Don't forget to have a look at it, at least if you have
|
||||
problems.
|
||||
|
||||
Troubleshooting section is updated with explanation of all error messages
|
||||
and some info about common problems. Otherwise look at the configuration
|
||||
section on how to configure every feature.
|
||||
|
||||
|
||||
Richard Helgeby &
|
||||
|
||||
* Class editor for volumetric features. Modify class attributes on players in a
|
||||
certain area. This could be extra jump boost in some places, or lower knock
|
||||
back in tubes and vents. Note that this feature is still a work in progress.
|
||||
|
||||
Documentation for this one isn't written yet. This syntax should help:
|
||||
zr_vol_add <x1> <y1> <z1> <x2> <y2> <z2> classedit <class attribute>=<value>
|
||||
|
||||
This will make players run fast in a certain area (replace coordinates):
|
||||
zr_vol_add -492 -522 497 511 534 681 classedit speed=500
|
||||
|
||||
* Changed model list to Valve's key/values format (same as classes use). Now
|
||||
it's possible to separate models into different groups and teams.
|
||||
|
||||
* There's a compatibility fix in classes for servers with plugins that change
|
||||
models. "model_path" in a class can be set to "no_change" so model can be
|
||||
changed by another plugin than Zombie:Reloaded.
|
||||
|
||||
* The user manual is converted to a nice looking HTML manual with links for
|
||||
quick navigation. Don't forget to have a look at it, at least if you have
|
||||
problems.
|
||||
|
||||
Troubleshooting section is updated with explanation of all error messages
|
||||
and some info about common problems. Otherwise look at the configuration
|
||||
section on how to configure every feature.
|
||||
|
||||
|
||||
Richard Helgeby &
|
||||
Greyscale
|
||||
|
||||
|
||||
Changelog
|
||||
-----------
|
||||
Added a cvar to either reset the burn time when naded, or to use the original burn-time. (r408)
|
||||
Added norwegian translations. (r413)
|
||||
Added cvars for disallowing class selection, per team. (r421)
|
||||
Added cvar to redisplay class selection menu every spawn. (r424)
|
||||
Added feature for allowing instant class change on humans after spawning, with a time limit. (r424)
|
||||
Added feature for using group based authentication on admin commands in Zombie:Reloaded, using SourceMod groups. (425)
|
||||
Added support for group authentication on classes (makes VIP and donator classes possible). (r427)
|
||||
Added feature for saving class selections in cookies. (r432)
|
||||
Added zr_version command for dumping version info. Useful when reporting problems. (r442)
|
||||
Added support for Grenade Pack plugin (by Greyscale). (r447)
|
||||
Added class editor volumetric feature that can modify certain class attributes on players in a volume. (r469)
|
||||
Added HTML version of the user manual. (r486)
|
||||
Added more random model selection presets for classes: public, admins, hidden and mother zombies. (r506)
|
||||
Added cvar for displaying class menu on first spawn. (r518)
|
||||
Changed lightstyle cvar default to be disabled. (r414)
|
||||
Changed classes to support not changing player model (for compatibility with other plugins). (r431)
|
||||
Changed maximum class limit to 48 classes. (r478)
|
||||
Changed class dumping commands to admin commands. (r479)
|
||||
Changed sky and sun cvars default to be disabled (to mach default lightstyle setting). (r483)
|
||||
Changed default setting to allow humans to use teleport after mother zombie spawn. (r486)
|
||||
Changed admin teleport command to also log target names. (r493)
|
||||
Changed map config files to be loaded at correct time. (r500)
|
||||
Changed model config to key/value format and improved model module features. (r506)
|
||||
Fixed translation buffers too short for languages that use unicode characters. (r409)
|
||||
Fixed some potential problems in ZMarket handling NVGs. (r410)
|
||||
Fixed some menus not properly translating into the client's language. (r411)
|
||||
Fixed translation issues in class menus (r412).
|
||||
Fixed ZMarket auto-rebuy possibly being stuck on if market was disabled. Now auto-disables if market is disabled. (r416)
|
||||
Fixed missing quote in english translation file. (r421)
|
||||
Fixed default class assignment assigning classes players doesn't have access to. (r433)
|
||||
Fixed teleport not resetting velocity. (r434)
|
||||
Fixed no fall damage class attribute not working on human classes. (r435)
|
||||
Fixed weapon type restriction menu not translating the first time. (r443)
|
||||
Fixed ZMarket weapon type selection menu title not translated.
|
||||
Fixed too short title string buffer in ZMarket loadout, ZTele force, ZSpawn force and hit group menus. (r443)
|
||||
Fixed "empty" phrase not translated. (r443)
|
||||
Fixed on/off translation string space too short in hit group menu. (r443)
|
||||
Fixed not all grenades being removed when infected. (r458)
|
||||
Fixed players ignited twice on some anticamp volumes. (r561)
|
||||
Fixed health regeneration timer not stopping if a player were kicked or timed out. (r469)
|
||||
Fixed existing volumes not removed after a map change. (r469)
|
||||
Fixed server console not having full access to admin commands. (r488)
|
||||
Fixed memory leak in ZMarket. (r489)
|
||||
Fixed memory leak in model list parser. (r492)
|
||||
Fixed timer handle error on map end. (r500)
|
||||
Fixed ambience sound still playing when disabled. (r520)
|
||||
Fixed health regeneration timer handle error. (r527)
|
||||
Fixed zr_class_set_multiplier not aborting when there's a invalid attribute name specified. (r529)
|
||||
Fixed broken FOV. (r542)
|
||||
|
||||
|
||||
Changelog
|
||||
-----------
|
||||
Added a cvar to either reset the burn time when naded, or to use the original burn-time. (r408)
|
||||
Added norwegian translations. (r413)
|
||||
Added cvars for disallowing class selection, per team. (r421)
|
||||
Added cvar to redisplay class selection menu every spawn. (r424)
|
||||
Added feature for allowing instant class change on humans after spawning, with a time limit. (r424)
|
||||
Added feature for using group based authentication on admin commands in Zombie:Reloaded, using SourceMod groups. (425)
|
||||
Added support for group authentication on classes (makes VIP and donator classes possible). (r427)
|
||||
Added feature for saving class selections in cookies. (r432)
|
||||
Added zr_version command for dumping version info. Useful when reporting problems. (r442)
|
||||
Added support for Grenade Pack plugin (by Greyscale). (r447)
|
||||
Added class editor volumetric feature that can modify certain class attributes on players in a volume. (r469)
|
||||
Added HTML version of the user manual. (r486)
|
||||
Added more random model selection presets for classes: public, admins, hidden and mother zombies. (r506)
|
||||
Added cvar for displaying class menu on first spawn. (r518)
|
||||
Changed lightstyle cvar default to be disabled. (r414)
|
||||
Changed classes to support not changing player model (for compatibility with other plugins). (r431)
|
||||
Changed maximum class limit to 48 classes. (r478)
|
||||
Changed class dumping commands to admin commands. (r479)
|
||||
Changed sky and sun cvars default to be disabled (to mach default lightstyle setting). (r483)
|
||||
Changed default setting to allow humans to use teleport after mother zombie spawn. (r486)
|
||||
Changed admin teleport command to also log target names. (r493)
|
||||
Changed map config files to be loaded at correct time. (r500)
|
||||
Changed model config to key/value format and improved model module features. (r506)
|
||||
Fixed translation buffers too short for languages that use unicode characters. (r409)
|
||||
Fixed some potential problems in ZMarket handling NVGs. (r410)
|
||||
Fixed some menus not properly translating into the client's language. (r411)
|
||||
Fixed translation issues in class menus (r412).
|
||||
Fixed ZMarket auto-rebuy possibly being stuck on if market was disabled. Now auto-disables if market is disabled. (r416)
|
||||
Fixed missing quote in english translation file. (r421)
|
||||
Fixed default class assignment assigning classes players doesn't have access to. (r433)
|
||||
Fixed teleport not resetting velocity. (r434)
|
||||
Fixed no fall damage class attribute not working on human classes. (r435)
|
||||
Fixed weapon type restriction menu not translating the first time. (r443)
|
||||
Fixed ZMarket weapon type selection menu title not translated.
|
||||
Fixed too short title string buffer in ZMarket loadout, ZTele force, ZSpawn force and hit group menus. (r443)
|
||||
Fixed "empty" phrase not translated. (r443)
|
||||
Fixed on/off translation string space too short in hit group menu. (r443)
|
||||
Fixed not all grenades being removed when infected. (r458)
|
||||
Fixed players ignited twice on some anticamp volumes. (r561)
|
||||
Fixed health regeneration timer not stopping if a player were kicked or timed out. (r469)
|
||||
Fixed existing volumes not removed after a map change. (r469)
|
||||
Fixed server console not having full access to admin commands. (r488)
|
||||
Fixed memory leak in ZMarket. (r489)
|
||||
Fixed memory leak in model list parser. (r492)
|
||||
Fixed timer handle error on map end. (r500)
|
||||
Fixed ambience sound still playing when disabled. (r520)
|
||||
Fixed health regeneration timer handle error. (r527)
|
||||
Fixed zr_class_set_multiplier not aborting when there's a invalid attribute name specified. (r529)
|
||||
Fixed broken FOV. (r542)
|
||||
|
@ -1,57 +1,57 @@
|
||||
===============================================================================
|
||||
|
||||
Zombie:Reloaded Release Notes
|
||||
|
||||
Targets plugin version 3.0.0 Beta 1, 2009.07.25
|
||||
Written by Richard Helgeby
|
||||
|
||||
Last modified: 2009.12.11
|
||||
|
||||
===============================================================================
|
||||
|
||||
Zombie:Reloaded Release Notes
|
||||
|
||||
Targets plugin version 3.0.0 Beta 1, 2009.07.25
|
||||
Written by Richard Helgeby
|
||||
|
||||
Last modified: 2009.12.11
|
||||
|
||||
===============================================================================
|
||||
|
||||
Release Notes
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This is a major release and it do break compatibility with older configuration!
|
||||
This is a major release and it do break compatibility with older configuration!
|
||||
Clean install of configuration files and reconfiguring is recommended.
|
||||
|
||||
A lot of work is put into this plugin. The entire plugin is completely recoded
|
||||
with lots of improvements and fixes.
|
||||
|
||||
Our code base have expanded at least five times compared to version 2.5.1
|
||||
(source have reached 30 000 lines total). Of course, made with optimizing in
|
||||
mind. This is, as far as we know, the biggest SourceMod plugin ever made!
|
||||
|
||||
We also hope Zombie:Reloaded will be a good learning resource for new or
|
||||
existing coders to find out how certain things are done. The code is well
|
||||
structured and documented with comments explaining almost what every line do.
|
||||
|
||||
In addition we try to make this a quality release with a well tested release
|
||||
and a full user manual. Read the user manual for details on how to use or
|
||||
configure individual features. Better quality and less time spent on support
|
||||
gives more time for us to do more.
|
||||
|
||||
UPDATE: See "zr_3.0-b2_release_notes.txt" for changes in Beta 2.
|
||||
|
||||
|
||||
Richard Helgeby &
|
||||
A lot of work is put into this plugin. The entire plugin is completely recoded
|
||||
with lots of improvements and fixes.
|
||||
|
||||
Our code base have expanded at least five times compared to version 2.5.1
|
||||
(source have reached 30 000 lines total). Of course, made with optimizing in
|
||||
mind. This is, as far as we know, the biggest SourceMod plugin ever made!
|
||||
|
||||
We also hope Zombie:Reloaded will be a good learning resource for new or
|
||||
existing coders to find out how certain things are done. The code is well
|
||||
structured and documented with comments explaining almost what every line do.
|
||||
|
||||
In addition we try to make this a quality release with a well tested release
|
||||
and a full user manual. Read the user manual for details on how to use or
|
||||
configure individual features. Better quality and less time spent on support
|
||||
gives more time for us to do more.
|
||||
|
||||
UPDATE: See "zr_3.0-b2_release_notes.txt" for changes in Beta 2.
|
||||
|
||||
|
||||
Richard Helgeby &
|
||||
Greyscale
|
||||
|
||||
|
||||
OVERVIEW OF MAJOR CHANGES
|
||||
---------------------------
|
||||
|
||||
* New configuration style. Configuration files and CVARs are also validated so
|
||||
* New configuration style. Configuration files and CVARs are also validated so
|
||||
errors and invalid values are caught early.
|
||||
|
||||
* Expanded class system with support for human classes and additional
|
||||
attributes like setting transparency on player classes, effects or other
|
||||
attributes like setting transparency on player classes, effects or other
|
||||
special behaviour.
|
||||
|
||||
* New weapon configurations that support knock back multipliers per weapon and
|
||||
custom weapon groups for easy restriction.
|
||||
|
||||
* Market feature for pre configuring or buying equimpents and weapons from the
|
||||
custom weapon groups for easy restriction.
|
||||
|
||||
* Market feature for pre configuring or buying equimpents and weapons from the
|
||||
oposite team, also outside the buy zone if allowed in configuration.
|
||||
|
||||
* Improved knock back with support for scaling based on different modules. Now
|
||||
@ -62,10 +62,10 @@ OVERVIEW OF MAJOR CHANGES
|
||||
|
||||
* Improved teleport settings. Delays and limits separated per team.
|
||||
|
||||
* Admin menu. Configure certain settings in-game, do generic commands like
|
||||
infect, spawn and teleport.
|
||||
|
||||
* Cookies. This plugin is using the cookie system of SourceMod so player
|
||||
* Admin menu. Configure certain settings in-game, do generic commands like
|
||||
infect, spawn and teleport.
|
||||
|
||||
* Cookies. This plugin is using the cookie system of SourceMod so player
|
||||
preferences can be saved until next time they connect.
|
||||
|
||||
* New logging system that is fully customizable. Makes it possible to decide
|
||||
@ -80,8 +80,8 @@ Configuration settings are validated when the plugin starts. The plugin will
|
||||
stop, use defaults or disable features if there are invalid values. Also a
|
||||
warning is logged in the SourceMod error logs.
|
||||
|
||||
The validation prevents unexpected or invalid behaviour in the plugin. Dealing
|
||||
with errors or warnings in error logs helps a lot troubleshooting eventual
|
||||
The validation prevents unexpected or invalid behaviour in the plugin. Dealing
|
||||
with errors or warnings in error logs helps a lot troubleshooting eventual
|
||||
issues in the plugin caused by incorrect configurations.
|
||||
|
||||
It's also possible to specify the path of configuration files. This can be used
|
||||
@ -91,14 +91,14 @@ configuration sets per map.
|
||||
Support for post map configs is made. These are configs executed after the
|
||||
plugin and its features are loaded. Some settings can only be changed or
|
||||
overridden after loading. Those commands must be placed in post map configs.
|
||||
|
||||
|
||||
|
||||
IMPROVED CLASS SYSTEM
|
||||
-----------------------
|
||||
|
||||
There's a lot of new features in the class system. The major change is that
|
||||
it's made for multiple teams (humans and zombies). Now human classes can be
|
||||
made. It has support for extended team filtering where admin-only and mother
|
||||
made. It has support for extended team filtering where admin-only and mother
|
||||
zombie classes can be made.
|
||||
|
||||
In addition any attribute on one or more classes can be modified in-game, which
|
||||
@ -108,26 +108,26 @@ running speed.
|
||||
|
||||
One of the new features is transparency on players. There are also immunity
|
||||
modes (but it's currently a incomplete feature) that could implement slow
|
||||
infection that requires zombies to stab multiple times with its knife before
|
||||
infection that requires zombies to stab multiple times with its knife before
|
||||
the humans get infected, or stab them to death (turning into a zombie).
|
||||
|
||||
|
||||
IMPROVED WEAPON SYSTEM
|
||||
------------------------
|
||||
|
||||
The new weapon system lets makes it possible to do more than just restricting
|
||||
weapons. Now it's possible to set knock back multipliers per weapon.
|
||||
|
||||
Hit groups can also be configured with knock back multipliers, or disable
|
||||
damage on certain hit groups completely.
|
||||
|
||||
There's also a new market feature which is a custom buy menu with all available
|
||||
weapons, including from the oposite team. It's also possible to buy weapons
|
||||
outside the buy zone if the server admins enable that setting.
|
||||
|
||||
Weapon selections can be pre configured and even saved using cookies so they
|
||||
can be quickly bought on next spawn or on next connect to the server.
|
||||
|
||||
|
||||
IMPROVED WEAPON SYSTEM
|
||||
------------------------
|
||||
|
||||
The new weapon system lets makes it possible to do more than just restricting
|
||||
weapons. Now it's possible to set knock back multipliers per weapon.
|
||||
|
||||
Hit groups can also be configured with knock back multipliers, or disable
|
||||
damage on certain hit groups completely.
|
||||
|
||||
There's also a new market feature which is a custom buy menu with all available
|
||||
weapons, including from the oposite team. It's also possible to buy weapons
|
||||
outside the buy zone if the server admins enable that setting.
|
||||
|
||||
Weapon selections can be pre configured and even saved using cookies so they
|
||||
can be quickly bought on next spawn or on next connect to the server.
|
||||
|
||||
|
||||
CUSTOMIZING KNOCK BACK
|
||||
------------------------
|
||||
@ -165,11 +165,11 @@ certain stuff on players. These are the available features:
|
||||
- Modify knock back set on players or knock back in hit groups.
|
||||
|
||||
- Teleporter.
|
||||
|
||||
Features that modify settings will be reverted when players leave volumes.
|
||||
Example of usage is to only allow pistols in tubes, use the anti-camp to hurt
|
||||
humans camping in a certain unfair place, or fine tune knock back for a area in
|
||||
the map.
|
||||
|
||||
Features that modify settings will be reverted when players leave volumes.
|
||||
Example of usage is to only allow pistols in tubes, use the anti-camp to hurt
|
||||
humans camping in a certain unfair place, or fine tune knock back for a area in
|
||||
the map.
|
||||
|
||||
|
||||
TELEPORTER
|
||||
@ -208,7 +208,7 @@ or do generic commands. That is:
|
||||
LOGGING SYSTEM
|
||||
----------------
|
||||
|
||||
The logging system is based on logging flags and filtering that gives full
|
||||
The logging system is based on logging flags and filtering that gives full
|
||||
control of what log types and events to be logged.
|
||||
|
||||
There are a few generic log events and settings, like these:
|
||||
@ -222,7 +222,7 @@ There are a few generic log events and settings, like these:
|
||||
|
||||
- Debug messages, if any. Usually only developers use this one.
|
||||
|
||||
- Debug messages with more detail. It may cause spam, but this can be
|
||||
- Debug messages with more detail. It may cause spam, but this can be
|
||||
avoided in combination with module filtering.
|
||||
|
||||
- Ignoring log events caused by server commands (console), like from map
|
||||
@ -233,6 +233,6 @@ There are a few generic log events and settings, like these:
|
||||
In addition a module filter can be enabled. Only log messages from modules
|
||||
listed in the filter is logged, other are ignored. Except fatal errors, those
|
||||
are logged anyways.
|
||||
|
||||
The logging system is made this way so server admins can monitor activity in
|
||||
Zombie:Reloaded whithout reading spammed log messages.
|
||||
|
||||
The logging system is made this way so server admins can monitor activity in
|
||||
Zombie:Reloaded whithout reading spammed log messages.
|
||||
|
@ -1,221 +1,221 @@
|
||||
===============================================================================
|
||||
|
||||
Zombie:Reloaded Release Notes
|
||||
Version 3.1.0
|
||||
|
||||
Written by Richard Helgeby
|
||||
|
||||
===============================================================================
|
||||
|
||||
Release Notes
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Zombie:Reloaded is now mature enough to be called stable and we bump the version
|
||||
to 3.1. The patches since the beta 2 release have fixed several issues and
|
||||
improved a few things.
|
||||
|
||||
There's no official CS: GO support yet, as it's not our primary focus.
|
||||
|
||||
|
||||
Richard Helgeby &
|
||||
Greyscale
|
||||
|
||||
2013.01.12
|
||||
|
||||
|
||||
MAJOR NEWS IN THIS RELEASE
|
||||
----------------------------
|
||||
|
||||
IMMUNITY MODES
|
||||
|
||||
Immunity modes is an old idea that has been around since ZR 3.0 beta 1. It was
|
||||
never given priority, until now.
|
||||
|
||||
These modes change the way attacks are received either as zombie or human. It's
|
||||
now possible to do the following:
|
||||
|
||||
* Slow infection. Zombies can hurt humans so they'll loose HP. Either humans
|
||||
are stabbed to death, or they can be infected if go below a HP threshold. If
|
||||
some maps have medkits (or implement them) humans will get multiple chances
|
||||
of getting away from zombies.
|
||||
|
||||
* Delayed infection. Instead of instantly turning a zombie, the infection is
|
||||
delayed a few seconds (customizable). It's also possible to enable that
|
||||
subsequent zombie attacks will reduce the delay by a certain amount of
|
||||
seconds and speedup the infection. A possible feature that can be
|
||||
implemented later is a cure for infection so that humans can cure themself
|
||||
before the time is up.
|
||||
|
||||
* Instant kill. Zombies will instantly kill humans when attacking instead of
|
||||
infecting.
|
||||
|
||||
* Block damage. Zombies can't take damage from humans, but are still
|
||||
vulnerable to knock back. With this mode, humans can only win by surviving
|
||||
the entire round.
|
||||
|
||||
* Deploy a shield. This is a temporary immunity mode similar to TF2's
|
||||
übercharge and activated by the "zshield" command (in chat or console).
|
||||
Humans will be immune to infection and zombies will not receive knock back
|
||||
(they still receive damage). The shield only last for a few seconds and need
|
||||
a cooldown before it can be used again. Both values can be customized.
|
||||
Currently there are no visual effects when the shield is deployed, but this
|
||||
makes it possible for humans to use themself as a decoy.
|
||||
|
||||
* Be completely immune. Humans can't be infected and zombies don't receive
|
||||
damage or knock back. There's no use for this mode itself and it will break
|
||||
the game, but it's there if someone want to be creative with addon plugins.
|
||||
It's practically the same as a permanent spawn protection, only that it
|
||||
works on zombie classes too.
|
||||
|
||||
It's of course possible to make various classes with different modes, so you're
|
||||
not bound to use only one of them.
|
||||
|
||||
These modes can drastically improve the gameplay and make it more fun to play.
|
||||
|
||||
|
||||
INFECTION MODES
|
||||
|
||||
It's now possible to get better control of how many humans that are infected
|
||||
when the round has started. It has three modes:
|
||||
|
||||
* Dynamic (default). This is the old one that scales number of zombies
|
||||
according to a ratio and number of players on the server.
|
||||
|
||||
* Absolute. Infect an absolute number of humans. This mode also has an option
|
||||
to invert the infection so that everyone but a small group of humans are
|
||||
infected (like a survivor game mode).
|
||||
|
||||
* Range. Infects a random number of players between a minimum and maximum
|
||||
range.
|
||||
|
||||
|
||||
GAME MODE CONFIGS
|
||||
|
||||
With the introduction of immunity modes and infection modes it's possible to
|
||||
make a few game modes. These are not real game modes, but various configurations
|
||||
of Zombie:Reloaded.
|
||||
|
||||
A few example configs are provided (based on the Zombie Plague plugin):
|
||||
|
||||
* Nemesis. Only one zombie is spawned, but it's very powerful and do instant
|
||||
kills (64K HP, speed, jump boost, and very low knock back). Humans must
|
||||
survive the round or kill it. Teamwork is essential in this mode.
|
||||
|
||||
* Survivor. Everyone is infected but a small group of humans.
|
||||
|
||||
* Swarm. 50% is infected. Humans fight to the death - humans are stabbed to
|
||||
death instead of infected. This requires a post map config to modify the
|
||||
immunity mode on all humans.
|
||||
|
||||
When the map is changed or reloaded the default configuration is restored. You
|
||||
need to use map configs to enable these modes. It might work to enable some of
|
||||
them after the map is loaded, but some modes require the class config to be
|
||||
reloaded and reapplied on all players (zr_config_reload and zr_class_reload
|
||||
commands).
|
||||
|
||||
|
||||
INSTALLATION
|
||||
--------------
|
||||
|
||||
Install the following requirements:
|
||||
|
||||
* Metamod:Source 1.8.6+
|
||||
http://sourcemm.net/
|
||||
|
||||
* SourceMod 1.4.0+
|
||||
http://sourcemod.net/
|
||||
|
||||
* SDK Hooks extension 2.0+
|
||||
http://forums.alliedmods.net/showthread.php?t=106748
|
||||
|
||||
The version numbers listed above are minimum requirements. You should always get
|
||||
the latest stable version.
|
||||
|
||||
See their documentation on how to install the requirements. Though, SDK Hooks is
|
||||
easily installed by just extracting the contents into the "cstrike" folder on
|
||||
the dedicated server and all files should go in the correct folders.
|
||||
|
||||
Note: Verify that both Metamod:Source and SourceMod is running before
|
||||
continuing. Type these commands in the server console: "meta version" and
|
||||
"sm version". If both give version information it's working. If not, go
|
||||
through their installation instructions again and verify that everything
|
||||
is in the correct place.
|
||||
|
||||
When the requirements are installed the Zombie:Reloaded release package can be
|
||||
extracted into the "cstrike" folder and all files should go in the correct
|
||||
place.
|
||||
|
||||
Start the dedicated server and verify that Zombie:Reloaded is running by typing
|
||||
this command in the server console: "zr_version".
|
||||
|
||||
Check the SourceMod error logs if it's not working. Zombie:Reloaded will
|
||||
validate and log errors if something is wrong. Look for messages from
|
||||
zombiereloaded.smx.
|
||||
|
||||
See the manual in docs/zr_manual.htm for details about configuration settings.
|
||||
It's recommended to look through it to get to know details about the features
|
||||
and how to configure them. Make sure you check it before reporting problems.
|
||||
|
||||
|
||||
SOURCE CODE
|
||||
-------------
|
||||
|
||||
The source code is bundled in every release and patch. It's located in
|
||||
addons/sourcemod/scripting/ and prepared to compile once the SDK Hooks include
|
||||
file is installed.
|
||||
|
||||
Source code repositories with build scripts are available on our side at Google
|
||||
Code:
|
||||
|
||||
* http://code.google.com/p/zombiereloaded/wiki/Source?tm=4
|
||||
|
||||
The repositories are bundled with all requirements except Mercurial itself and
|
||||
should compile out of box.
|
||||
|
||||
Snapshot builds will be available at:
|
||||
|
||||
* http://code.google.com/p/zombiereloaded/downloads/list
|
||||
* http://www.helgeby.net/zrdev/release/auto/zr-3.1
|
||||
|
||||
Note that helgeby.net has limited bandwith and if we want a few people to try a
|
||||
certain snapshot we'll upload it on our site at Google Code for faster
|
||||
downloads.
|
||||
|
||||
Also note that we don't support snapshot builds. Only official releases and
|
||||
patches are supported.
|
||||
|
||||
|
||||
ADDON PLUGINS
|
||||
---------------
|
||||
|
||||
A few people from the Allied Modders community have developed some addon plugins
|
||||
as a supplement to Zombie:Reloaded. A list of them are available here:
|
||||
|
||||
* http://forums.alliedmods.net/showthread.php?t=159596
|
||||
|
||||
|
||||
LIST OF CHANGES
|
||||
-----------------
|
||||
|
||||
These are the changes since the beta 2 release:
|
||||
|
||||
* Many bug fixes and minor changes (50+).
|
||||
* Added a cvar to allow zombies to pick up weapons at the end of the round.
|
||||
* Added scream and moan commands for zombies, with spam protection.
|
||||
* Added cvar to enable suicide intercept before the first zombie.
|
||||
* Added cvar for minimum dx level on overlays.
|
||||
* Added validation error messages for individual attributes when loading
|
||||
classes. Easier than reading bits from a number.
|
||||
* Added external plugin API for ZR with basic infection, respawn and class
|
||||
tools.
|
||||
* Added improved random number generator from SMLIB. (Better random zombie
|
||||
selection, etc.)
|
||||
* Added infection countdown.
|
||||
* Added cvar for disabling team balancing on round end (when using a custom
|
||||
team balancing plugin).
|
||||
* Added knock back boost workaround for CS: GO.
|
||||
* Added immunity modes.
|
||||
* Added infection modes.
|
||||
* Changed class limit to 64 classes.
|
||||
* Changed Zombie:Reloaded to use the SDK Hooks extension instead of our old ZR
|
||||
Tools extension.
|
||||
===============================================================================
|
||||
|
||||
Zombie:Reloaded Release Notes
|
||||
Version 3.1.0
|
||||
|
||||
Written by Richard Helgeby
|
||||
|
||||
===============================================================================
|
||||
|
||||
Release Notes
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Zombie:Reloaded is now mature enough to be called stable and we bump the version
|
||||
to 3.1. The patches since the beta 2 release have fixed several issues and
|
||||
improved a few things.
|
||||
|
||||
There's no official CS: GO support yet, as it's not our primary focus.
|
||||
|
||||
|
||||
Richard Helgeby &
|
||||
Greyscale
|
||||
|
||||
2013.01.12
|
||||
|
||||
|
||||
MAJOR NEWS IN THIS RELEASE
|
||||
----------------------------
|
||||
|
||||
IMMUNITY MODES
|
||||
|
||||
Immunity modes is an old idea that has been around since ZR 3.0 beta 1. It was
|
||||
never given priority, until now.
|
||||
|
||||
These modes change the way attacks are received either as zombie or human. It's
|
||||
now possible to do the following:
|
||||
|
||||
* Slow infection. Zombies can hurt humans so they'll loose HP. Either humans
|
||||
are stabbed to death, or they can be infected if go below a HP threshold. If
|
||||
some maps have medkits (or implement them) humans will get multiple chances
|
||||
of getting away from zombies.
|
||||
|
||||
* Delayed infection. Instead of instantly turning a zombie, the infection is
|
||||
delayed a few seconds (customizable). It's also possible to enable that
|
||||
subsequent zombie attacks will reduce the delay by a certain amount of
|
||||
seconds and speedup the infection. A possible feature that can be
|
||||
implemented later is a cure for infection so that humans can cure themself
|
||||
before the time is up.
|
||||
|
||||
* Instant kill. Zombies will instantly kill humans when attacking instead of
|
||||
infecting.
|
||||
|
||||
* Block damage. Zombies can't take damage from humans, but are still
|
||||
vulnerable to knock back. With this mode, humans can only win by surviving
|
||||
the entire round.
|
||||
|
||||
* Deploy a shield. This is a temporary immunity mode similar to TF2's
|
||||
übercharge and activated by the "zshield" command (in chat or console).
|
||||
Humans will be immune to infection and zombies will not receive knock back
|
||||
(they still receive damage). The shield only last for a few seconds and need
|
||||
a cooldown before it can be used again. Both values can be customized.
|
||||
Currently there are no visual effects when the shield is deployed, but this
|
||||
makes it possible for humans to use themself as a decoy.
|
||||
|
||||
* Be completely immune. Humans can't be infected and zombies don't receive
|
||||
damage or knock back. There's no use for this mode itself and it will break
|
||||
the game, but it's there if someone want to be creative with addon plugins.
|
||||
It's practically the same as a permanent spawn protection, only that it
|
||||
works on zombie classes too.
|
||||
|
||||
It's of course possible to make various classes with different modes, so you're
|
||||
not bound to use only one of them.
|
||||
|
||||
These modes can drastically improve the gameplay and make it more fun to play.
|
||||
|
||||
|
||||
INFECTION MODES
|
||||
|
||||
It's now possible to get better control of how many humans that are infected
|
||||
when the round has started. It has three modes:
|
||||
|
||||
* Dynamic (default). This is the old one that scales number of zombies
|
||||
according to a ratio and number of players on the server.
|
||||
|
||||
* Absolute. Infect an absolute number of humans. This mode also has an option
|
||||
to invert the infection so that everyone but a small group of humans are
|
||||
infected (like a survivor game mode).
|
||||
|
||||
* Range. Infects a random number of players between a minimum and maximum
|
||||
range.
|
||||
|
||||
|
||||
GAME MODE CONFIGS
|
||||
|
||||
With the introduction of immunity modes and infection modes it's possible to
|
||||
make a few game modes. These are not real game modes, but various configurations
|
||||
of Zombie:Reloaded.
|
||||
|
||||
A few example configs are provided (based on the Zombie Plague plugin):
|
||||
|
||||
* Nemesis. Only one zombie is spawned, but it's very powerful and do instant
|
||||
kills (64K HP, speed, jump boost, and very low knock back). Humans must
|
||||
survive the round or kill it. Teamwork is essential in this mode.
|
||||
|
||||
* Survivor. Everyone is infected but a small group of humans.
|
||||
|
||||
* Swarm. 50% is infected. Humans fight to the death - humans are stabbed to
|
||||
death instead of infected. This requires a post map config to modify the
|
||||
immunity mode on all humans.
|
||||
|
||||
When the map is changed or reloaded the default configuration is restored. You
|
||||
need to use map configs to enable these modes. It might work to enable some of
|
||||
them after the map is loaded, but some modes require the class config to be
|
||||
reloaded and reapplied on all players (zr_config_reload and zr_class_reload
|
||||
commands).
|
||||
|
||||
|
||||
INSTALLATION
|
||||
--------------
|
||||
|
||||
Install the following requirements:
|
||||
|
||||
* Metamod:Source 1.8.6+
|
||||
http://sourcemm.net/
|
||||
|
||||
* SourceMod 1.4.0+
|
||||
http://sourcemod.net/
|
||||
|
||||
* SDK Hooks extension 2.0+
|
||||
http://forums.alliedmods.net/showthread.php?t=106748
|
||||
|
||||
The version numbers listed above are minimum requirements. You should always get
|
||||
the latest stable version.
|
||||
|
||||
See their documentation on how to install the requirements. Though, SDK Hooks is
|
||||
easily installed by just extracting the contents into the "cstrike" folder on
|
||||
the dedicated server and all files should go in the correct folders.
|
||||
|
||||
Note: Verify that both Metamod:Source and SourceMod is running before
|
||||
continuing. Type these commands in the server console: "meta version" and
|
||||
"sm version". If both give version information it's working. If not, go
|
||||
through their installation instructions again and verify that everything
|
||||
is in the correct place.
|
||||
|
||||
When the requirements are installed the Zombie:Reloaded release package can be
|
||||
extracted into the "cstrike" folder and all files should go in the correct
|
||||
place.
|
||||
|
||||
Start the dedicated server and verify that Zombie:Reloaded is running by typing
|
||||
this command in the server console: "zr_version".
|
||||
|
||||
Check the SourceMod error logs if it's not working. Zombie:Reloaded will
|
||||
validate and log errors if something is wrong. Look for messages from
|
||||
zombiereloaded.smx.
|
||||
|
||||
See the manual in docs/zr_manual.htm for details about configuration settings.
|
||||
It's recommended to look through it to get to know details about the features
|
||||
and how to configure them. Make sure you check it before reporting problems.
|
||||
|
||||
|
||||
SOURCE CODE
|
||||
-------------
|
||||
|
||||
The source code is bundled in every release and patch. It's located in
|
||||
addons/sourcemod/scripting/ and prepared to compile once the SDK Hooks include
|
||||
file is installed.
|
||||
|
||||
Source code repositories with build scripts are available on our side at Google
|
||||
Code:
|
||||
|
||||
* http://code.google.com/p/zombiereloaded/wiki/Source?tm=4
|
||||
|
||||
The repositories are bundled with all requirements except Mercurial itself and
|
||||
should compile out of box.
|
||||
|
||||
Snapshot builds will be available at:
|
||||
|
||||
* http://code.google.com/p/zombiereloaded/downloads/list
|
||||
* http://www.helgeby.net/zrdev/release/auto/zr-3.1
|
||||
|
||||
Note that helgeby.net has limited bandwith and if we want a few people to try a
|
||||
certain snapshot we'll upload it on our site at Google Code for faster
|
||||
downloads.
|
||||
|
||||
Also note that we don't support snapshot builds. Only official releases and
|
||||
patches are supported.
|
||||
|
||||
|
||||
ADDON PLUGINS
|
||||
---------------
|
||||
|
||||
A few people from the Allied Modders community have developed some addon plugins
|
||||
as a supplement to Zombie:Reloaded. A list of them are available here:
|
||||
|
||||
* http://forums.alliedmods.net/showthread.php?t=159596
|
||||
|
||||
|
||||
LIST OF CHANGES
|
||||
-----------------
|
||||
|
||||
These are the changes since the beta 2 release:
|
||||
|
||||
* Many bug fixes and minor changes (50+).
|
||||
* Added a cvar to allow zombies to pick up weapons at the end of the round.
|
||||
* Added scream and moan commands for zombies, with spam protection.
|
||||
* Added cvar to enable suicide intercept before the first zombie.
|
||||
* Added cvar for minimum dx level on overlays.
|
||||
* Added validation error messages for individual attributes when loading
|
||||
classes. Easier than reading bits from a number.
|
||||
* Added external plugin API for ZR with basic infection, respawn and class
|
||||
tools.
|
||||
* Added improved random number generator from SMLIB. (Better random zombie
|
||||
selection, etc.)
|
||||
* Added infection countdown.
|
||||
* Added cvar for disabling team balancing on round end (when using a custom
|
||||
team balancing plugin).
|
||||
* Added knock back boost workaround for CS: GO.
|
||||
* Added immunity modes.
|
||||
* Added infection modes.
|
||||
* Changed class limit to 64 classes.
|
||||
* Changed Zombie:Reloaded to use the SDK Hooks extension instead of our old ZR
|
||||
Tools extension.
|
||||
|
BIN
env/darwin/bin/spcomp-1.6.0
vendored
Executable file
BIN
env/darwin/bin/spcomp-1.6.0
vendored
Executable file
Binary file not shown.
18
env/include/admin.inc
vendored
18
env/include/admin.inc
vendored
@ -138,7 +138,7 @@ enum ImmunityType
|
||||
*/
|
||||
enum GroupId
|
||||
{
|
||||
INVALID_GROUP_ID = -1, /**< An invalid/nonexistant group */
|
||||
INVALID_GROUP_ID = -1, /**< An invalid/non-existent group */
|
||||
};
|
||||
|
||||
/**
|
||||
@ -146,7 +146,7 @@ enum GroupId
|
||||
*/
|
||||
enum AdminId
|
||||
{
|
||||
INVALID_ADMIN_ID = -1, /**< An invalid/nonexistant admin */
|
||||
INVALID_ADMIN_ID = -1, /**< An invalid/non-existent admin */
|
||||
};
|
||||
|
||||
/**
|
||||
@ -169,7 +169,7 @@ enum AdminCachePart
|
||||
};
|
||||
|
||||
/**
|
||||
* Called when part of the cache which needs to be rebuilt.
|
||||
* Called when part of the cache needs to be rebuilt.
|
||||
*
|
||||
* @param part Part of the admin cache to rebuild.
|
||||
*/
|
||||
@ -324,7 +324,7 @@ native bool:GetAdmGroupCmdOverride(GroupId:id, const String:name[], OverrideType
|
||||
* Registers an authentication identity type. You normally never need to call this except for
|
||||
* very specific systems.
|
||||
*
|
||||
* @param codename Codename to use for your authentication type.
|
||||
* @param name Codename to use for your authentication type.
|
||||
* @noreturn
|
||||
*/
|
||||
native RegisterAuthIdentType(const String:name[]);
|
||||
@ -347,7 +347,7 @@ native AdminId:CreateAdmin(const String:name[]="");
|
||||
* @param maxlength Maximum size of string buffer.
|
||||
* @return Number of bytes written.
|
||||
*/
|
||||
native GetAdminUsername(AdminId:id, const String:name[], maxlength);
|
||||
native GetAdminUsername(AdminId:id, String:name[], maxlength);
|
||||
|
||||
/**
|
||||
* Binds an admin to an identity for fast lookup later on. The bind must be unique.
|
||||
@ -425,7 +425,7 @@ native GroupId:GetAdminGroup(AdminId:id, index, const String:name[], maxlength);
|
||||
* Sets a password on an admin.
|
||||
*
|
||||
* @param id AdminId index of the admin.
|
||||
* @param passwd String containing the password.
|
||||
* @param password String containing the password.
|
||||
* @noreturn
|
||||
*/
|
||||
native SetAdminPassword(AdminId:id, const String:password[]);
|
||||
@ -434,12 +434,12 @@ native SetAdminPassword(AdminId:id, const String:password[]);
|
||||
* Gets an admin's password.
|
||||
*
|
||||
* @param id AdminId index of the admin.
|
||||
* @param name Optional buffer to store the admin's password.
|
||||
* @param buffer Optional buffer to store the admin's password.
|
||||
* @param maxlength Maximum size of the output name buffer.
|
||||
* Note: This will safely chop UTF-8 strings.
|
||||
* @return True if there was a password set, false otherwise.
|
||||
*/
|
||||
native bool:GetAdminPassword(AdminId:id, const String:buffer[]="", maxlength=0);
|
||||
native bool:GetAdminPassword(AdminId:id, String:buffer[]="", maxlength=0);
|
||||
|
||||
/**
|
||||
* Attempts to find an admin by an auth method and an identity.
|
||||
@ -537,7 +537,7 @@ native ReadFlagString(const String:flags[], &numchars=0);
|
||||
/**
|
||||
* Tests whether one admin can target another.
|
||||
*
|
||||
* The hueristics for this check are as follows:
|
||||
* The heuristics for this check are as follows:
|
||||
* 0. If the targeting AdminId is INVALID_ADMIN_ID, targeting fails.
|
||||
* 1. If the targeted AdminId is INVALID_ADMIN_ID, targeting succeeds.
|
||||
* 2. If the targeted AdminId is the same as the targeting AdminId,
|
||||
|
4
env/include/adt_array.inc
vendored
4
env/include/adt_array.inc
vendored
@ -210,14 +210,14 @@ native SetArrayCell(Handle:array, index, any:value, block=0, bool:asChar=false);
|
||||
* @return Number of characters copied.
|
||||
* @error Invalid Handle or invalid index.
|
||||
*/
|
||||
native SetArrayString(Handle:array, index, const String:buffer[]);
|
||||
native SetArrayString(Handle:array, index, const String:value[]);
|
||||
|
||||
/**
|
||||
* Sets an array of cells in an array.
|
||||
*
|
||||
* @param array Array Handle.
|
||||
* @param index Index in the array.
|
||||
* @param buffer Array to copy.
|
||||
* @param values Array to copy.
|
||||
* @param size If not set, assumes the buffer size is equal to the
|
||||
* blocksize. Otherwise, the size passed is used.
|
||||
* @return Number of cells copied.
|
||||
|
79
env/include/adt_trie.inc
vendored
79
env/include/adt_trie.inc
vendored
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* vim: set ts=4 :
|
||||
* vim: set ts=4 sw=4 tw=99 noet :
|
||||
* =============================================================================
|
||||
* SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
@ -36,35 +36,37 @@
|
||||
#define _adt_trie_included
|
||||
|
||||
/**
|
||||
* Creates a Trie structure. A trie is a data storage object that maps any value to a
|
||||
* string of text. It features very fast lookup and deletion, but grows very slow for
|
||||
* insertion once tens of thousands of items are added.
|
||||
* Creates a hash map. A hash map is a container that can map strings (called
|
||||
* "keys") to arbitrary values (cells, arrays, or strings). Keys in a hash map
|
||||
* are unique. That is, there is at most one entry in the map for a given key.
|
||||
*
|
||||
* Keys in Tries are unique. That is, each key may only have one value. Unlike arrays,
|
||||
* Tries cannot be iterated right now. Since the contents are known to be unique, to
|
||||
* work around this, you can use ADT Arrays to store a list of keys known to be in a
|
||||
* Trie.
|
||||
* Insertion, deletion, and lookup in a hash map are all considered to be fast
|
||||
* operations, amortized to O(1), or constant time.
|
||||
*
|
||||
* @return New Trie Handle, which must be freed via CloseHandle().
|
||||
* The word "Trie" in this API is historical. As of SourceMod 1.6, tries have
|
||||
* been internally replaced with hash tables, which have O(1) insertion time
|
||||
* instead of O(n).
|
||||
*
|
||||
* @return New Map Handle, which must be freed via CloseHandle().
|
||||
*/
|
||||
native Handle:CreateTrie();
|
||||
|
||||
/**
|
||||
* Sets a value in a Trie, either inserting a new entry or replacing an old one.
|
||||
* Sets a value in a hash map, either inserting a new entry or replacing an old one.
|
||||
*
|
||||
* @param trie Trie Handle.
|
||||
* @param map Map Handle.
|
||||
* @param key Key string.
|
||||
* @param value Value to store at this key.
|
||||
* @param replace If false, operation will fail if the key is already set.
|
||||
* @return True on success, false on failure.
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
native bool:SetTrieValue(Handle:trie, const String:key[], any:value, bool:replace=true);
|
||||
native bool:SetTrieValue(Handle:map, const String:key[], any:value, bool:replace=true);
|
||||
|
||||
/**
|
||||
* Sets an array value in a Trie, either inserting a new entry or replacing an old one.
|
||||
* Sets an array value in a Map, either inserting a new entry or replacing an old one.
|
||||
*
|
||||
* @param trie Trie Handle.
|
||||
* @param map Map Handle.
|
||||
* @param key Key string.
|
||||
* @param array Array to store.
|
||||
* @param num_items Number of items in the array.
|
||||
@ -72,36 +74,36 @@ native bool:SetTrieValue(Handle:trie, const String:key[], any:value, bool:replac
|
||||
* @return True on success, false on failure.
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
native bool:SetTrieArray(Handle:trie, const String:key[], const any:array[], num_items, bool:replace=true);
|
||||
native bool:SetTrieArray(Handle:map, const String:key[], const any:array[], num_items, bool:replace=true);
|
||||
|
||||
/**
|
||||
* Sets a string value in a Trie, either inserting a new entry or replacing an old one.
|
||||
* Sets a string value in a Map, either inserting a new entry or replacing an old one.
|
||||
*
|
||||
* @param trie Trie Handle.
|
||||
* @param map Map Handle.
|
||||
* @param key Key string.
|
||||
* @param value String to store.
|
||||
* @param replace If false, operation will fail if the key is already set.
|
||||
* @return True on success, false on failure.
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
native bool:SetTrieString(Handle:trie, const String:key[], const String:value[], bool:replace=true);
|
||||
native bool:SetTrieString(Handle:map, const String:key[], const String:value[], bool:replace=true);
|
||||
|
||||
/**
|
||||
* Retrieves a value in a Trie.
|
||||
* Retrieves a value in a Map.
|
||||
*
|
||||
* @param trie Trie Handle.
|
||||
* @param map Map Handle.
|
||||
* @param key Key string.
|
||||
* @param val Variable to store value.
|
||||
* @param value Variable to store value.
|
||||
* @return True on success. False if the key is not set, or the key is set
|
||||
* as an array or string (not a value).
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
native bool:GetTrieValue(Handle:trie, const String:key[], &any:value);
|
||||
native bool:GetTrieValue(Handle:map, const String:key[], &any:value);
|
||||
|
||||
/**
|
||||
* Retrieves an array in a Trie.
|
||||
* Retrieves an array in a Map.
|
||||
*
|
||||
* @param trie Trie Handle.
|
||||
* @param map Map Handle.
|
||||
* @param key Key string.
|
||||
* @param array Buffer to store array.
|
||||
* @param max_size Maximum size of array buffer.
|
||||
@ -110,12 +112,12 @@ native bool:GetTrieValue(Handle:trie, const String:key[], &any:value);
|
||||
* as a value or string (not an array).
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
native bool:GetTrieArray(Handle:trie, const String:key[], any:array[], max_size, &size=0);
|
||||
native bool:GetTrieArray(Handle:map, const String:key[], any:array[], max_size, &size=0);
|
||||
|
||||
/**
|
||||
* Retrieves a string in a Trie.
|
||||
* Retrieves a string in a Map.
|
||||
*
|
||||
* @param trie Trie Handle.
|
||||
* @param map Map Handle.
|
||||
* @param key Key string.
|
||||
* @param value Buffer to store value.
|
||||
* @param max_size Maximum size of string buffer.
|
||||
@ -124,34 +126,31 @@ native bool:GetTrieArray(Handle:trie, const String:key[], any:array[], max_size,
|
||||
* as a value or array (not a string).
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
native bool:GetTrieString(Handle:trie, const String:key[], String:value[], max_size, &size=0);
|
||||
native bool:GetTrieString(Handle:map, const String:key[], String:value[], max_size, &size=0);
|
||||
|
||||
/**
|
||||
* Removes a key entry from a Trie.
|
||||
* Removes a key entry from a Map.
|
||||
*
|
||||
* @param trie Trie Handle.
|
||||
* @param map Map Handle.
|
||||
* @param key Key string.
|
||||
* @return True on success, false if the value was never set.
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
native RemoveFromTrie(Handle:trie, const String:key[]);
|
||||
native RemoveFromTrie(Handle:map, const String:key[]);
|
||||
|
||||
/**
|
||||
* Clears all entries from a Trie.
|
||||
* Clears all entries from a Map.
|
||||
*
|
||||
* @param trie Trie Handle.
|
||||
* @param map Map Handle.
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
native ClearTrie(Handle:trie);
|
||||
native ClearTrie(Handle:map);
|
||||
|
||||
/**
|
||||
* Retrieves the number of elements in a trie.
|
||||
* Retrieves the number of elements in a map.
|
||||
*
|
||||
* Note that trie items are not enumerable/iteratable. If you need to
|
||||
* retrieve the elements in a trie, store its keys in an ADT Array.
|
||||
*
|
||||
* @param trie Trie Handle.
|
||||
* @param map Map Handle.
|
||||
* @return Number of elements in the trie.
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
native GetTrieSize(Handle:trie);
|
||||
native GetTrieSize(Handle:map);
|
||||
|
16
env/include/basecomm.inc
vendored
16
env/include/basecomm.inc
vendored
@ -35,6 +35,22 @@
|
||||
#endif
|
||||
#define _basecomm_included
|
||||
|
||||
/**
|
||||
* Called when a client is muted or unmuted
|
||||
*
|
||||
* @param client Client index
|
||||
* @param muteState True if client was muted, false otherwise
|
||||
*/
|
||||
forward BaseComm_OnClientMute(client, bool:muteState);
|
||||
|
||||
/**
|
||||
* Called when a client is gagged or ungagged
|
||||
*
|
||||
* @param client Client index
|
||||
* @param gagState True if client was gaged, false otherwise
|
||||
*/
|
||||
forward BaseComm_OnClientGag(client, bool:gagState);
|
||||
|
||||
/**
|
||||
* Returns whether or not a client is gagged
|
||||
*
|
||||
|
5
env/include/clientprefs.inc
vendored
5
env/include/clientprefs.inc
vendored
@ -162,8 +162,8 @@ forward OnClientCookiesCached(client);
|
||||
* Cookie Menu Callback prototype
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param action CookeMenuAction being performed.
|
||||
* @param data Info data passed.
|
||||
* @param action CookieMenuAction being performed.
|
||||
* @param info Info data passed.
|
||||
* @param buffer Outbut buffer.
|
||||
* @param maxlen Max length of the output buffer.
|
||||
*/
|
||||
@ -221,7 +221,6 @@ native Handle:GetCookieIterator();
|
||||
* @param access Access level of the cookie.
|
||||
* @param desc Cookie description buffer.
|
||||
* @param descLen Cookie description buffer size.
|
||||
* @param
|
||||
* @return True on success, false if there are no more commands.
|
||||
*/
|
||||
native bool:ReadCookieIterator(Handle:iter,
|
||||
|
54
env/include/clients.inc
vendored
54
env/include/clients.inc
vendored
@ -209,6 +209,21 @@ forward OnClientPostAdminCheck(client);
|
||||
*/
|
||||
native GetMaxClients();
|
||||
|
||||
/**
|
||||
* Returns the maximum number of human players allowed on the server. This is
|
||||
* a game-specific function used on newer games to limit the number of humans
|
||||
* that can join a game and can be lower than MaxClients. It is the number often
|
||||
* reflected in the server browser or when viewing the output of the status command.
|
||||
* On unsupported games or modes without overrides, it will return the same value
|
||||
* as MaxClients.
|
||||
*
|
||||
* You should not globally cache the value to GetMaxHumanPlayers() because it can change across
|
||||
* game modes. You may still cache it locally.
|
||||
*
|
||||
* @return Maximum number of humans allowed.
|
||||
*/
|
||||
native GetMaxHumanPlayers();
|
||||
|
||||
/**
|
||||
* Returns the client count put in the server.
|
||||
*
|
||||
@ -232,7 +247,7 @@ native bool:GetClientName(client, String:name[], maxlen);
|
||||
* Retrieves a client's IP address.
|
||||
*
|
||||
* @param client Player index.
|
||||
* @param name Buffer to store the client's ip address.
|
||||
* @param ip Buffer to store the client's ip address.
|
||||
* @param maxlen Maximum length of string buffer (includes NULL terminator).
|
||||
* @param remport Remove client's port from the ip string (true by default).
|
||||
* @return True on success, false otherwise.
|
||||
@ -246,10 +261,25 @@ native bool:GetClientIP(client, String:ip[], maxlen, bool:remport=true);
|
||||
* @param client Player index.
|
||||
* @param auth Buffer to store the client's auth string.
|
||||
* @param maxlen Maximum length of string buffer (includes NULL terminator).
|
||||
* @param validate Check backend validation status.
|
||||
* DO NOT PASS FALSE UNLESS YOU UNDERSTAND THE CONSEQUENCES,
|
||||
* You WILL KNOW if you need to use this, MOST WILL NOT.
|
||||
* @return True on success, false otherwise.
|
||||
* @error If the client is not connected or the index is invalid.
|
||||
*/
|
||||
native bool:GetClientAuthString(client, String:auth[], maxlen);
|
||||
native bool:GetClientAuthString(client, String:auth[], maxlen, bool:validate=true);
|
||||
|
||||
/**
|
||||
* Returns the client's Steam account ID.
|
||||
*
|
||||
* @param client Client Index.
|
||||
* @param validate Check backend validation status.
|
||||
* DO NOT PASS FALSE UNLESS YOU UNDERSTAND THE CONSEQUENCES,
|
||||
* You WILL KNOW if you need to use this, MOST WILL NOT.
|
||||
* @return Steam account ID or 0 if not available.
|
||||
* @error If the client is not connected or the index is invalid.
|
||||
*/
|
||||
native GetSteamAccountID(client, bool:validate=true);
|
||||
|
||||
/**
|
||||
* Retrieves a client's user id, which is an index incremented for every client
|
||||
@ -590,7 +620,7 @@ native GetClientFrags(client);
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @return Data rate.
|
||||
* @error Invalid client index, client not in game, or fake client.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native GetClientDataRate(client);
|
||||
|
||||
@ -599,7 +629,7 @@ native GetClientDataRate(client);
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @return True if client is timing out, false otherwise.
|
||||
* @error Invalid client index, client not in game, or fake client.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native bool:IsClientTimingOut(client);
|
||||
|
||||
@ -608,7 +638,7 @@ native bool:IsClientTimingOut(client);
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @return Connection time.
|
||||
* @error Invalid client index, client not in game, or fake client.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientTime(client);
|
||||
|
||||
@ -618,7 +648,7 @@ native Float:GetClientTime(client);
|
||||
* @param client Player's index.
|
||||
* @param flow Traffic flowing direction.
|
||||
* @return Latency, or -1 if network info is not available.
|
||||
* @error Invalid client index, client not in game, or fake client.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientLatency(client, NetFlow:flow);
|
||||
|
||||
@ -628,7 +658,7 @@ native Float:GetClientLatency(client, NetFlow:flow);
|
||||
* @param client Player's index.
|
||||
* @param flow Traffic flowing direction.
|
||||
* @return Latency, or -1 if network info is not available.
|
||||
* @error Invalid client index, client not in game, or fake client.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientAvgLatency(client, NetFlow:flow);
|
||||
|
||||
@ -638,7 +668,7 @@ native Float:GetClientAvgLatency(client, NetFlow:flow);
|
||||
* @param client Player's index.
|
||||
* @param flow Traffic flowing direction.
|
||||
* @return Average packet loss, or -1 if network info is not available.
|
||||
* @error Invalid client index, client not in game, or fake client.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientAvgLoss(client, NetFlow:flow);
|
||||
|
||||
@ -648,7 +678,7 @@ native Float:GetClientAvgLoss(client, NetFlow:flow);
|
||||
* @param client Player's index.
|
||||
* @param flow Traffic flowing direction.
|
||||
* @return Average packet loss, or -1 if network info is not available.
|
||||
* @error Invalid client index, client not in game, or fake client.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientAvgChoke(client, NetFlow:flow);
|
||||
|
||||
@ -658,7 +688,7 @@ native Float:GetClientAvgChoke(client, NetFlow:flow);
|
||||
* @param client Player's index.
|
||||
* @param flow Traffic flowing direction.
|
||||
* @return Data flow.
|
||||
* @error Invalid client index, client not in game, or fake client.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientAvgData(client, NetFlow:flow);
|
||||
|
||||
@ -668,7 +698,7 @@ native Float:GetClientAvgData(client, NetFlow:flow);
|
||||
* @param client Player's index.
|
||||
* @param flow Traffic flowing direction.
|
||||
* @return Packet frequency.
|
||||
* @error Invalid client index, client not in game, or fake client.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientAvgPackets(client, NetFlow:flow);
|
||||
|
||||
@ -733,6 +763,7 @@ native ChangeClientTeam(client, team);
|
||||
/**
|
||||
* Returns the clients unique serial identifier.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @return Serial number.
|
||||
*/
|
||||
native GetClientSerial(client);
|
||||
@ -740,6 +771,7 @@ native GetClientSerial(client);
|
||||
/**
|
||||
* Returns the client index by its serial number.
|
||||
*
|
||||
* @param serial Serial number.
|
||||
* @return Client index, or 0 for invalid serial.
|
||||
*/
|
||||
native GetClientFromSerial(serial);
|
||||
|
39
env/include/console.inc
vendored
39
env/include/console.inc
vendored
@ -160,7 +160,7 @@ native ServerExecute();
|
||||
*
|
||||
* @param client Index of the client.
|
||||
* @param fmt Format of the client command.
|
||||
* @param ... Format parameters/
|
||||
* @param ... Format parameters
|
||||
* @noreturn
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
@ -324,7 +324,7 @@ native FormatActivitySource(client, target, const String:namebuf[], maxlength);
|
||||
/**
|
||||
* Called when a server-only command is invoked.
|
||||
*
|
||||
* @params args Number of arguments that were in the argument string.
|
||||
* @param args Number of arguments that were in the argument string.
|
||||
* @return An Action value. Not handling the command
|
||||
* means that Source will report it as "not found."
|
||||
*/
|
||||
@ -358,7 +358,7 @@ functag public Action:ConCmd(client, args);
|
||||
* Creates a console command, or hooks an already existing one.
|
||||
*
|
||||
* Console commands are case sensitive. However, if the command already exists in the game,
|
||||
* the a client may enter the command in any case. SourceMod corrects for this automatically,
|
||||
* a client may enter the command in any case. SourceMod corrects for this automatically,
|
||||
* and you should only hook the "real" version of the command.
|
||||
*
|
||||
* @param cmd Name of the command to hook or create.
|
||||
@ -703,7 +703,7 @@ funcenum ConVarQueryFinished
|
||||
* Starts a query to retrieve the value of a client's console variable.
|
||||
*
|
||||
* @param client Player index.
|
||||
* @param name Name of client convar to query.
|
||||
* @param cvarName Name of client convar to query.
|
||||
* @param callback A function to use as a callback when the query has finished.
|
||||
* @param value Optional value to pass to the callback function.
|
||||
* @return A cookie that uniquely identifies the query.
|
||||
@ -938,3 +938,34 @@ native bool:AddCommandListener(CommandListener:callback, const String:command[]=
|
||||
*/
|
||||
native RemoveCommandListener(CommandListener:callback, const String:command[]="");
|
||||
|
||||
/**
|
||||
* Returns true if the supplied command exists.
|
||||
*
|
||||
* @param command Command to find.
|
||||
* @return True if command is found, false otherwise.
|
||||
*/
|
||||
stock bool:CommandExists(const String:command[])
|
||||
{
|
||||
return (GetCommandFlags(command) != INVALID_FCVAR_FLAGS);
|
||||
}
|
||||
/**
|
||||
* Global listener for the chat commands.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param command Command name.
|
||||
* @param sArgs Chat argument string.
|
||||
*
|
||||
* @return An Action value. Returning Plugin_Handled bypasses the game function call.
|
||||
Returning Plugin_Stop bypasses the post hook as well as the game function.
|
||||
*/
|
||||
forward Action:OnClientSayCommand(client, const String:command[], const String:sArgs[]);
|
||||
|
||||
/**
|
||||
* Global post listener for the chat commands.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param command Command name.
|
||||
* @param sArgs Chat argument string.
|
||||
*
|
||||
*/
|
||||
forward OnClientSayCommand_Post(client, const String:command[], const String:sArgs[]);
|
||||
|
61
env/include/core.inc
vendored
61
env/include/core.inc
vendored
@ -167,6 +167,67 @@ public __ext_core_SetNTVOptional()
|
||||
MarkNativeAsOptional("RequireFeature");
|
||||
MarkNativeAsOptional("AddCommandListener");
|
||||
MarkNativeAsOptional("RemoveCommandListener");
|
||||
|
||||
MarkNativeAsOptional("BfWriteBool");
|
||||
MarkNativeAsOptional("BfWriteByte");
|
||||
MarkNativeAsOptional("BfWriteChar");
|
||||
MarkNativeAsOptional("BfWriteShort");
|
||||
MarkNativeAsOptional("BfWriteWord");
|
||||
MarkNativeAsOptional("BfWriteNum");
|
||||
MarkNativeAsOptional("BfWriteFloat");
|
||||
MarkNativeAsOptional("BfWriteString");
|
||||
MarkNativeAsOptional("BfWriteEntity");
|
||||
MarkNativeAsOptional("BfWriteAngle");
|
||||
MarkNativeAsOptional("BfWriteCoord");
|
||||
MarkNativeAsOptional("BfWriteVecCoord");
|
||||
MarkNativeAsOptional("BfWriteVecNormal");
|
||||
MarkNativeAsOptional("BfWriteAngles");
|
||||
MarkNativeAsOptional("BfReadBool");
|
||||
MarkNativeAsOptional("BfReadByte");
|
||||
MarkNativeAsOptional("BfReadChar");
|
||||
MarkNativeAsOptional("BfReadShort");
|
||||
MarkNativeAsOptional("BfReadWord");
|
||||
MarkNativeAsOptional("BfReadNum");
|
||||
MarkNativeAsOptional("BfReadFloat");
|
||||
MarkNativeAsOptional("BfReadString");
|
||||
MarkNativeAsOptional("BfReadEntity");
|
||||
MarkNativeAsOptional("BfReadAngle");
|
||||
MarkNativeAsOptional("BfReadCoord");
|
||||
MarkNativeAsOptional("BfReadVecCoord");
|
||||
MarkNativeAsOptional("BfReadVecNormal");
|
||||
MarkNativeAsOptional("BfReadAngles");
|
||||
MarkNativeAsOptional("BfGetNumBytesLeft");
|
||||
|
||||
MarkNativeAsOptional("PbReadInt");
|
||||
MarkNativeAsOptional("PbReadFloat");
|
||||
MarkNativeAsOptional("PbReadBool");
|
||||
MarkNativeAsOptional("PbReadString");
|
||||
MarkNativeAsOptional("PbReadColor");
|
||||
MarkNativeAsOptional("PbReadAngle");
|
||||
MarkNativeAsOptional("PbReadVector");
|
||||
MarkNativeAsOptional("PbReadVector2D");
|
||||
MarkNativeAsOptional("PbGetRepeatedFieldCount");
|
||||
MarkNativeAsOptional("PbSetInt");
|
||||
MarkNativeAsOptional("PbSetFloat");
|
||||
MarkNativeAsOptional("PbSetBool");
|
||||
MarkNativeAsOptional("PbSetString");
|
||||
MarkNativeAsOptional("PbSetColor");
|
||||
MarkNativeAsOptional("PbSetAngle");
|
||||
MarkNativeAsOptional("PbSetVector");
|
||||
MarkNativeAsOptional("PbSetVector2D");
|
||||
MarkNativeAsOptional("PbAddInt");
|
||||
MarkNativeAsOptional("PbAddFloat");
|
||||
MarkNativeAsOptional("PbAddBool");
|
||||
MarkNativeAsOptional("PbAddString");
|
||||
MarkNativeAsOptional("PbAddColor");
|
||||
MarkNativeAsOptional("PbAddAngle");
|
||||
MarkNativeAsOptional("PbAddVector");
|
||||
MarkNativeAsOptional("PbAddVector2D");
|
||||
MarkNativeAsOptional("PbRemoveRepeatedFieldValue");
|
||||
MarkNativeAsOptional("PbReadMessage");
|
||||
MarkNativeAsOptional("PbReadRepeatedMessage");
|
||||
MarkNativeAsOptional("PbAddMessage");
|
||||
|
||||
VerifyCoreVersion();
|
||||
}
|
||||
|
||||
|
258
env/include/cstrike.inc
vendored
258
env/include/cstrike.inc
vendored
@ -42,66 +42,95 @@
|
||||
|
||||
#define CS_SLOT_PRIMARY 0 /**< Primary weapon slot. */
|
||||
#define CS_SLOT_SECONDARY 1 /**< Secondary weapon slot. */
|
||||
#define CS_SLOT_KNIFE 2 /**< Knife slot. */
|
||||
#define CS_SLOT_GRENADE 3 /**< Grenade slot (will only return one grenade). */
|
||||
#define CS_SLOT_C4 4 /**< C4 slot. */
|
||||
|
||||
#define CS_DMG_HEADSHOT (1 << 30) /**< Headshot */
|
||||
|
||||
enum CSRoundEndReason
|
||||
{
|
||||
CSRoundEnd_TargetBombed = 0, // Target Successfully Bombed!
|
||||
CSRoundEnd_VIPEscaped, // The VIP has escaped!
|
||||
CSRoundEnd_VIPKilled, // VIP has been assassinated!
|
||||
CSRoundEnd_TerroristsEscaped, // The terrorists have escaped!
|
||||
CSRoundEnd_CTStoppedEscape, // The CTs have prevented most of the terrorists from escaping!
|
||||
CSRoundEnd_TerroristsStopped, // Escaping terrorists have all been neutralized!
|
||||
CSRoundEnd_BombDefused, // The bomb has been defused!
|
||||
CSRoundEnd_CTWin, // Counter-Terrorists Win!
|
||||
CSRoundEnd_TerroristWin, // Terrorists Win!
|
||||
CSRoundEnd_Draw, // Round Draw!
|
||||
CSRoundEnd_HostagesRescued, // All Hostages have been rescued!
|
||||
CSRoundEnd_TargetSaved, // Target has been saved!
|
||||
CSRoundEnd_HostagesNotRescued, // Hostages have not been rescued!
|
||||
CSRoundEnd_TerroristsNotEscaped, // Terrorists have not escaped!
|
||||
CSRoundEnd_VIPNotEscaped, // VIP has not escaped!
|
||||
CSRoundEnd_GameStart // Game Commencing!
|
||||
CSRoundEnd_TargetBombed = 0, /**< Target Successfully Bombed! */
|
||||
CSRoundEnd_VIPEscaped, /**< The VIP has escaped! */
|
||||
CSRoundEnd_VIPKilled, /**< VIP has been assassinated! */
|
||||
CSRoundEnd_TerroristsEscaped, /**< The terrorists have escaped! */
|
||||
CSRoundEnd_CTStoppedEscape, /**< The CTs have prevented most of the terrorists from escaping! */
|
||||
CSRoundEnd_TerroristsStopped, /**< Escaping terrorists have all been neutralized! */
|
||||
CSRoundEnd_BombDefused, /**< The bomb has been defused! */
|
||||
CSRoundEnd_CTWin, /**< Counter-Terrorists Win! */
|
||||
CSRoundEnd_TerroristWin, /**< Terrorists Win! */
|
||||
CSRoundEnd_Draw, /**< Round Draw! */
|
||||
CSRoundEnd_HostagesRescued, /**< All Hostages have been rescued! */
|
||||
CSRoundEnd_TargetSaved, /**< Target has been saved! */
|
||||
CSRoundEnd_HostagesNotRescued, /**< Hostages have not been rescued! */
|
||||
CSRoundEnd_TerroristsNotEscaped, /**< Terrorists have not escaped! */
|
||||
CSRoundEnd_VIPNotEscaped, /**< VIP has not escaped! */
|
||||
CSRoundEnd_GameStart, /**< Game Commencing! */
|
||||
|
||||
// The below only exist on CS:GO
|
||||
CSRoundEnd_TerroristsSurrender, /**< Terrorists Surrender */
|
||||
CSRoundEnd_CTSurrender, /**< CTs Surrender */
|
||||
};
|
||||
|
||||
enum CSWeaponID
|
||||
{
|
||||
CSWeapon_NONE,
|
||||
CSWeapon_P228,
|
||||
CSWeapon_GLOCK,
|
||||
CSWeapon_SCOUT,
|
||||
CSWeapon_HEGRENADE,
|
||||
CSWeapon_XM1014,
|
||||
CSWeapon_C4,
|
||||
CSWeapon_MAC10,
|
||||
CSWeapon_AUG,
|
||||
CSWeapon_SMOKEGRENADE,
|
||||
CSWeapon_ELITE,
|
||||
CSWeapon_FIVESEVEN,
|
||||
CSWeapon_UMP45,
|
||||
CSWeapon_SG550,
|
||||
CSWeapon_GALIL,
|
||||
CSWeapon_FAMAS,
|
||||
CSWeapon_USP,
|
||||
CSWeapon_AWP,
|
||||
CSWeapon_MP5NAVY,
|
||||
CSWeapon_M249,
|
||||
CSWeapon_M3,
|
||||
CSWeapon_M4A1,
|
||||
CSWeapon_TMP,
|
||||
CSWeapon_G3SG1,
|
||||
CSWeapon_FLASHBANG,
|
||||
CSWeapon_DEAGLE,
|
||||
CSWeapon_SG552,
|
||||
CSWeapon_AK47,
|
||||
CSWeapon_KNIFE,
|
||||
CSWeapon_P90,
|
||||
CSWeapon_SHIELD,
|
||||
CSWeapon_KEVLAR,
|
||||
CSWeapon_ASSAULTSUIT,
|
||||
CSWeapon_NIGHTVISION
|
||||
CSWeapon_NONE = 0,
|
||||
CSWeapon_P228,
|
||||
CSWeapon_GLOCK,
|
||||
CSWeapon_SCOUT,
|
||||
CSWeapon_HEGRENADE,
|
||||
CSWeapon_XM1014,
|
||||
CSWeapon_C4,
|
||||
CSWeapon_MAC10,
|
||||
CSWeapon_AUG,
|
||||
CSWeapon_SMOKEGRENADE,
|
||||
CSWeapon_ELITE,
|
||||
CSWeapon_FIVESEVEN,
|
||||
CSWeapon_UMP45,
|
||||
CSWeapon_SG550,
|
||||
CSWeapon_GALIL,
|
||||
CSWeapon_FAMAS,
|
||||
CSWeapon_USP,
|
||||
CSWeapon_AWP,
|
||||
CSWeapon_MP5NAVY,
|
||||
CSWeapon_M249,
|
||||
CSWeapon_M3,
|
||||
CSWeapon_M4A1,
|
||||
CSWeapon_TMP,
|
||||
CSWeapon_G3SG1,
|
||||
CSWeapon_FLASHBANG,
|
||||
CSWeapon_DEAGLE,
|
||||
CSWeapon_SG552,
|
||||
CSWeapon_AK47,
|
||||
CSWeapon_KNIFE,
|
||||
CSWeapon_P90,
|
||||
CSWeapon_SHIELD,
|
||||
CSWeapon_KEVLAR,
|
||||
CSWeapon_ASSAULTSUIT,
|
||||
CSWeapon_NIGHTVISION,
|
||||
CSWeapon_GALILAR,
|
||||
CSWeapon_BIZON,
|
||||
CSWeapon_MAG7,
|
||||
CSWeapon_NEGEV,
|
||||
CSWeapon_SAWEDOFF,
|
||||
CSWeapon_TEC9,
|
||||
CSWeapon_TASER,
|
||||
CSWeapon_HKP2000,
|
||||
CSWeapon_MP7,
|
||||
CSWeapon_MP9,
|
||||
CSWeapon_NOVA,
|
||||
CSWeapon_P250,
|
||||
CSWeapon_SCAR17,
|
||||
CSWeapon_SCAR20,
|
||||
CSWeapon_SG556,
|
||||
CSWeapon_SSG08,
|
||||
CSWeapon_KNIFE_GG,
|
||||
CSWeapon_MOLOTOV,
|
||||
CSWeapon_DECOY,
|
||||
CSWeapon_INCGRENADE,
|
||||
CSWeapon_DEFUSER
|
||||
};
|
||||
|
||||
/**
|
||||
* Called when a player attempts to purchase an item.
|
||||
* Return Plugin_Continue to allow the purchase or return a
|
||||
@ -118,7 +147,7 @@ forward Action:CS_OnBuyCommand(client, const String:weapon[]);
|
||||
* higher action to deny.
|
||||
*
|
||||
* @param client Client index
|
||||
* @param weapon Weapon index
|
||||
* @param weaponIndex Weapon index
|
||||
*/
|
||||
forward Action:CS_OnCSWeaponDrop(client, weaponIndex);
|
||||
|
||||
@ -236,7 +265,120 @@ native CS_GetClientClanTag(client, String:buffer[], size);
|
||||
* @error Invalid client.
|
||||
*/
|
||||
native CS_SetClientClanTag(client, const String:tag[]);
|
||||
|
||||
|
||||
/**
|
||||
* Gets a team's score
|
||||
* @param team Team index to get score for.
|
||||
* @return Returns the internal team score.
|
||||
*
|
||||
* @error Invalid team index.
|
||||
*/
|
||||
native CS_GetTeamScore(team);
|
||||
|
||||
/**
|
||||
* Sets a team's score
|
||||
* @param team Team index to set score for.
|
||||
* @param value Value to set teams score as.
|
||||
* @noreturn
|
||||
*
|
||||
* @error Invalid team index.
|
||||
* @note This will update the scoreboard only after the scoreboard update function is called. Use SetTeamScore plus this to update the scoreboard instantly and save values correctly.
|
||||
*/
|
||||
native CS_SetTeamScore(team, value);
|
||||
|
||||
/**
|
||||
* Gets a client's mvp count
|
||||
* @param client Client index to get mvp count of.
|
||||
* @return Returns the client's internal MVP count.
|
||||
*
|
||||
* @error Invalid client.
|
||||
*/
|
||||
native CS_GetMVPCount(client);
|
||||
|
||||
/**
|
||||
* Sets a client's mvp count
|
||||
* @param client Client index to set mvp count for.
|
||||
* @param value Value to set client's mvp count as.
|
||||
* @noreturn
|
||||
*
|
||||
* @error Invalid client.
|
||||
*/
|
||||
native CS_SetMVPCount(client, value);
|
||||
|
||||
/**
|
||||
* Gets a client's contribution score (CS:GO only)
|
||||
* @param client Client index to get score of.
|
||||
* @return Returns the client's score.
|
||||
*
|
||||
* @error Invalid client.
|
||||
*/
|
||||
native CS_GetClientContributionScore(client);
|
||||
|
||||
/**
|
||||
* Sets a client's contribution score (CS:GO only)
|
||||
* @param client Client index to set score for.
|
||||
* @param value Value to set client's score as.
|
||||
* @noreturn
|
||||
*
|
||||
* @error Invalid client.
|
||||
*/
|
||||
native CS_SetClientContributionScore(client, value);
|
||||
|
||||
/**
|
||||
* Gets a client's assists (CS:GO only)
|
||||
* @param client Client index to get assists of.
|
||||
* @return Returns the client's assists.
|
||||
*
|
||||
* @error Invalid client.
|
||||
*/
|
||||
native CS_GetClientAssists(client);
|
||||
|
||||
/**
|
||||
* Sets a client's assists (CS:GO only)
|
||||
* @param client Client index to set assists for.
|
||||
* @param value Value to set client's assists as.
|
||||
* @noreturn
|
||||
*
|
||||
* @error Invalid client.
|
||||
*/
|
||||
native CS_SetClientAssists(client, value);
|
||||
|
||||
/**
|
||||
* Gets a weaponID from a alias
|
||||
* @param alias Weapon alias to attempt to get an id for.
|
||||
* @return Returns a weapon id or 0 if failed to find a match.
|
||||
*
|
||||
* @note For best results use CS_GetTranslatedWeaponAlias on the weapon name before passing it.
|
||||
*/
|
||||
native CSWeaponID:CS_AliasToWeaponID(const String:alias[]);
|
||||
|
||||
/**
|
||||
* Gets a alias from a weaponID
|
||||
* @param weaponID WeaponID to get alias for.
|
||||
* @param destination Destination string to hold the weapon alias.
|
||||
* @param len Length of the destination array.
|
||||
* @return Returns number of cells written.
|
||||
*/
|
||||
native CS_WeaponIDToAlias(CSWeaponID:weaponID, String:destination[], len);
|
||||
|
||||
/**
|
||||
* Returns weather a WeaponID is valid on the current mod (css or csgo)
|
||||
* @param weaponID WeaponID to check
|
||||
* @return Returns true if its a valid WeaponID false otherwise.
|
||||
*
|
||||
* @note This will return false always for CSWeapon_NONE
|
||||
*/
|
||||
native bool:CS_IsValidWeaponID(CSWeaponID:id);
|
||||
|
||||
/**
|
||||
* Sets a player's model based on their current class
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @noreturn
|
||||
* @error Invalid client index, client not in game.
|
||||
*/
|
||||
native CS_UpdateClientModel(client);
|
||||
|
||||
/**
|
||||
* Do not edit below this line!
|
||||
*/
|
||||
@ -263,6 +405,18 @@ public __ext_cstrike_SetNTVOptional()
|
||||
MarkNativeAsOptional("CS_GetWeaponPrice");
|
||||
MarkNativeAsOptional("CS_GetClientClanTag");
|
||||
MarkNativeAsOptional("CS_SetClientClanTag");
|
||||
MarkNativeAsOptional("CS_GetTeamScore");
|
||||
MarkNativeAsOptional("CS_SetTeamScore");
|
||||
MarkNativeAsOptional("CS_GetMVPCount");
|
||||
MarkNativeAsOptional("CS_SetMVPCount");
|
||||
MarkNativeAsOptional("CS_GetClientContributionScore");
|
||||
MarkNativeAsOptional("CS_SetClientContributionScore");
|
||||
MarkNativeAsOptional("CS_GetClientAssists");
|
||||
MarkNativeAsOptional("CS_SetClientAssists");
|
||||
MarkNativeAsOptional("CS_AliasToWeaponID");
|
||||
MarkNativeAsOptional("CS_WeaponIDToAlias");
|
||||
MarkNativeAsOptional("CS_IsValidWeaponID");
|
||||
MarkNativeAsOptional("CS_UpdateClientModel");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
4
env/include/datapack.inc
vendored
4
env/include/datapack.inc
vendored
@ -50,7 +50,7 @@ native Handle:CreateDataPack();
|
||||
* @noreturn
|
||||
* @error Invalid handle.
|
||||
*/
|
||||
native WritePackCell(Handle:pack, cell);
|
||||
native WritePackCell(Handle:pack, any:cell);
|
||||
|
||||
/**
|
||||
* Packs a float into a data pack.
|
||||
@ -79,7 +79,7 @@ native WritePackString(Handle:pack, const String:str[]);
|
||||
* @return Cell value.
|
||||
* @error Invalid handle, or bounds error.
|
||||
*/
|
||||
native ReadPackCell(Handle:pack);
|
||||
native any:ReadPackCell(Handle:pack);
|
||||
|
||||
/**
|
||||
* Reads a float from a data pack.
|
||||
|
87
env/include/dbi.inc
vendored
87
env/include/dbi.inc
vendored
@ -137,6 +137,8 @@ stock Handle:SQL_DefConnect(String:error[], maxlength, bool:persistent=true)
|
||||
* @param keyvalues Key/value pairs from a KeyValues handle, describing the connection.
|
||||
* @param error Error buffer.
|
||||
* @param maxlength Maximum length of the error buffer.
|
||||
* @param persistent True to re-use a previous persistent connection if
|
||||
* possible, false otherwise.
|
||||
* @return A database connection Handle, or INVALID_HANDLE on failure.
|
||||
* On failure the error buffer will be filled with a message.
|
||||
* @error Invalid KeyValues handle.
|
||||
@ -249,6 +251,18 @@ native SQL_GetDriverIdent(Handle:driver, String:ident[], maxlength);
|
||||
*/
|
||||
native SQL_GetDriverProduct(Handle:driver, String:product[], maxlength);
|
||||
|
||||
/**
|
||||
* Sets the character set of the current connection.
|
||||
* Like SET NAMES .. in mysql, but stays after connection problems.
|
||||
*
|
||||
* Example: "utf8", "latin1"
|
||||
*
|
||||
* @param database Database Handle.
|
||||
* @param characterset The character set string to change to.
|
||||
* @return True, if character set was changed, false otherwise.
|
||||
*/
|
||||
native bool:SQL_SetCharset(Handle:database, const String:charset[]);
|
||||
|
||||
/**
|
||||
* Returns the number of affected rows from the last query.
|
||||
*
|
||||
@ -292,7 +306,7 @@ native bool:SQL_GetError(Handle:hndl, String:error[], maxlength);
|
||||
* encloses the string in ''. While drivers tend to allow " instead, the string
|
||||
* may be not be escaped (for example, on SQLite)!
|
||||
*
|
||||
* @param hndl A database Handle.
|
||||
* @param database A database Handle.
|
||||
* @param string String to quote.
|
||||
* @param buffer Buffer to store quoted string in.
|
||||
* @param maxlength Maximum length of the buffer.
|
||||
@ -557,7 +571,7 @@ native SQL_BindParamInt(Handle:statement, param, number, bool:signed=true);
|
||||
*
|
||||
* @param statement A statement (prepared query) Handle.
|
||||
* @param param The parameter index (starting from 0).
|
||||
* @param float The float number to bind.
|
||||
* @param value The float number to bind.
|
||||
* @noreturn
|
||||
* @error Invalid statement Handle or parameter index, or
|
||||
* SQL error.
|
||||
@ -621,7 +635,7 @@ native SQL_UnlockDatabase(Handle:database);
|
||||
/**
|
||||
* General callback for threaded SQL stuff.
|
||||
*
|
||||
* @param db Parent object of the Handle (or INVALID_HANDLE if none).
|
||||
* @param owner Parent object of the Handle (or INVALID_HANDLE if none).
|
||||
* @param hndl Handle to the child object (or INVALID_HANDLE if none).
|
||||
* @param error Error string if there was an error. The error could be
|
||||
* empty even if an error condition exists, so it is important
|
||||
@ -654,6 +668,7 @@ native bool:SQL_IsSameConnection(Handle:hndl1, Handle:hndl2);
|
||||
* @param callback Callback; new Handle will be in hndl, owner is the driver.
|
||||
* If no driver was found, the owner is INVALID_HANDLE.
|
||||
* @param name Database name.
|
||||
* @param data Extra data value to pass to the callback.
|
||||
* @noreturn
|
||||
*/
|
||||
native SQL_TConnect(SQLTCallback:callback, const String:name[]="default", any:data=0);
|
||||
@ -679,3 +694,69 @@ native SQL_TConnect(SQLTCallback:callback, const String:name[]="default", any:da
|
||||
* @error Invalid database Handle.
|
||||
*/
|
||||
native SQL_TQuery(Handle:database, SQLTCallback:callback, const String:query[], any:data=0, DBPriority:prio=DBPrio_Normal);
|
||||
|
||||
/**
|
||||
* Creates a new transaction object. A transaction object is a list of queries
|
||||
* that can be sent to the database thread and executed as a single transaction.
|
||||
*
|
||||
* @return A transaction handle.
|
||||
*/
|
||||
native Handle:SQL_CreateTransaction();
|
||||
|
||||
/**
|
||||
* Adds a query to a transaction object.
|
||||
*
|
||||
* @param txn A transaction handle.
|
||||
* @param query Query string.
|
||||
* @param data Extra data value to pass to the final callback.
|
||||
* @return The index of the query in the transaction's query list.
|
||||
* @error Invalid transaction handle.
|
||||
*/
|
||||
native SQL_AddQuery(Handle:txn, const String:query[], any:data=0);
|
||||
|
||||
/**
|
||||
* Callback for a successful transaction.
|
||||
*
|
||||
* @param db Database handle.
|
||||
* @param data Data value passed to SQL_ExecuteTransaction().
|
||||
* @param numQueries Number of queries executed in the transaction.
|
||||
* @param results An array of Query handle results, one for each of numQueries. They are closed automatically.
|
||||
* @param queryData An array of each data value passed to SQL_AddQuery().
|
||||
* @noreturn
|
||||
*/
|
||||
functag public SQLTxnSuccess(Handle:db, any:data, numQueries, Handle:results[], any:queryData[]);
|
||||
|
||||
/**
|
||||
* Callback for a failed transaction.
|
||||
*
|
||||
* @param db Database handle.
|
||||
* @param data Data value passed to SQL_ExecuteTransaction().
|
||||
* @param numQueries Number of queries executed in the transaction.
|
||||
* @param error Error message.
|
||||
* @param failIndex Index of the query that failed, or -1 if something else.
|
||||
* @param queryData An array of each data value passed to SQL_AddQuery().
|
||||
* @noreturn
|
||||
*/
|
||||
functag public SQLTxnFailure(Handle:db, any:data, numQueries, const String:error[], failIndex, any:queryData[]);
|
||||
|
||||
/**
|
||||
* Sends a transaction to the database thread. The transaction handle is
|
||||
* automatically closed. When the transaction completes, the optional
|
||||
* callback is invoked.
|
||||
*
|
||||
* @param db A database handle.
|
||||
* @param txn A transaction handle.
|
||||
* @param onSuccess An optional callback to receive a successful transaction.
|
||||
* @param onError An optional callback to receive an error message.
|
||||
* @param data An optional value to pass to callbacks.
|
||||
* @param prio Priority queue to use.
|
||||
* @noreturn
|
||||
* @error An invalid handle.
|
||||
*/
|
||||
native SQL_ExecuteTransaction(
|
||||
Handle:db,
|
||||
Handle:txn,
|
||||
SQLTxnSuccess:onSuccess=SQLTxnSuccess:-1,
|
||||
SQLTxnFailure:onError=SQLTxnFailure:-1,
|
||||
any:data=0,
|
||||
DBPriority:priority=DBPrio_Normal);
|
||||
|
35
env/include/entity.inc
vendored
35
env/include/entity.inc
vendored
@ -226,6 +226,7 @@ native GetEntData(entity, offset, size=4);
|
||||
*
|
||||
* @param entity Edict index.
|
||||
* @param offset Offset to use.
|
||||
* @param value Value to set.
|
||||
* @param size Number of bytes to write (valid values are 1, 2, or 4).
|
||||
* @param changeState If true, change will be sent over the network.
|
||||
* @return Value at the given memory location.
|
||||
@ -251,6 +252,7 @@ native Float:GetEntDataFloat(entity, offset);
|
||||
*
|
||||
* @param entity Edict index.
|
||||
* @param offset Offset to use.
|
||||
* @param value Value to set.
|
||||
* @param changeState If true, change will be sent over the network.
|
||||
* @return Value at the given memory location.
|
||||
* @error Invalid entity or offset out of reasonable bounds.
|
||||
@ -281,7 +283,7 @@ native GetEntDataEnt(entity, offset);
|
||||
* reasons explained in the notes.
|
||||
*
|
||||
* Note: This function uses 0 as an indicator to unset data, but
|
||||
* 0 is also the world entity index. Thus, the a property cannot
|
||||
* 0 is also the world entity index. Thus, a property cannot
|
||||
* be set to the world entity using this native.
|
||||
*
|
||||
* @param entity Edict index.
|
||||
@ -447,6 +449,26 @@ native FindDataMapOffs(entity,
|
||||
const String:prop[],
|
||||
&PropFieldType:type=PropFieldType:0,
|
||||
&num_bits=0);
|
||||
|
||||
/**
|
||||
* Given an entity, finds a nested datamap property offset.
|
||||
* This information is cached for future calls.
|
||||
*
|
||||
* @param entity Entity index.
|
||||
* @param prop Property name.
|
||||
* @param type Optional parameter to store the type.
|
||||
* @param num_bits Optional parameter to store the number of bits the field
|
||||
* uses. The bit count will either be 1 (for boolean) or
|
||||
* divisible by 8 (including 0 if unknown).
|
||||
* @param local_offset Optional parameter to store the local offset, as
|
||||
* FindDataMapOffs() would return.
|
||||
* @return An offset, or -1 on failure.
|
||||
*/
|
||||
native FindDataMapInfo(entity,
|
||||
const String:prop[],
|
||||
&PropFieldType:type=PropFieldType:0,
|
||||
&num_bits=0,
|
||||
&local_offset=0);
|
||||
|
||||
/**
|
||||
* Wrapper function for finding a send property for a particular entity.
|
||||
@ -691,12 +713,21 @@ stock SetEntDataArray(entity, offset, const array[], arraySize, dataSize=4, bool
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the memory address of an entity.
|
||||
*
|
||||
* @param entity Entity index.
|
||||
* @return Address of the entity.
|
||||
* @error Invalid entity.
|
||||
*/
|
||||
native Address:GetEntityAddress(entity);
|
||||
|
||||
/**
|
||||
* Retrieves the classname of an entity.
|
||||
* This is like GetEdictClassname(), except it works for ALL
|
||||
* entities, not just edicts.
|
||||
*
|
||||
* @param edict Index of the entity.
|
||||
* @param entity Index of the entity.
|
||||
* @param clsname Buffer to store the classname.
|
||||
* @param maxlength Maximum length of the buffer.
|
||||
* @return True on success, false if there is no classname set.
|
||||
|
73
env/include/entity_prop_stocks.inc
vendored
73
env/include/entity_prop_stocks.inc
vendored
@ -113,55 +113,56 @@ enum RenderFx
|
||||
#define IN_RELOAD (1 << 13)
|
||||
#define IN_ALT1 (1 << 14)
|
||||
#define IN_ALT2 (1 << 15)
|
||||
#define IN_SCORE (1 << 16) // Used by client.dll for when scoreboard is held down
|
||||
#define IN_SPEED (1 << 17) // Player is holding the speed key
|
||||
#define IN_WALK (1 << 18) // Player holding walk key
|
||||
#define IN_ZOOM (1 << 19) // Zoom key for HUD zoom
|
||||
#define IN_WEAPON1 (1 << 20) // weapon defines these bits
|
||||
#define IN_WEAPON2 (1 << 21) // weapon defines these bits
|
||||
#define IN_SCORE (1 << 16) /**< Used by client.dll for when scoreboard is held down */
|
||||
#define IN_SPEED (1 << 17) /**< Player is holding the speed key */
|
||||
#define IN_WALK (1 << 18) /**< Player holding walk key */
|
||||
#define IN_ZOOM (1 << 19) /**< Zoom key for HUD zoom */
|
||||
#define IN_WEAPON1 (1 << 20) /**< weapon defines these bits */
|
||||
#define IN_WEAPON2 (1 << 21) /**< weapon defines these bits */
|
||||
#define IN_BULLRUSH (1 << 22)
|
||||
#define IN_GRENADE1 (1 << 23) // grenade 1
|
||||
#define IN_GRENADE2 (1 << 24) // grenade 2
|
||||
#define IN_GRENADE1 (1 << 23) /**< grenade 1 */
|
||||
#define IN_GRENADE2 (1 << 24) /**< grenade 2 */
|
||||
#define IN_ATTACK3 (1 << 25)
|
||||
|
||||
// Note: these are only for use with GetEntityFlags and SetEntityFlags
|
||||
// and may not match the game's actual, internal m_fFlags values.
|
||||
// PLAYER SPECIFIC FLAGS FIRST BECAUSE WE USE ONLY A FEW BITS OF NETWORK PRECISION
|
||||
#define FL_ONGROUND (1 << 0) // At rest / on the ground
|
||||
#define FL_DUCKING (1 << 1) // Player flag -- Player is fully crouched
|
||||
#define FL_WATERJUMP (1 << 2) // player jumping out of water
|
||||
#define FL_ONTRAIN (1 << 3) // Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
|
||||
#define FL_INRAIN (1 << 4) // Indicates the entity is standing in rain
|
||||
#define FL_FROZEN (1 << 5) // Player is frozen for 3rd person camera
|
||||
#define FL_ATCONTROLS (1 << 6) // Player can't move, but keeps key inputs for controlling another entity
|
||||
#define FL_CLIENT (1 << 7) // Is a player
|
||||
#define FL_FAKECLIENT (1 << 8) // Fake client, simulated server side; don't send network messages to them
|
||||
#define FL_ONGROUND (1 << 0) /**< At rest / on the ground */
|
||||
#define FL_DUCKING (1 << 1) /**< Player flag -- Player is fully crouched */
|
||||
#define FL_WATERJUMP (1 << 2) /**< player jumping out of water */
|
||||
#define FL_ONTRAIN (1 << 3) /**< Player is _controlling_ a train, so movement commands should be ignored on client during prediction. */
|
||||
#define FL_INRAIN (1 << 4) /**< Indicates the entity is standing in rain */
|
||||
#define FL_FROZEN (1 << 5) /**< Player is frozen for 3rd person camera */
|
||||
#define FL_ATCONTROLS (1 << 6) /**< Player can't move, but keeps key inputs for controlling another entity */
|
||||
#define FL_CLIENT (1 << 7) /**< Is a player */
|
||||
#define FL_FAKECLIENT (1 << 8) /**< Fake client, simulated server side; don't send network messages to them */
|
||||
// NOTE if you move things up, make sure to change this value
|
||||
#define PLAYER_FLAG_BITS 9
|
||||
// NON-PLAYER SPECIFIC (i.e., not used by GameMovement or the client .dll ) -- Can still be applied to players, though
|
||||
#define FL_INWATER (1 << 9) // In water
|
||||
#define FL_FLY (1 << 10) // Changes the SV_Movestep() behavior to not need to be on ground
|
||||
#define FL_SWIM (1 << 11) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
|
||||
#define FL_INWATER (1 << 9) /**< In water */
|
||||
#define FL_FLY (1 << 10) /**< Changes the SV_Movestep() behavior to not need to be on ground */
|
||||
#define FL_SWIM (1 << 11) /**< Changes the SV_Movestep() behavior to not need to be on ground (but stay in water) */
|
||||
#define FL_CONVEYOR (1 << 12)
|
||||
#define FL_NPC (1 << 13)
|
||||
#define FL_GODMODE (1 << 14)
|
||||
#define FL_NOTARGET (1 << 15)
|
||||
#define FL_AIMTARGET (1 << 16) // set if the crosshair needs to aim onto the entity
|
||||
#define FL_PARTIALGROUND (1 << 17) // not all corners are valid
|
||||
#define FL_STATICPROP (1 << 18) // Eetsa static prop!
|
||||
#define FL_GRAPHED (1 << 19) // worldgraph has this ent listed as something that blocks a connection
|
||||
#define FL_AIMTARGET (1 << 16) /**< set if the crosshair needs to aim onto the entity */
|
||||
#define FL_PARTIALGROUND (1 << 17) /**< not all corners are valid */
|
||||
#define FL_STATICPROP (1 << 18) /**< Eetsa static prop! */
|
||||
#define FL_GRAPHED (1 << 19) /**< worldgraph has this ent listed as something that blocks a connection */
|
||||
#define FL_GRENADE (1 << 20)
|
||||
#define FL_STEPMOVEMENT (1 << 21) // Changes the SV_Movestep() behavior to not do any processing
|
||||
#define FL_DONTTOUCH (1 << 22) // Doesn't generate touch functions, generates Untouch() for anything it was touching when this flag was set
|
||||
#define FL_BASEVELOCITY (1 << 23) // Base velocity has been applied this frame (used to convert base velocity into momentum)
|
||||
#define FL_WORLDBRUSH (1 << 24) // Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something)
|
||||
#define FL_OBJECT (1 << 25) // Terrible name. This is an object that NPCs should see. Missiles, for example.
|
||||
#define FL_KILLME (1 << 26) // This entity is marked for death -- will be freed by game DLL
|
||||
#define FL_ONFIRE (1 << 27) // You know...
|
||||
#define FL_DISSOLVING (1 << 28) // We're dissolving!
|
||||
#define FL_TRANSRAGDOLL (1 << 29) // In the process of turning into a client side ragdoll.
|
||||
#define FL_UNBLOCKABLE_BY_PLAYER (1 << 30) // pusher that can't be blocked by the player
|
||||
#define FL_FREEZING (1 << 31) // We're becoming frozen!
|
||||
#define FL_EP2V_UNKNOWN1 (1 << 31) // Unknown
|
||||
#define FL_STEPMOVEMENT (1 << 21) /**< Changes the SV_Movestep() behavior to not do any processing */
|
||||
#define FL_DONTTOUCH (1 << 22) /**< Doesn't generate touch functions, generates Untouch() for anything it was touching when this flag was set */
|
||||
#define FL_BASEVELOCITY (1 << 23) /**< Base velocity has been applied this frame (used to convert base velocity into momentum) */
|
||||
#define FL_WORLDBRUSH (1 << 24) /**< Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something) */
|
||||
#define FL_OBJECT (1 << 25) /**< Terrible name. This is an object that NPCs should see. Missiles, for example. */
|
||||
#define FL_KILLME (1 << 26) /**< This entity is marked for death -- will be freed by game DLL */
|
||||
#define FL_ONFIRE (1 << 27) /**< You know... */
|
||||
#define FL_DISSOLVING (1 << 28) /**< We're dissolving! */
|
||||
#define FL_TRANSRAGDOLL (1 << 29) /**< In the process of turning into a client side ragdoll. */
|
||||
#define FL_UNBLOCKABLE_BY_PLAYER (1 << 30) /**< pusher that can't be blocked by the player */
|
||||
#define FL_FREEZING (1 << 31) /**< We're becoming frozen! */
|
||||
#define FL_EP2V_UNKNOWN1 (1 << 31) /**< Unknown */
|
||||
// END entity flag #defines
|
||||
|
||||
/**
|
||||
|
2
env/include/events.inc
vendored
2
env/include/events.inc
vendored
@ -235,7 +235,7 @@ native SetEventString(Handle:event, const String:key[], const String:value[]);
|
||||
* Retrieves the name of a game event.
|
||||
*
|
||||
* @param event Handle to the event.
|
||||
* @param value Buffer to store the name of the event.
|
||||
* @param name Buffer to store the name of the event.
|
||||
* @param maxlength Maximum length of string buffer.
|
||||
* @noreturn
|
||||
* @error Invalid or corrupt Handle.
|
||||
|
12
env/include/files.inc
vendored
12
env/include/files.inc
vendored
@ -303,9 +303,9 @@ native FilePosition(Handle:file);
|
||||
*
|
||||
* @param path Path to the file.
|
||||
* @param use_valve_fs If true, the Valve file system will be used instead.
|
||||
* This can be used to check for the existance of files
|
||||
* inside GCFs or the game cache, rather than solely files
|
||||
* that are on disk.
|
||||
* This can be used to find files existing in any of
|
||||
* the GAME search paths, rather than solely files
|
||||
* existing directly in the gamedir.
|
||||
* @return True if the file exists, false otherwise.
|
||||
*/
|
||||
native bool:FileExists(const String:path[], bool:use_valve_fs=false);
|
||||
@ -331,9 +331,13 @@ native bool:DirExists(const String:path[]);
|
||||
* Get the file size in bytes.
|
||||
*
|
||||
* @param path Path to the file.
|
||||
* @param use_valve_fs If true, the Valve file system will be used instead.
|
||||
* This can be used to find files existing in any of
|
||||
* the GAME search paths, rather than solely files
|
||||
* existing directly in the gamedir.
|
||||
* @return File size in bytes, -1 if file not found.
|
||||
*/
|
||||
native FileSize(const String:path[]);
|
||||
native FileSize(const String:path[], bool:use_valve_fs=false);
|
||||
|
||||
/**
|
||||
* Flushes a file's buffered output; any buffered output
|
||||
|
73
env/include/float.inc
vendored
73
env/include/float.inc
vendored
@ -246,10 +246,25 @@ stock RoundFloat(Float:value)
|
||||
*/
|
||||
#pragma rational Float
|
||||
|
||||
native bool:__FLOAT_GT__(Float:a, Float:b);
|
||||
native bool:__FLOAT_GE__(Float:a, Float:b);
|
||||
native bool:__FLOAT_LT__(Float:a, Float:b);
|
||||
native bool:__FLOAT_LE__(Float:a, Float:b);
|
||||
native bool:__FLOAT_EQ__(Float:a, Float:b);
|
||||
native bool:__FLOAT_NE__(Float:a, Float:b);
|
||||
native bool:__FLOAT_NOT__(Float:a);
|
||||
|
||||
native Float:operator*(Float:oper1, Float:oper2) = FloatMul;
|
||||
native Float:operator/(Float:oper1, Float:oper2) = FloatDiv;
|
||||
native Float:operator+(Float:oper1, Float:oper2) = FloatAdd;
|
||||
native Float:operator-(Float:oper1, Float:oper2) = FloatSub;
|
||||
native bool:operator!(Float:oper1) = __FLOAT_NOT__;
|
||||
native bool:operator>(Float:oper1, Float:oper2) = __FLOAT_GT__;
|
||||
native bool:operator>=(Float:oper1, Float:oper2) = __FLOAT_GE__;
|
||||
native bool:operator<(Float:oper1, Float:oper2) = __FLOAT_LT__;
|
||||
native bool:operator<=(Float:oper1, Float:oper2) = __FLOAT_LE__;
|
||||
native bool:operator!=(Float:oper1, Float:oper2) = __FLOAT_NE__;
|
||||
native bool:operator==(Float:oper1, Float:oper2) = __FLOAT_EQ__;
|
||||
|
||||
stock Float:operator++(Float:oper)
|
||||
{
|
||||
@ -263,7 +278,7 @@ stock Float:operator--(Float:oper)
|
||||
|
||||
stock Float:operator-(Float:oper)
|
||||
{
|
||||
return oper^Float:((-1)^((-1)/2)); /* IEEE values are sign/magnitude */
|
||||
return oper^Float:cellmin; /* IEEE values are sign/magnitude */
|
||||
}
|
||||
|
||||
stock Float:operator*(Float:oper1, oper2)
|
||||
@ -296,90 +311,54 @@ stock Float:operator-(oper1, Float:oper2)
|
||||
return FloatSub(float(oper1), oper2);
|
||||
}
|
||||
|
||||
stock bool:operator==(Float:oper1, Float:oper2)
|
||||
{
|
||||
return FloatCompare(oper1, oper2) == 0;
|
||||
}
|
||||
|
||||
stock bool:operator==(Float:oper1, oper2)
|
||||
{
|
||||
return FloatCompare(oper1, float(oper2)) == 0; /* "==" is commutative */
|
||||
}
|
||||
|
||||
stock bool:operator!=(Float:oper1, Float:oper2)
|
||||
{
|
||||
return FloatCompare(oper1, oper2) != 0;
|
||||
return __FLOAT_EQ__(oper1, float(oper2));
|
||||
}
|
||||
|
||||
stock bool:operator!=(Float:oper1, oper2)
|
||||
{
|
||||
return FloatCompare(oper1, float(oper2)) != 0; /* "==" is commutative */
|
||||
}
|
||||
|
||||
stock bool:operator>(Float:oper1, Float:oper2)
|
||||
{
|
||||
return FloatCompare(oper1, oper2) > 0;
|
||||
return __FLOAT_NE__(oper1, float(oper2));
|
||||
}
|
||||
|
||||
stock bool:operator>(Float:oper1, oper2)
|
||||
{
|
||||
return FloatCompare(oper1, float(oper2)) > 0;
|
||||
return __FLOAT_GT__(oper1, float(oper2));
|
||||
}
|
||||
|
||||
stock bool:operator>(oper1, Float:oper2)
|
||||
{
|
||||
return FloatCompare(float(oper1), oper2) > 0;
|
||||
}
|
||||
|
||||
stock bool:operator>=(Float:oper1, Float:oper2)
|
||||
{
|
||||
return FloatCompare(oper1, oper2) >= 0;
|
||||
return __FLOAT_GT__(float(oper1), oper2);
|
||||
}
|
||||
|
||||
stock bool:operator>=(Float:oper1, oper2)
|
||||
{
|
||||
return FloatCompare(oper1, float(oper2)) >= 0;
|
||||
return __FLOAT_GE__(oper1, float(oper2));
|
||||
}
|
||||
|
||||
stock bool:operator>=(oper1, Float:oper2)
|
||||
{
|
||||
return FloatCompare(float(oper1), oper2) >= 0;
|
||||
}
|
||||
|
||||
stock bool:operator<(Float:oper1, Float:oper2)
|
||||
{
|
||||
return FloatCompare(oper1, oper2) < 0;
|
||||
return __FLOAT_GE__(float(oper1), oper2);
|
||||
}
|
||||
|
||||
stock bool:operator<(Float:oper1, oper2)
|
||||
{
|
||||
return FloatCompare(oper1, float(oper2)) < 0;
|
||||
return __FLOAT_LT__(oper1, float(oper2));
|
||||
}
|
||||
|
||||
stock bool:operator<(oper1, Float:oper2)
|
||||
{
|
||||
return FloatCompare(float(oper1), oper2) < 0;
|
||||
}
|
||||
|
||||
stock bool:operator<=(Float:oper1, Float:oper2)
|
||||
{
|
||||
return FloatCompare(oper1, oper2) <= 0;
|
||||
return __FLOAT_LT__(float(oper1), oper2);
|
||||
}
|
||||
|
||||
stock bool:operator<=(Float:oper1, oper2)
|
||||
{
|
||||
return FloatCompare(oper1, float(oper2)) <= 0;
|
||||
return __FLOAT_LE__(oper1, float(oper2));
|
||||
}
|
||||
|
||||
stock bool:operator<=(oper1, Float:oper2)
|
||||
{
|
||||
return FloatCompare(float(oper1), oper2) <= 0;
|
||||
}
|
||||
|
||||
stock bool:operator!(Float:oper)
|
||||
{
|
||||
return (_:oper & ((-1)/2)) == 0; /* -1 = all bits to 1; /2 = remove most significant bit (sign)
|
||||
works on both 32bit and 64bit systems; no constant required */
|
||||
return __FLOAT_LE__(float(oper1), oper2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
17
env/include/functions.inc
vendored
17
env/include/functions.inc
vendored
@ -492,3 +492,20 @@ native FormatNativeString(out_param,
|
||||
&written=0,
|
||||
String:out_string[]="",
|
||||
const String:fmt_string[]="");
|
||||
|
||||
/**
|
||||
* Defines a RequestFrame Callback.
|
||||
*
|
||||
* @param data Data passed to the RequestFrame native.
|
||||
* @noreturn
|
||||
*/
|
||||
functag public RequestFrameCallback(any:data);
|
||||
|
||||
/**
|
||||
* Creates a single use Next Frame hook.
|
||||
*
|
||||
* @param Function Function to call on the next frame.
|
||||
* @param data Value to be passed on the invocation of the Function.
|
||||
* @noreturn
|
||||
*/
|
||||
native RequestFrame(RequestFrameCallback:Function, any:data=0);
|
||||
|
4
env/include/geoip.inc
vendored
4
env/include/geoip.inc
vendored
@ -63,8 +63,8 @@ native bool:GeoipCode3(const String:ip[], String:ccode[4]);
|
||||
* Gets the full country name. (max length of output string is 45)
|
||||
*
|
||||
* @param ip Ip to determine the country code.
|
||||
* @param ccode Destination string buffer to store the country name.
|
||||
* @param len Maximum length of output string buffer.
|
||||
* @param name Destination string buffer to store the country name.
|
||||
* @param maxlength Maximum length of output string buffer.
|
||||
* @return True on success, false if no country found.
|
||||
*/
|
||||
native bool:GeoipCountry(const String:ip[], String:name[], maxlength);
|
||||
|
62
env/include/halflife.inc
vendored
62
env/include/halflife.inc
vendored
@ -42,10 +42,13 @@
|
||||
#define SOURCE_SDK_EPISODE2 30 /**< SDK+Engine released after Episode 2/Orange Box */
|
||||
#define SOURCE_SDK_BLOODYGOODTIME 32 /**< Modified version of ep2 engine used by Bloody Good Time (no SDK) */
|
||||
#define SOURCE_SDK_EYE 33 /**< Modified version of ep2 engine used by E.Y.E Divine Cybermancy (no SDK) */
|
||||
#define SOURCE_SDK_EPISODE2VALVE 35 /**< SDK+Engine released after Episode 2/Orange Box */
|
||||
#define SOURCE_SDK_CSS 34 /**< Sometime-older version of Source 2009 SDK+Engine, used for Counter-Strike: Source */
|
||||
#define SOURCE_SDK_EPISODE2VALVE 35 /**< SDK+Engine released after Episode 2/Orange Box, "Source 2009" or "Source MP" */
|
||||
#define SOURCE_SDK_LEFT4DEAD 40 /**< Engine released after Left 4 Dead (no SDK yet) */
|
||||
#define SOURCE_SDK_LEFT4DEAD2 50 /**< Engine released after Left 4 Dead 2 (no SDK yet) */
|
||||
#define SOURCE_SDK_ALIENSWARM 60 /**< SDK+Engine released after Alien Swarm */
|
||||
#define SOURCE_SDK_CSGO 80 /**< Engine released after CS:GO (no SDK yet) */
|
||||
#define SOURCE_SDK_DOTA 90 /**< Engine released after Dota 2 (no SDK) */
|
||||
|
||||
#define MOTDPANEL_TYPE_TEXT 0 /**< Treat msg as plain text */
|
||||
#define MOTDPANEL_TYPE_INDEX 1 /**< Msg is auto determined by the engine */
|
||||
@ -61,6 +64,32 @@ enum DialogType
|
||||
DialogType_AskConnect /**< ask the client to connect to a specified IP */
|
||||
};
|
||||
|
||||
enum EngineVersion
|
||||
{
|
||||
Engine_Unknown, /**< Could not determine the engine version */
|
||||
Engine_Original, /**< Original Source Engine (used by The Ship) */
|
||||
Engine_SourceSDK2006, /**< Episode 1 Source Engine (second major SDK) */
|
||||
Engine_SourceSDK2007, /**< Orange Box Source Engine (third major SDK) */
|
||||
Engine_Left4Dead, /**< Left 4 Dead */
|
||||
Engine_DarkMessiah, /**< Dark Messiah Multiplayer (based on original engine) */
|
||||
Engine_Left4Dead2 = 7, /**< Left 4 Dead 2 */
|
||||
Engine_AlienSwarm, /**< Alien Swarm (and Alien Swarm SDK) */
|
||||
Engine_BloodyGoodTime, /**< Bloody Good Time */
|
||||
Engine_EYE, /**< E.Y.E Divine Cybermancy */
|
||||
Engine_Portal2, /**< Portal 2 */
|
||||
Engine_CSGO, /**< Counter-Strike: Global Offensive */
|
||||
Engine_CSS, /**< Counter-Strike: Source */
|
||||
Engine_DOTA, /**< Dota 2 */
|
||||
Engine_HL2DM, /**< Half-Life 2 Deathmatch */
|
||||
Engine_DODS, /**< Day of Defeat: Source */
|
||||
Engine_TF2, /**< Team Fortress 2 */
|
||||
Engine_NuclearDawn, /**< Nuclear Dawn */
|
||||
Engine_SDK2013, /**< Source SDK 2013 */
|
||||
Engine_Blade, /**< Blade Symphony */
|
||||
Engine_Insurgency, /**< Insurgency (2013 Retail version)*/
|
||||
Engine_Contagion, /**< Contagion */
|
||||
};
|
||||
|
||||
#define INVALID_ENT_REFERENCE 0xFFFFFFFF
|
||||
|
||||
/**
|
||||
@ -101,7 +130,7 @@ native GetRandomInt(nmin, nmax);
|
||||
/**
|
||||
* Returns whether a map is valid or not.
|
||||
*
|
||||
* @param Map name, excluding .bsp extension.
|
||||
* @param map Map name, excluding .bsp extension.
|
||||
* @return True if valid, false otherwise.
|
||||
*/
|
||||
native bool:IsMapValid(const String:map[]);
|
||||
@ -127,6 +156,13 @@ native Float:GetEngineTime();
|
||||
*/
|
||||
native Float:GetGameTime();
|
||||
|
||||
/**
|
||||
* Returns the game's internal tick count.
|
||||
*
|
||||
* @return Game tick count.
|
||||
*/
|
||||
native GetGameTickCount();
|
||||
|
||||
/**
|
||||
* Returns the game description from the mod.
|
||||
*
|
||||
@ -212,7 +248,7 @@ native bool:IsDecalPrecached(const String:decal[]);
|
||||
/**
|
||||
* Returns if a given generic file is precached.
|
||||
*
|
||||
* @param decal Name of the generic file to check.
|
||||
* @param generic Name of the generic file to check.
|
||||
* @return True if precached, false otherwise.
|
||||
*/
|
||||
native bool:IsGenericPrecached(const String:generic[]);
|
||||
@ -254,8 +290,19 @@ native CreateDialog(client, Handle:kv, DialogType:type);
|
||||
*
|
||||
* @return SOURCE_SDK version code.
|
||||
*/
|
||||
#pragma deprecated See GetEngineVersion()
|
||||
native GuessSDKVersion();
|
||||
|
||||
/**
|
||||
* Gets the engine version that the currently-loaded SM core was compiled against.
|
||||
*
|
||||
* The engine version values are not guaranteed to be in any particular order,
|
||||
* and should only be compared by (in)equality.
|
||||
*
|
||||
* @return An EngineVersion value.
|
||||
*/
|
||||
native EngineVersion:GetEngineVersion();
|
||||
|
||||
/**
|
||||
* Prints a message to a specific client in the chat area.
|
||||
*
|
||||
@ -537,14 +584,17 @@ stock ShowMOTDPanel(client, const String:title[], const String:msg[], type=MOTDP
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param time Duration to hold the panel on the client's screen.
|
||||
* @param ip Destionation IP.
|
||||
* @param ip Destination IP.
|
||||
* @param password Password to connect to the destination IP. The client will be able to see this.
|
||||
* @noreturn
|
||||
*/
|
||||
stock DisplayAskConnectBox(client, Float:time, const String:ip[])
|
||||
stock DisplayAskConnectBox(client, Float:time, const String:ip[], const String:password[] = "")
|
||||
{
|
||||
decl String:destination[288];
|
||||
FormatEx(destination, sizeof(destination), "%s/%s", ip, password);
|
||||
new Handle:Kv = CreateKeyValues("data");
|
||||
KvSetFloat(Kv, "time", time);
|
||||
KvSetString(Kv, "title", ip);
|
||||
KvSetString(Kv, "title", destination);
|
||||
CreateDialog(client, Kv, DialogType_AskConnect);
|
||||
CloseHandle(Kv);
|
||||
}
|
||||
|
2
env/include/keyvalues.inc
vendored
2
env/include/keyvalues.inc
vendored
@ -60,7 +60,7 @@ enum KvDataTypes
|
||||
* @param firstValue If firstKey is non-empty, specifies the first key's value.
|
||||
* @return A Handle to a new KeyValues structure.
|
||||
*/
|
||||
native Handle:CreateKeyValues(const String:name[], const String:firstkey[]="", const String:firstValue[]="");
|
||||
native Handle:CreateKeyValues(const String:name[], const String:firstKey[]="", const String:firstValue[]="");
|
||||
|
||||
/**
|
||||
* Sets a string value of a KeyValues key.
|
||||
|
2
env/include/lang.inc
vendored
2
env/include/lang.inc
vendored
@ -41,7 +41,7 @@
|
||||
* Loads a translation file for the plugin calling this native.
|
||||
* If no extension is specified, .txt is assumed.
|
||||
*
|
||||
* @param path Translation file.
|
||||
* @param file Translation file.
|
||||
* @noreturn
|
||||
*/
|
||||
native LoadTranslations(const String:file[]);
|
||||
|
11
env/include/logging.inc
vendored
11
env/include/logging.inc
vendored
@ -45,17 +45,6 @@
|
||||
*/
|
||||
native LogMessage(const String:format[], any:...);
|
||||
|
||||
/**
|
||||
* Logs a message to the SourceMod logs without any plugin logtag. This is
|
||||
* useful for re-routing messages from other plugins, for example, messages
|
||||
* from LogAction().
|
||||
*
|
||||
* @param format String format.
|
||||
* @param ... Format arguments.
|
||||
* @noreturn
|
||||
*/
|
||||
native LogMessageEx(const String:format[], any:...);
|
||||
|
||||
/**
|
||||
* Logs a message to any file. The log message will be in the normal
|
||||
* SourceMod format, with the plugin logtag prepended.
|
||||
|
22
env/include/menus.inc
vendored
22
env/include/menus.inc
vendored
@ -345,6 +345,7 @@ native GetMenuTitle(Handle:menu, String:buffer[], maxlength);
|
||||
* Creates a raw MenuPanel based off the menu's style.
|
||||
* The Handle must be freed with CloseHandle().
|
||||
*
|
||||
* @param menu Menu Handle.
|
||||
* @return A new MenuPanel Handle.
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
@ -404,6 +405,16 @@ native bool:GetMenuExitBackButton(Handle:menu);
|
||||
*/
|
||||
native SetMenuExitBackButton(Handle:menu, bool:button);
|
||||
|
||||
/**
|
||||
* Sets whether or not the menu has a "no vote" button in slot 1.
|
||||
* By default, menus do not have a no vote button.
|
||||
*
|
||||
* @param menu Menu Handle.
|
||||
* @param button True to enable the button, false to remove it.
|
||||
* @return True if allowed; false on failure.
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
native bool:SetMenuNoVoteButton(Handle:menu, bool:button);
|
||||
|
||||
/**
|
||||
* Cancels a menu from displaying on all clients. While the
|
||||
@ -489,14 +500,14 @@ native bool:VoteMenu(Handle:menu, clients[], numClients, time, flags=0);
|
||||
* in progress.
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
stock VoteMenuToAll(Handle:menu, time, flags=0)
|
||||
stock bool:VoteMenuToAll(Handle:menu, time, flags=0)
|
||||
{
|
||||
new total;
|
||||
decl players[MaxClients];
|
||||
|
||||
for (new i=1; i<=MaxClients; i++)
|
||||
{
|
||||
if (!IsClientInGame(i))
|
||||
if (!IsClientInGame(i) || IsFakeClient(i))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -590,7 +601,7 @@ native Handle:CreatePanel(Handle:hStyle=INVALID_HANDLE);
|
||||
* Creates a Menu from a MenuStyle. The Handle must be closed with
|
||||
* CloseHandle().
|
||||
*
|
||||
* @parma hStyle MenuStyle Handle, or INVALID_HANDLE to use the default style.
|
||||
* @param hStyle MenuStyle Handle, or INVALID_HANDLE to use the default style.
|
||||
* @param handler Function which will receive menu actions.
|
||||
* @param actions Optionally set which actions to receive. Select,
|
||||
* Cancel, and End will always be received regardless
|
||||
@ -614,7 +625,7 @@ native MenuSource:GetClientMenu(client, Handle:hStyle=INVALID_HANDLE);
|
||||
/**
|
||||
* Cancels a menu on a client. This will only affect non-external menus.
|
||||
*
|
||||
* @param hstyle MenuStyle Handle, or INVALID_HANDLE to use the default style.
|
||||
* @param hStyle MenuStyle Handle, or INVALID_HANDLE to use the default style.
|
||||
* @param client Client index.
|
||||
* @param autoIgnore If true, no menus can be re-drawn on the client during
|
||||
* the cancellation process.
|
||||
@ -644,7 +655,7 @@ native Handle:GetPanelStyle(Handle:panel);
|
||||
* Sets the panel's title.
|
||||
*
|
||||
* @param panel A MenuPanel Handle.
|
||||
* @param title Text to set as the title.
|
||||
* @param text Text to set as the title.
|
||||
* @param onlyIfEmpty If true, the title will only be set if no title is set.
|
||||
* @noreturn
|
||||
* @error Invalid Handle.
|
||||
@ -691,6 +702,7 @@ native CanPanelDrawFlags(Handle:panel, style);
|
||||
* Sets the selectable key map of a panel. This is not supported by
|
||||
* all styles (only by Radio, as of this writing).
|
||||
*
|
||||
* @param panel A MenuPanel Handle.
|
||||
* @param keys An integer where each bit N allows key
|
||||
* N+1 to be selected. If no keys are selectable,
|
||||
* then key 0 (bit 9) is automatically set.
|
||||
|
368
env/include/protobuf.inc
vendored
Normal file
368
env/include/protobuf.inc
vendored
Normal file
@ -0,0 +1,368 @@
|
||||
/**
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod (C)2013 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This file is part of the SourceMod/SourcePawn SDK.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||
* this exception to all derivative works. AlliedModders LLC defines further
|
||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||
* or <http://www.sourcemod.net/license.php>.
|
||||
*
|
||||
* Version: $Id$
|
||||
*/
|
||||
|
||||
#if defined _protobuf_included
|
||||
#endinput
|
||||
#endif
|
||||
#define _protobuf_included
|
||||
|
||||
#define PB_FIELD_NOT_REPEATED -1
|
||||
|
||||
/**
|
||||
* Reads an int32, uint32, sint32, fixed32, sfixed32, or enum value from a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param index Index into repeated field.
|
||||
* @return Integer value read.
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbReadInt(Handle:pb, const String:field[], index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Reads a float or downcasted double from a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param index Index into repeated field.
|
||||
* @return Float value read.
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native Float:PbReadFloat(Handle:pb, const String:field[], index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Reads a bool from a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param index Index into repeated field.
|
||||
* @return Boolean value read.
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native bool:PbReadBool(Handle:pb, const String:field[], index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Reads a string from a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param buffer Destination string buffer.
|
||||
* @param maxlength Maximum length of output string buffer.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbReadString(Handle:pb, const String:field[], String:buffer[], maxlength, index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Reads an RGBA color value from a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param buffer Destination color buffer.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbReadColor(Handle:pb, const String:field[], buffer[4], index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Reads an XYZ angle value from a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param buffer Destination angle buffer.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbReadAngle(Handle:pb, const String:field[], Float:buffer[3], index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Reads an XYZ vector value from a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param buffer Destination vector buffer.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbReadVector(Handle:pb, const String:field[], Float:buffer[3], index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Reads an XY vector value from a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param buffer Destination vector buffer.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbReadVector2D(Handle:pb, const String:field[], Float:buffer[2], index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Gets the number of elements in a repeated field of a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @return Number of elements in the field.
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbGetRepeatedFieldCount(Handle:pb, const String:field[]);
|
||||
|
||||
/**
|
||||
* Sets an int32, uint32, sint32, fixed32, sfixed32, or enum value on a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param value Integer value to set.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbSetInt(Handle:pb, const String:field[], value, index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Sets a float or double on a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param value Float value to set.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbSetFloat(Handle:pb, const String:field[], Float:value, index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Sets a bool on a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param value Boolean value to set.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbSetBool(Handle:pb, const String:field[], bool:value, index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Sets a string on a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param value String value to set.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbSetString(Handle:pb, const String:field[], const String:value[], index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Sets an RGBA color on a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param color Color value to set.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbSetColor(Handle:pb, const String:field[], const color[4], index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Sets an XYZ angle on a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param angle Angle value to set.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbSetAngle(Handle:pb, const String:field[], const Float:angle[3], index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Sets an XYZ vector on a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param vec Vector value to set.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbSetVector(Handle:pb, const String:field[], const Float:vec[3], index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Sets an XY vector on a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param vec Vector value to set.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbSetVector2D(Handle:pb, const String:field[], const Float:vec[2], index=PB_FIELD_NOT_REPEATED);
|
||||
|
||||
/**
|
||||
* Add an int32, uint32, sint32, fixed32, sfixed32, or enum value to a protobuf message repeated field.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param value Integer value to add.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbAddInt(Handle:pb, const String:field[], value);
|
||||
|
||||
/**
|
||||
* Add a float or double to a protobuf message repeated field.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param value Float value to add.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbAddFloat(Handle:pb, const String:field[], Float:value);
|
||||
|
||||
/**
|
||||
* Add a bool to a protobuf message repeated field.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param value Boolean value to add.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbAddBool(Handle:pb, const String:field[], bool:value);
|
||||
|
||||
/**
|
||||
* Add a string to a protobuf message repeated field.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param value String value to add.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbAddString(Handle:pb, const String:field[], const String:value[]);
|
||||
|
||||
/**
|
||||
* Add an RGBA color to a protobuf message repeated field.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param color Color value to add.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbAddColor(Handle:pb, const String:field[], const color[4]);
|
||||
|
||||
/**
|
||||
* Add an XYZ angle to a protobuf message repeated field.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param angle Angle value to add.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbAddAngle(Handle:pb, const String:field[], const Float:angle[3]);
|
||||
|
||||
/**
|
||||
* Add an XYZ vector to a protobuf message repeated field.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param vec Vector value to add.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbAddVector(Handle:pb, const String:field[], const Float:vec[3]);
|
||||
|
||||
/**
|
||||
* Add an XY vector to a protobuf message repeated field.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param vec Vector value to add.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbAddVector2D(Handle:pb, const String:field[], const Float:vec[2]);
|
||||
|
||||
/**
|
||||
* Removes a value by index from a protobuf message repeated field.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param index Index into repeated field.
|
||||
* @noreturn
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native PbRemoveRepeatedFieldValue(Handle:pb, const String:field[], index);
|
||||
|
||||
/**
|
||||
* Retrieve a handle to an embedded protobuf message in a protobuf message.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @return protobuf handle to embedded message.
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native Handle:PbReadMessage(Handle:pb, const String:field[]);
|
||||
|
||||
/**
|
||||
* Retrieve a handle to an embedded protobuf message in a protobuf message repeated field.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @param index Index in the repeated field.
|
||||
* @return protobuf handle to embedded message.
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native Handle:PbReadRepeatedMessage(Handle:pb, const String:field[], index);
|
||||
|
||||
/**
|
||||
* Adds an embedded protobuf message to a protobuf message repeated field.
|
||||
*
|
||||
* @param pb protobuf handle.
|
||||
* @param field Field name.
|
||||
* @return protobuf handle to added, embedded message.
|
||||
* @error Invalid or incorrect Handle, non-existent field, or incorrect field type.
|
||||
*/
|
||||
native Handle:PbAddMessage(Handle:pb, const String:field[]);
|
17
env/include/regex.inc
vendored
17
env/include/regex.inc
vendored
@ -43,9 +43,13 @@
|
||||
#define PCRE_MULTILINE 0x00000002 /* Multilines (affects ^ and $ so that they match the start/end of a line rather than matching the start/end of the string). */
|
||||
#define PCRE_DOTALL 0x00000004 /* Single line (affects . so that it matches any character, even new line characters). */
|
||||
#define PCRE_EXTENDED 0x00000008 /* Pattern extension (ignore whitespace and # comments). */
|
||||
#define PCRE_ANCHORED 0x00000010 /* Force pattern anchoring. */
|
||||
#define PCRE_DOLLAR_ENDONLY 0x00000020 /* $ not to match newline at end. */
|
||||
#define PCRE_UNGREEDY 0x00000200 /* Invert greediness of quantifiers */
|
||||
#define PCRE_NOTEMPTY 0x00000400 /* An empty string is not a valid match. */
|
||||
#define PCRE_UTF8 0x00000800 /* Use UTF-8 Chars */
|
||||
#define PCRE_NO_UTF8_CHECK 0x00002000 /* Do not check the pattern for UTF-8 validity (only relevant if PCRE_UTF8 is set) */
|
||||
#define PCRE_UCP 0x20000000 /* Use Unicode properties for \ed, \ew, etc. */
|
||||
|
||||
|
||||
/**
|
||||
@ -76,7 +80,16 @@ enum RegexError
|
||||
REGEX_ERROR_DFA_RECURSE = -20,
|
||||
REGEX_ERROR_RECURSIONLIMIT = -21,
|
||||
REGEX_ERROR_NULLWSLIMIT = -22, /* No longer actually used */
|
||||
REGEX_ERROR_BADNEWLINE = -23
|
||||
REGEX_ERROR_BADNEWLINE = -23,
|
||||
REGEX_ERROR_BADOFFSET = -24,
|
||||
REGEX_ERROR_SHORTUTF8 = -25,
|
||||
REGEX_ERROR_RECURSELOOP = -26,
|
||||
REGEX_ERROR_JIT_STACKLIMIT = -27,
|
||||
REGEX_ERROR_BADMODE = -28,
|
||||
REGEX_ERROR_BADENDIANNESS = -29,
|
||||
REGEX_ERROR_DFA_BADRESTART = -30,
|
||||
REGEX_ERROR_JIT_BADOPTION = -31,
|
||||
REGEX_ERROR_BADLENGTH = -32,
|
||||
};
|
||||
|
||||
/**
|
||||
@ -114,7 +127,7 @@ native MatchRegex(Handle:regex, const String:str[], &RegexError:ret = REGEX_ERRO
|
||||
* @param regex The regex handle to extract data from.
|
||||
* @param str_id The index of the expression to get - starts at 0, and ends at substrings - 1.
|
||||
* @param buffer The buffer to set to the matching substring.
|
||||
* @param maxLen The maximum string length of the buffer.
|
||||
* @param maxlen The maximum string length of the buffer.
|
||||
* @return True if a substring was found, False on fail/error
|
||||
*/
|
||||
native bool:GetRegexSubString(Handle:regex, str_id, String:buffer[], maxlen);
|
||||
|
308
env/include/sdkhooks.inc
vendored
308
env/include/sdkhooks.inc
vendored
@ -1,43 +1,80 @@
|
||||
/**
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod (C)2009-2013 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This file is part of the SourceMod/SourcePawn SDK.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||
* this exception to all derivative works. AlliedModders LLC defines further
|
||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||
* or <http://www.sourcemod.net/license.php>.
|
||||
*/
|
||||
|
||||
#if defined _sdkhooks_included
|
||||
#endinput
|
||||
#endif
|
||||
#define _sdkhooks_included
|
||||
|
||||
#define DMG_GENERIC 0 // generic damage was done
|
||||
#define DMG_CRUSH (1 << 0) // crushed by falling or moving object.
|
||||
// NOTE: It's assumed crush damage is occurring as a result of physics collision, so no extra physics force is generated by crush damage.
|
||||
// DON'T use DMG_CRUSH when damaging entities unless it's the result of a physics collision. You probably want DMG_CLUB instead.
|
||||
#define DMG_BULLET (1 << 1) // shot
|
||||
#define DMG_SLASH (1 << 2) // cut, clawed, stabbed
|
||||
#define DMG_BURN (1 << 3) // heat burned
|
||||
#define DMG_VEHICLE (1 << 4) // hit by a vehicle
|
||||
#define DMG_FALL (1 << 5) // fell too far
|
||||
#define DMG_BLAST (1 << 6) // explosive blast damage
|
||||
#define DMG_CLUB (1 << 7) // crowbar, punch, headbutt
|
||||
#define DMG_SHOCK (1 << 8) // electric shock
|
||||
#define DMG_SONIC (1 << 9) // sound pulse shockwave
|
||||
#define DMG_ENERGYBEAM (1 << 10) // laser or other high energy beam
|
||||
#define DMG_PREVENT_PHYSICS_FORCE (1 << 11) // Prevent a physics force
|
||||
#define DMG_NEVERGIB (1 << 12) // with this bit OR'd in, no damage type will be able to gib victims upon death
|
||||
#define DMG_ALWAYSGIB (1 << 13) // with this bit OR'd in, any damage type can be made to gib victims upon death.
|
||||
#define DMG_DROWN (1 << 14) // Drowning
|
||||
#define DMG_PARALYZE (1 << 15) // slows affected creature down
|
||||
#define DMG_NERVEGAS (1 << 16) // nerve toxins, very bad
|
||||
#define DMG_POISON (1 << 17) // blood poisoning - heals over time like drowning damage
|
||||
#define DMG_RADIATION (1 << 18) // radiation exposure
|
||||
#define DMG_DROWNRECOVER (1 << 19) // drowning recovery
|
||||
#define DMG_ACID (1 << 20) // toxic chemicals or acid burns
|
||||
#define DMG_SLOWBURN (1 << 21) // in an oven
|
||||
#define DMG_REMOVENORAGDOLL (1 << 22) // with this bit OR'd in, no ragdoll will be created, and the target will be quietly removed.
|
||||
// use this to kill an entity that you've already got a server-side ragdoll for
|
||||
#define DMG_PHYSGUN (1 << 23) // Hit by manipulator. Usually doesn't do any damage.
|
||||
#define DMG_PLASMA (1 << 24) // Shot by Cremator
|
||||
#define DMG_AIRBOAT (1 << 25) // Hit by the airboat's gun
|
||||
#define DMG_DISSOLVE (1 << 26) // Dissolving!
|
||||
#define DMG_BLAST_SURFACE (1 << 27) // A blast on the surface of water that cannot harm things underwater
|
||||
// this is obviously _not_ a robust check, but it will solve most conflict and is clean
|
||||
#if !defined DMG_GENERIC
|
||||
#define DMG_GENERIC 0 /**< generic damage was done */
|
||||
#define DMG_CRUSH (1 << 0) /**< crushed by falling or moving object.
|
||||
NOTE: It's assumed crush damage is occurring as a result of physics collision, so no extra physics force is generated by crush damage.
|
||||
DON'T use DMG_CRUSH when damaging entities unless it's the result of a physics collision. You probably want DMG_CLUB instead. */
|
||||
#define DMG_BULLET (1 << 1) /**< shot */
|
||||
#define DMG_SLASH (1 << 2) /**< cut, clawed, stabbed */
|
||||
#define DMG_BURN (1 << 3) /**< heat burned */
|
||||
#define DMG_VEHICLE (1 << 4) /**< hit by a vehicle */
|
||||
#define DMG_FALL (1 << 5) /**< fell too far */
|
||||
#define DMG_BLAST (1 << 6) /**< explosive blast damage */
|
||||
#define DMG_CLUB (1 << 7) /**< crowbar, punch, headbutt */
|
||||
#define DMG_SHOCK (1 << 8) /**< electric shock */
|
||||
#define DMG_SONIC (1 << 9) /**< sound pulse shockwave */
|
||||
#define DMG_ENERGYBEAM (1 << 10) /**< laser or other high energy beam */
|
||||
#define DMG_PREVENT_PHYSICS_FORCE (1 << 11) /**< Prevent a physics force */
|
||||
#define DMG_NEVERGIB (1 << 12) /**< with this bit OR'd in, no damage type will be able to gib victims upon death */
|
||||
#define DMG_ALWAYSGIB (1 << 13) /**< with this bit OR'd in, any damage type can be made to gib victims upon death. */
|
||||
#define DMG_DROWN (1 << 14) /**< Drowning */
|
||||
#define DMG_PARALYZE (1 << 15) /**< slows affected creature down */
|
||||
#define DMG_NERVEGAS (1 << 16) /**< nerve toxins, very bad */
|
||||
#define DMG_POISON (1 << 17) /**< blood poisoning - heals over time like drowning damage */
|
||||
#define DMG_RADIATION (1 << 18) /**< radiation exposure */
|
||||
#define DMG_DROWNRECOVER (1 << 19) /**< drowning recovery */
|
||||
#define DMG_ACID (1 << 20) /**< toxic chemicals or acid burns */
|
||||
#define DMG_SLOWBURN (1 << 21) /**< in an oven */
|
||||
#define DMG_REMOVENORAGDOLL (1 << 22) /**< with this bit OR'd in, no ragdoll will be created, and the target will be quietly removed.
|
||||
use this to kill an entity that you've already got a server-side ragdoll for */
|
||||
#define DMG_PHYSGUN (1 << 23) /**< Hit by manipulator. Usually doesn't do any damage. */
|
||||
#define DMG_PLASMA (1 << 24) /**< Shot by Cremator */
|
||||
#define DMG_AIRBOAT (1 << 25) /**< Hit by the airboat's gun */
|
||||
#define DMG_DISSOLVE (1 << 26) /**< Dissolving! */
|
||||
#define DMG_BLAST_SURFACE (1 << 27) /**< A blast on the surface of water that cannot harm things underwater */
|
||||
#define DMG_DIRECT (1 << 28)
|
||||
#define DMG_BUCKSHOT (1 << 29) // not quite a bullet. Little, rounder, different.
|
||||
#define DMG_BUCKSHOT (1 << 29) /**< not quite a bullet. Little, rounder, different. */
|
||||
#endif
|
||||
|
||||
#if !defined DMG_CRIT
|
||||
// TF2 crits and minicrits
|
||||
#define DMG_CRIT DMG_ACID
|
||||
#endif
|
||||
|
||||
enum SDKHookType
|
||||
{
|
||||
@ -62,68 +99,183 @@ enum SDKHookType
|
||||
SDKHook_ShouldCollide,
|
||||
SDKHook_PreThinkPost,
|
||||
SDKHook_PostThinkPost,
|
||||
SDKHook_ThinkPost
|
||||
SDKHook_ThinkPost,
|
||||
SDKHook_EndTouchPost,
|
||||
SDKHook_GroundEntChangedPost,
|
||||
SDKHook_SpawnPost,
|
||||
SDKHook_StartTouchPost,
|
||||
SDKHook_TouchPost,
|
||||
SDKHook_VPhysicsUpdate,
|
||||
SDKHook_VPhysicsUpdatePost,
|
||||
SDKHook_WeaponCanSwitchToPost,
|
||||
SDKHook_WeaponCanUsePost,
|
||||
SDKHook_WeaponDropPost,
|
||||
SDKHook_WeaponEquipPost,
|
||||
SDKHook_WeaponSwitchPost,
|
||||
SDKHook_Use,
|
||||
SDKHook_UsePost,
|
||||
SDKHook_Reload,
|
||||
SDKHook_ReloadPost,
|
||||
SDKHook_GetMaxHealth, /**< ep2v and later */
|
||||
};
|
||||
|
||||
/*
|
||||
Alphabetized for easy readability
|
||||
|
||||
SDKHook_EndTouch
|
||||
SDKHook_FireBulletsPost
|
||||
SDKHook_OnTakeDamage
|
||||
SDKHook_OnTakeDamagePost
|
||||
SDKHook_PreThink
|
||||
SDKHook_PreThinkPost
|
||||
SDKHook_PostThink
|
||||
SDKHook_PostThinkPost
|
||||
SDKHook_SetTransmit
|
||||
SDKHook_ShouldCollide
|
||||
SDKHook_Spawn
|
||||
SDKHook_StartTouch
|
||||
SDKHook_Think
|
||||
SDKHook_ThinkPost
|
||||
SDKHook_Touch
|
||||
SDKHook_TraceAttack
|
||||
SDKHook_TraceAttackPost
|
||||
SDKHook_WeaponCanSwitchTo
|
||||
SDKHook_WeaponCanUse
|
||||
SDKHook_WeaponDrop
|
||||
SDKHook_WeaponEquip
|
||||
SDKHook_WeaponSwitch
|
||||
SDKHook_EndTouch,
|
||||
SDKHook_EndTouchPost,
|
||||
|
||||
SDKHook_FireBulletsPost,
|
||||
|
||||
SDKHook_GetMaxHealth, (ep2v and later)
|
||||
|
||||
SDKHook_GroundEntChangedPost,
|
||||
|
||||
SDKHook_OnTakeDamage,
|
||||
SDKHook_OnTakeDamagePost,
|
||||
|
||||
SDKHook_PreThink,
|
||||
SDKHook_PreThinkPost,
|
||||
|
||||
SDKHook_PostThink,
|
||||
SDKHook_PostThinkPost,
|
||||
|
||||
SDKHook_Reload,
|
||||
SDKHook_ReloadPost,
|
||||
|
||||
SDKHook_SetTransmit,
|
||||
|
||||
SDKHook_ShouldCollide,
|
||||
|
||||
SDKHook_Spawn,
|
||||
SDKHook_SpawnPost,
|
||||
|
||||
SDKHook_StartTouch,
|
||||
SDKHook_StartTouchPost,
|
||||
|
||||
SDKHook_Think,
|
||||
SDKHook_ThinkPost,
|
||||
|
||||
SDKHook_Touch,
|
||||
SDKHook_TouchPost,
|
||||
|
||||
SDKHook_TraceAttack,
|
||||
SDKHook_TraceAttackPost,
|
||||
|
||||
SDKHook_Use,
|
||||
SDKHook_UsePost,
|
||||
|
||||
SDKHook_VPhysicsUpdate,
|
||||
SDKHook_VPhysicsUpdatePost,
|
||||
|
||||
SDKHook_WeaponCanSwitchTo,
|
||||
SDKHook_WeaponCanSwitchToPost,
|
||||
|
||||
SDKHook_WeaponCanUse,
|
||||
SDKHook_WeaponCanUsePost,
|
||||
|
||||
SDKHook_WeaponDrop,
|
||||
SDKHook_WeaponDropPost,
|
||||
|
||||
SDKHook_WeaponEquip,
|
||||
SDKHook_WeaponEquipPost,
|
||||
|
||||
SDKHook_WeaponSwitch,
|
||||
SDKHook_WeaponSwitchPost
|
||||
*/
|
||||
|
||||
enum UseType
|
||||
{
|
||||
Use_Off,
|
||||
Use_On,
|
||||
Use_Set,
|
||||
Use_Toggle
|
||||
};
|
||||
|
||||
funcenum SDKHookCB
|
||||
{
|
||||
// PreThink/Post
|
||||
// PostThink/Post
|
||||
public(client),
|
||||
|
||||
// Spawn
|
||||
Action:public(entity),
|
||||
|
||||
// GroundEntChanged
|
||||
// SpawnPost
|
||||
// Think/Post
|
||||
// VPhysicsUpdate/Post
|
||||
public(entity),
|
||||
|
||||
// EndTouch
|
||||
// StartTouch
|
||||
// Touch
|
||||
Action:public(entity, other),
|
||||
|
||||
// EndTouchPost
|
||||
// StartTouchPost
|
||||
// TouchPost
|
||||
public(entity, other),
|
||||
|
||||
// SetTransmit
|
||||
Action:public(entity, client),
|
||||
|
||||
// WeaponCanSwitchTo
|
||||
// WeaponCanUse
|
||||
// WeaponDrop
|
||||
// WeaponEquip
|
||||
// WeaponSwitch
|
||||
Action:public(client, weapon),
|
||||
|
||||
// WeaponCanSwitchToPost
|
||||
// WeaponCanUsePost
|
||||
// WeaponDropPost
|
||||
// WeaponEquipPost
|
||||
// WeaponSwitchPost
|
||||
public(client, weapon),
|
||||
|
||||
// GetMaxHealth (ep2v and later)
|
||||
Action:public(entity, &maxhealth),
|
||||
|
||||
// OnTakeDamage
|
||||
// Note: The weapon parameter is not used by all games and damage sources.
|
||||
// Note: Force application is dependent on game and damage type(s)
|
||||
// SDKHooks 1.0+
|
||||
Action:public(victim, &attacker, &inflictor, &Float:damage, &damagetype),
|
||||
// SDKHooks 2.0+
|
||||
Action:public(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon, Float:damageForce[3], Float:damagePosition[3]),
|
||||
// SDKHooks 2.1+ (can check for support at runtime using GetFeatureStatus on SDKHook_DmgCustomInOTD capability.
|
||||
// DON'T attempt to access 'damagecustom' var if feature status != available
|
||||
Action:public(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon,
|
||||
Float:damageForce[3], Float:damagePosition[3], damagecustom),
|
||||
|
||||
// OnTakeDamagePost
|
||||
public(victim, attacker, inflictor, Float:damage, damagetype),
|
||||
// FireBullets
|
||||
public(victim, attacker, inflictor, Float:damage, damagetype, weapon, const Float:damageForce[3], const Float:damagePosition[3]),
|
||||
|
||||
// FireBulletsPost
|
||||
public(client, shots, const String:weaponname[]),
|
||||
|
||||
// TraceAttack
|
||||
Action:public(victim, &attacker, &inflictor, &Float:damage, &damagetype, &ammotype, hitbox, hitgroup),
|
||||
|
||||
// TraceAttackPost
|
||||
public(victim, attacker, inflictor, Float:damage, damagetype, ammotype, hitbox, hitgroup),
|
||||
|
||||
// ShouldCollide
|
||||
Action:public(entity, &collisiongroup, &contentsmask, &bool:result)
|
||||
bool:public(entity, collisiongroup, contentsmask, bool:originalResult),
|
||||
|
||||
// Use
|
||||
Action:public(entity, activator, caller, UseType:type, Float:value),
|
||||
|
||||
// UsePost
|
||||
public(entity, activator, caller, UseType:type, Float:value),
|
||||
|
||||
// Reload
|
||||
Action:public(weapon),
|
||||
|
||||
// Reload post
|
||||
public(weapon, bool:bSuccessful)
|
||||
};
|
||||
|
||||
|
||||
@ -147,6 +299,8 @@ forward OnEntityDestroyed(entity);
|
||||
/**
|
||||
* @brief When the game description is retrieved
|
||||
*
|
||||
* @note Not supported on ep2v.
|
||||
*
|
||||
* @param gameDesc Game description
|
||||
* @noreturn
|
||||
*/
|
||||
@ -191,11 +345,41 @@ native bool:SDKHookEx(entity, SDKHookType:type, SDKHookCB:callback);
|
||||
*/
|
||||
native SDKUnhook(entity, SDKHookType:type, SDKHookCB:callback);
|
||||
|
||||
/** Do Not Edit Below This Line **/
|
||||
/**
|
||||
* @brief Applies damage to an entity
|
||||
*
|
||||
* @note Force application is dependent on game and damage type(s)
|
||||
*
|
||||
* @param entity Entity index taking damage
|
||||
* @param inflictor Inflictor entity index
|
||||
* @param attacker Attacker entity index
|
||||
* @param damage Amount of damage
|
||||
* @param damageType Bitfield of damage types
|
||||
* @param weapon Weapon index (orangebox and later) or -1 for unspecified
|
||||
* @param damageForce Velocity of damage force
|
||||
* @param damagePosition Origin of damage
|
||||
* @noreturn
|
||||
*/
|
||||
native SDKHooks_TakeDamage(entity, inflictor, attacker, Float:damage, damageType=DMG_GENERIC, weapon=-1, const Float:damageForce[3]=NULL_VECTOR, const Float:damagePosition[3]=NULL_VECTOR);
|
||||
|
||||
public Extension:__ext_sdkhooks =
|
||||
/**
|
||||
* @brief Forces a client to drop the specified weapon
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param weapon Weapon entity index.
|
||||
* @param vecTarget Location to toss weapon to, or NULL_VECTOR for default.
|
||||
* @param vecVelocity Velocity at which to toss weapon, or NULL_VECTOR for default.
|
||||
* @noreturn
|
||||
* @error Invalid client or weapon entity, weapon not owned by client.
|
||||
*/
|
||||
native SDKHooks_DropWeapon(client, weapon, const Float:vecTarget[3]=NULL_VECTOR, const Float:vecVelocity[3]=NULL_VECTOR);
|
||||
|
||||
/**
|
||||
* Do not edit below this line!
|
||||
*/
|
||||
public Extension:__ext_sdkhooks =
|
||||
{
|
||||
name = "sdkhooks",
|
||||
name = "SDKHooks",
|
||||
file = "sdkhooks.ext",
|
||||
#if defined AUTOLOAD_EXTENSIONS
|
||||
autoload = 1,
|
||||
@ -207,4 +391,4 @@ public Extension:__ext_sdkhooks =
|
||||
#else
|
||||
required = 0,
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
16
env/include/sdktools.inc
vendored
16
env/include/sdktools.inc
vendored
@ -72,6 +72,7 @@ enum SDKFuncConfSource
|
||||
{
|
||||
SDKConf_Virtual = 0, /**< Read a virtual index from the Offsets section */
|
||||
SDKConf_Signature = 1, /**< Read a signature from the Signatures section */
|
||||
SDKConf_Address = 2, /**< Read an address from the Addresses section */
|
||||
};
|
||||
|
||||
enum SDKType
|
||||
@ -130,6 +131,14 @@ native PrepSDKCall_SetVirtual(vtblidx);
|
||||
*/
|
||||
native bool:PrepSDKCall_SetSignature(SDKLibrary:lib, const String:signature[], bytes);
|
||||
|
||||
/**
|
||||
* Uses the given function address for the SDK call.
|
||||
*
|
||||
* @param addr Address of function to use.
|
||||
* @return True on success, false on failure.
|
||||
*/
|
||||
native bool:PrepSDKCall_SetAddress(Address:addr);
|
||||
|
||||
/**
|
||||
* Finds an address or virtual function index in a GameConfig file and sets it as
|
||||
* the calling information for the SDK call.
|
||||
@ -194,6 +203,13 @@ native Handle:EndPrepSDKCall();
|
||||
*/
|
||||
native any:SDKCall(Handle:call, any:...);
|
||||
|
||||
/**
|
||||
* Returns the entity index of the player resource/manager entity.
|
||||
*
|
||||
* @return Index of resource entity or -1 if not found.
|
||||
*/
|
||||
native GetPlayerResourceEntity();
|
||||
|
||||
#include <sdktools_stocks>
|
||||
|
||||
/**
|
||||
|
2
env/include/sdktools_entinput.inc
vendored
2
env/include/sdktools_entinput.inc
vendored
@ -109,7 +109,7 @@ native SetVariantColor(const color[4]);
|
||||
/**
|
||||
* Sets an entity in the global variant object.
|
||||
*
|
||||
* @param Entity index.
|
||||
* @param entity Entity index.
|
||||
* @noreturn
|
||||
* @error Invalid entity index.
|
||||
*/
|
||||
|
34
env/include/sdktools_functions.inc
vendored
34
env/include/sdktools_functions.inc
vendored
@ -81,13 +81,13 @@ native GetPlayerWeaponSlot(client, slot);
|
||||
native IgniteEntity(entity, Float:time, bool:npc=false, Float:size=0.0, bool:level=false);
|
||||
|
||||
/**
|
||||
* Extinguishes a player that is on fire.
|
||||
* Extinguishes an entity that is on fire.
|
||||
*
|
||||
* @param entity Entity index.
|
||||
* @noreturn
|
||||
* @error Invalid entity or client not in game, or lack of mod support.
|
||||
*/
|
||||
native ExtinguishEntity(client);
|
||||
native ExtinguishEntity(entity);
|
||||
|
||||
/**
|
||||
* Teleports an entity.
|
||||
@ -194,7 +194,7 @@ native bool:DispatchKeyValueFloat(entity, const String:keyName[], Float:value);
|
||||
* @return True on success, false otherwise.
|
||||
* @error Invalid entity index, or no mod support.
|
||||
*/
|
||||
native bool:DispatchKeyValueVector(entity, const String:keyName[], const Float:vector[3]);
|
||||
native bool:DispatchKeyValueVector(entity, const String:keyName[], const Float:vec[3]);
|
||||
|
||||
/**
|
||||
* Returns the entity a client is aiming at.
|
||||
@ -270,7 +270,7 @@ native GetTeamClientCount(index);
|
||||
native SetEntityModel(entity, const String:model[]);
|
||||
|
||||
/**
|
||||
* Retrieves the decal file name associated to a given client.
|
||||
* Retrieves the decal file name associated with a given client.
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param hex Buffer to store the logo filename.
|
||||
@ -280,6 +280,17 @@ native SetEntityModel(entity, const String:model[]);
|
||||
*/
|
||||
native bool:GetPlayerDecalFile(client, String:hex[], maxlength);
|
||||
|
||||
/**
|
||||
* Retrieves the jingle file name associated with a given client.
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param hex Buffer to store the jingle filename.
|
||||
* @param maxlength Maximum length of string buffer.
|
||||
* @return True on success, otherwise false.
|
||||
* @error Invalid client or client not in game.
|
||||
*/
|
||||
native bool:GetPlayerJingleFile(client, String:hex[], maxlength);
|
||||
|
||||
/**
|
||||
* Returns the average server network traffic in bytes/sec.
|
||||
*
|
||||
@ -293,7 +304,7 @@ native GetServerNetStats(&Float:in, &Float:out);
|
||||
* Equip's a player's weapon.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param item CBaseCombatWeapon entity index.
|
||||
* @param weapon CBaseCombatWeapon entity index.
|
||||
* @noreturn
|
||||
* @error Invalid client or entity, lack of mod support, or client not in
|
||||
* game.
|
||||
@ -320,3 +331,16 @@ native ActivateEntity(entity);
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native SetClientInfo(client, const String:key[], const String:value[]);
|
||||
|
||||
/**
|
||||
* Gives ammo of a certain type to a player.
|
||||
* This natives obeys the maximum amount of ammo a player can carry per ammo type.
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param amount Amount of ammo to give. Is capped at ammotype's limit.
|
||||
* @param ammotype Type of ammo to give to player.
|
||||
* @param suppressSound If true, don't play the ammo pickup sound.
|
||||
*
|
||||
* @return Amount of ammo actually given.
|
||||
*/
|
||||
native GivePlayerAmmo(client, amount, ammotype, bool:suppressSound=false);
|
8
env/include/sdktools_gamerules.inc
vendored
8
env/include/sdktools_gamerules.inc
vendored
@ -66,6 +66,9 @@ enum RoundState {
|
||||
|
||||
//Game is over, doing bonus round stuff
|
||||
RoundState_Bonus,
|
||||
|
||||
//Between rounds
|
||||
RoundState_BetweenRounds,
|
||||
};
|
||||
|
||||
/**
|
||||
@ -90,6 +93,7 @@ native GameRules_GetProp(const String:prop[], size=4, element=0);
|
||||
* This value is auto-detected, and the size parameter is
|
||||
* only used as a fallback in case detection fails.
|
||||
* @param element Element # (starting from 0) if property is an array.
|
||||
* @param changeState If true, change will be sent over the network.
|
||||
* @error Not supported.
|
||||
* @noreturn
|
||||
*/
|
||||
@ -111,6 +115,7 @@ native Float:GameRules_GetPropFloat(const String:prop[], element=0);
|
||||
* @param prop Property name.
|
||||
* @param value Value to set.
|
||||
* @param element Element # (starting from 0) if property is an array.
|
||||
* @param changeState If true, change will be sent over the network.
|
||||
* @noreturn
|
||||
* @error Not supported.
|
||||
*/
|
||||
@ -134,6 +139,7 @@ native GameRules_GetPropEnt(const String:prop[], element=0);
|
||||
* @param prop Property name.
|
||||
* @param other Entity index to set, or -1 to unset.
|
||||
* @param element Element # (starting from 0) if property is an array.
|
||||
* @param changeState If true, change will be sent over the network.
|
||||
* @noreturn
|
||||
* @error Not supported.
|
||||
*/
|
||||
@ -156,6 +162,7 @@ native GameRules_GetPropVector(const String:prop[], Float:vec[3], element=0);
|
||||
* @param prop Property name.
|
||||
* @param vec Vector to set.
|
||||
* @param element Element # (starting from 0) if property is an array.
|
||||
* @param changeState If true, change will be sent over the network.
|
||||
* @noreturn
|
||||
* @error Not supported.
|
||||
*/
|
||||
@ -177,6 +184,7 @@ native GameRules_GetPropString(const String:prop[], String:buffer[], maxlen);
|
||||
*
|
||||
* @param prop Property to use.
|
||||
* @param buffer String to set.
|
||||
* @param changeState If true, change will be sent over the network.
|
||||
* @return Number of non-null bytes written.
|
||||
* @error Not supported.
|
||||
*/
|
||||
|
12
env/include/sdktools_hooks.inc
vendored
12
env/include/sdktools_hooks.inc
vendored
@ -35,6 +35,8 @@
|
||||
#endif
|
||||
#define _sdktools_hooks_included
|
||||
|
||||
#define FEATURECAP_PLAYERRUNCMD_11PARAMS "SDKTools PlayerRunCmd 11Params"
|
||||
|
||||
/**
|
||||
* @brief Called when a clients movement buttons are being processed
|
||||
*
|
||||
@ -44,6 +46,14 @@
|
||||
* @param vel Players desired velocity.
|
||||
* @param angles Players desired view angles.
|
||||
* @param weapon Entity index of the new weapon if player switches weapon, 0 otherwise.
|
||||
* @param subtype Weapon subtype when selected from a menu.
|
||||
* @param cmdnum Command number. Increments from the first command sent.
|
||||
* @param tickcount Tick count. A client's prediction based on the server's GetGameTickCount value.
|
||||
* @param seed Random seed. Used to determine weapon recoil, spread, and other predicted elements.
|
||||
* @param mouse Mouse direction (x, y).
|
||||
* @return Plugin_Handled to block the commands from being processed, Plugin_Continue otherwise.
|
||||
*
|
||||
* @note To see if all 11 params are avaliable, use FeatureType_Capability and
|
||||
* FEATURECAP_PLAYERRUNCMD_11PARAMS.
|
||||
*/
|
||||
forward Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon);
|
||||
forward Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon, &subtype, &cmdnum, &tickcount, &seed, mouse[2]);
|
2
env/include/sdktools_sound.inc
vendored
2
env/include/sdktools_sound.inc
vendored
@ -127,7 +127,7 @@ enum
|
||||
* @param name Sound file name relative to the "sounds" folder.
|
||||
* @noreturn
|
||||
*/
|
||||
native PrefetchSound(const String:nane[]);
|
||||
native PrefetchSound(const String:name[]);
|
||||
|
||||
/**
|
||||
* This function is not known to work, and may crash. You should
|
||||
|
12
env/include/sdktools_stringtables.inc
vendored
12
env/include/sdktools_stringtables.inc
vendored
@ -86,7 +86,7 @@ native GetStringTableName(tableidx, String:name[], maxlength);
|
||||
* Searches for the index of a given string in a string table.
|
||||
*
|
||||
* @param tableidx A string table index.
|
||||
* @param string String to find.
|
||||
* @param str String to find.
|
||||
* @return String index if found, INVALID_STRING_INDEX otherwise.
|
||||
* @error Invalid string table index.
|
||||
*/
|
||||
@ -97,12 +97,12 @@ native FindStringIndex(tableidx, const String:str[]);
|
||||
*
|
||||
* @param tableidx A string table index.
|
||||
* @param stringidx A string index.
|
||||
* @param name Buffer to store the string value.
|
||||
* @param str Buffer to store the string value.
|
||||
* @param maxlength Maximum length of string buffer.
|
||||
* @return Number of bytes written to the buffer (UTF-8 safe).
|
||||
* @error Invalid string table index or string index.
|
||||
*/
|
||||
native ReadStringTable(tableidx, stringIdx, String:str[], maxlength);
|
||||
native ReadStringTable(tableidx, stringidx, String:str[], maxlength);
|
||||
|
||||
/**
|
||||
* Returns the length of the user data associated with a given string index.
|
||||
@ -124,7 +124,7 @@ native GetStringTableDataLength(tableidx, stringidx);
|
||||
* @return Number of bytes written to the buffer (UTF-8 safe).
|
||||
* @error Invalid string table index or string index.
|
||||
*/
|
||||
native GetStringTableData(tableidx, stringIdx, String:userdata[], maxlength);
|
||||
native GetStringTableData(tableidx, stringidx, String:userdata[], maxlength);
|
||||
|
||||
/**
|
||||
* Sets the user data associated with a given string index.
|
||||
@ -136,13 +136,13 @@ native GetStringTableData(tableidx, stringIdx, String:userdata[], maxlength);
|
||||
* @return Number of bytes written to the buffer (UTF-8 safe).
|
||||
* @error Invalid string table index or string index.
|
||||
*/
|
||||
native SetStringTableData(tableidx, stringIdx, const String:userdata[], length);
|
||||
native SetStringTableData(tableidx, stringidx, const String:userdata[], length);
|
||||
|
||||
/**
|
||||
* Adds a string to a given string table.
|
||||
*
|
||||
* @param tableidx A string table index.
|
||||
* @param string String to add.
|
||||
* @param str String to add.
|
||||
* @param userdata An optional user data string.
|
||||
* @param length Length of user data string. This should include the null terminator.
|
||||
* If set to -1, then user data will be not be altered if the specified string
|
||||
|
12
env/include/sdktools_tempents_stocks.inc
vendored
12
env/include/sdktools_tempents_stocks.inc
vendored
@ -100,7 +100,7 @@ stock TE_SetupSparks(const Float:pos[3], const Float:dir[3], Magnitude, TrailLen
|
||||
* @param pos Position of the smoke.
|
||||
* @param Model Precached model index.
|
||||
* @param Scale Scale of the smoke.
|
||||
* @param Framerate Frame rate of the smoke.
|
||||
* @param FrameRate Frame rate of the smoke.
|
||||
* @noreturn
|
||||
*/
|
||||
stock TE_SetupSmoke(const Float:pos[3], Model, Float:Scale, FrameRate)
|
||||
@ -278,7 +278,7 @@ stock TE_SetupBloodSprite(const Float:pos[3], const Float:dir[3], const color[4]
|
||||
* @param Life Time duration of the ring.
|
||||
* @param Width Beam width.
|
||||
* @param Amplitude Beam amplitude.
|
||||
* @param color Color array (r, g, b, a).
|
||||
* @param Color Color array (r, g, b, a).
|
||||
* @param Speed Speed of the beam.
|
||||
* @param Flags Beam flags.
|
||||
* @noreturn
|
||||
@ -321,7 +321,7 @@ stock TE_SetupBeamRingPoint(const Float:center[3], Float:Start_Radius, Float:End
|
||||
* @param EndWidth Final beam width.
|
||||
* @param FadeLength Beam fade time duration.
|
||||
* @param Amplitude Beam amplitude.
|
||||
* @param color Color array (r, g, b, a).
|
||||
* @param Color Color array (r, g, b, a).
|
||||
* @param Speed Speed of the beam.
|
||||
* @noreturn
|
||||
*/
|
||||
@ -361,7 +361,7 @@ stock TE_SetupBeamPoints(const Float:start[3], const Float:end[3], ModelIndex, H
|
||||
* @param EndWidth Final beam width.
|
||||
* @param FadeLength Beam fade time duration.
|
||||
* @param Amplitude Beam amplitude.
|
||||
* @param color Color array (r, g, b, a).
|
||||
* @param Color Color array (r, g, b, a).
|
||||
* @param Speed Speed of the beam.
|
||||
* @noreturn
|
||||
*/
|
||||
@ -399,7 +399,7 @@ stock TE_SetupBeamLaser(StartEntity, EndEntity, ModelIndex, HaloIndex, StartFram
|
||||
* @param Life Time duration of the ring.
|
||||
* @param Width Beam width.
|
||||
* @param Amplitude Beam amplitude.
|
||||
* @param color Color array (r, g, b, a).
|
||||
* @param Color Color array (r, g, b, a).
|
||||
* @param Speed Speed of the beam.
|
||||
* @param Flags Beam flags.
|
||||
* @noreturn
|
||||
@ -436,7 +436,7 @@ stock TE_SetupBeamRing(StartEntity, EndEntity, ModelIndex, HaloIndex, StartFrame
|
||||
* @param Width Initial beam width.
|
||||
* @param EndWidth Final beam width.
|
||||
* @param FadeLength Beam fade time duration.
|
||||
* @param color Color array (r, g, b, a).
|
||||
* @param Color Color array (r, g, b, a).
|
||||
* @noreturn
|
||||
*/
|
||||
stock TE_SetupBeamFollow(EntIndex, ModelIndex, HaloIndex, Float:Life, Float:Width, Float:EndWidth, FadeLength, const Color[4])
|
||||
|
3
env/include/sdktools_voice.inc
vendored
3
env/include/sdktools_voice.inc
vendored
@ -78,6 +78,7 @@ native GetClientListeningFlags(client);
|
||||
*
|
||||
* @param iReceiver The listener index.
|
||||
* @param iSender The sender index.
|
||||
* @param bListen True if the receiver can listen to the sender, false otherwise.
|
||||
* @return True if successful otherwise false.
|
||||
*/
|
||||
#pragma deprecated Use SetListenOverride() instead
|
||||
@ -98,7 +99,7 @@ native bool:GetClientListening(iReceiver, iSender);
|
||||
*
|
||||
* @param iReceiver The listener index.
|
||||
* @param iSender The sender index.
|
||||
* @param override
|
||||
* @param override The override of the receiver's ability to listen to the sender.
|
||||
* @return True if successful otherwise false.
|
||||
*/
|
||||
native bool:SetListenOverride(iReceiver, iSender, ListenOverride:override);
|
||||
|
6
env/include/sorting.inc
vendored
6
env/include/sorting.inc
vendored
@ -84,7 +84,7 @@ native SortFloats(Float:array[], array_size, SortOrder:order = Sort_Ascending);
|
||||
* @param order Sorting order to use.
|
||||
* @noreturn
|
||||
*/
|
||||
native SortStrings(String:array[][], num_strings, SortOrder:order = Sort_Ascending);
|
||||
native SortStrings(String:array[][], array_size, SortOrder:order = Sort_Ascending);
|
||||
|
||||
/**
|
||||
* Sort comparison function for 1D array elements.
|
||||
@ -125,8 +125,8 @@ native SortCustom1D(array[], array_size, SortFunc1D:sortfunc, Handle:hndl=INVALI
|
||||
*/
|
||||
funcenum SortFunc2D
|
||||
{
|
||||
public(array[], array[], const array[][], Handle:hndl),
|
||||
public(String:array[], String:array[], const String:array[][], Handle:hndl),
|
||||
public(elem1[], elem2[], const array[][], Handle:hndl),
|
||||
public(String:elem1[], String:elem2[], const String:array[][], Handle:hndl),
|
||||
};
|
||||
|
||||
/**
|
||||
|
7
env/include/sourcemod.inc
vendored
7
env/include/sourcemod.inc
vendored
@ -66,6 +66,7 @@ struct Plugin
|
||||
#include <console>
|
||||
#include <events>
|
||||
#include <bitbuffer>
|
||||
#include <protobuf>
|
||||
#include <usermessages>
|
||||
#include <menus>
|
||||
#include <halflife>
|
||||
@ -277,7 +278,7 @@ native GetPluginFilename(Handle:plugin, String:buffer[], maxlength);
|
||||
* @return True if being debugged, false otherwise.
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
native bool:IsPluginDebugging(Handle:hndl);
|
||||
native bool:IsPluginDebugging(Handle:plugin);
|
||||
|
||||
/**
|
||||
* Retrieves a plugin's public info.
|
||||
@ -327,7 +328,7 @@ native SetFailState(const String:string[], any:...);
|
||||
* Aborts the current callback and throws an error. This function
|
||||
* does not return in that no code is executed following it.
|
||||
*
|
||||
* @param format String format.
|
||||
* @param fmt String format.
|
||||
* @param ... Format arguments.
|
||||
* @noreturn
|
||||
* @error Always!
|
||||
@ -386,7 +387,7 @@ native GameConfGetOffset(Handle:gc, const String:key[]);
|
||||
*/
|
||||
native bool:GameConfGetKeyValue(Handle:gc, const String:key[], String:buffer[], maxlen);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Finds an address calculation in a GameConfig file,
|
||||
* performs LoadFromAddress on it as appropriate, then returns the final address.
|
||||
*
|
||||
|
14
env/include/string.inc
vendored
14
env/include/string.inc
vendored
@ -119,7 +119,7 @@ stock bool:StrEqual(const String:str1[], const String:str2[], bool:caseSensitive
|
||||
* destination will be truncated.
|
||||
*
|
||||
* @param dest Destination string buffer to copy to.
|
||||
* @param destlen Destination buffer length (includes null terminator).
|
||||
* @param destLen Destination buffer length (includes null terminator).
|
||||
* @param source Source string buffer to copy from.
|
||||
* @return Number of cells written.
|
||||
*/
|
||||
@ -323,7 +323,7 @@ native GetCharBytes(const String:source[]);
|
||||
*
|
||||
* @note Multi-byte characters will always return false.
|
||||
*
|
||||
* @param char Character to test.
|
||||
* @param chr Character to test.
|
||||
* @return True if character is alphabetical, otherwise false.
|
||||
*/
|
||||
native bool:IsCharAlpha(chr);
|
||||
@ -333,7 +333,7 @@ native bool:IsCharAlpha(chr);
|
||||
*
|
||||
* @note Multi-byte characters will always return false.
|
||||
*
|
||||
* @param char Character to test.
|
||||
* @param chr Character to test.
|
||||
* @return True if character is numeric, otherwise false.
|
||||
*/
|
||||
native bool:IsCharNumeric(chr);
|
||||
@ -343,7 +343,7 @@ native bool:IsCharNumeric(chr);
|
||||
*
|
||||
* @note Multi-byte characters will always return false.
|
||||
*
|
||||
* @param char Character to test.
|
||||
* @param chr Character to test.
|
||||
* @return True if character is whitespace, otherwise false.
|
||||
*/
|
||||
native bool:IsCharSpace(chr);
|
||||
@ -351,7 +351,7 @@ native bool:IsCharSpace(chr);
|
||||
/**
|
||||
* Returns if a character is multi-byte or not.
|
||||
*
|
||||
* @param char Character to test.
|
||||
* @param chr Character to test.
|
||||
* @return 0 for a normal 7-bit ASCII character,
|
||||
* otherwise number of bytes in multi-byte character.
|
||||
*/
|
||||
@ -362,7 +362,7 @@ native IsCharMB(chr);
|
||||
*
|
||||
* @note Multi-byte characters will always return false.
|
||||
*
|
||||
* @param char Character to test.
|
||||
* @param chr Character to test.
|
||||
* @return True if character is uppercase, otherwise false.
|
||||
*/
|
||||
native bool:IsCharUpper(chr);
|
||||
@ -372,7 +372,7 @@ native bool:IsCharUpper(chr);
|
||||
*
|
||||
* @note Multi-byte characters will always return false.
|
||||
*
|
||||
* @param char Character to test.
|
||||
* @param chr Character to test.
|
||||
* @return True if character is lowercase, otherwise false.
|
||||
*/
|
||||
native bool:IsCharLower(chr);
|
||||
|
72
env/include/testing.inc
vendored
Normal file
72
env/include/testing.inc
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
/**
|
||||
* vim: set ts=4 sw=4 tw=99 noet :
|
||||
* =============================================================================
|
||||
* SourceMod (C)2004-2014 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This file is part of the SourceMod/SourcePawn SDK.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||
* this exception to all derivative works. AlliedModders LLC defines further
|
||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||
* or <http://www.sourcemod.net/license.php>.
|
||||
*
|
||||
* Version: $Id$
|
||||
*/
|
||||
|
||||
static TestNumber = 0;
|
||||
static String:TestContext[255];
|
||||
|
||||
SetTestContext(const String:context[])
|
||||
{
|
||||
strcopy(TestContext, sizeof(TestContext), context);
|
||||
}
|
||||
|
||||
AssertEq(const String:text[], cell1, cell2)
|
||||
{
|
||||
TestNumber++;
|
||||
if (cell1 == cell2) {
|
||||
PrintToServer("[%d] %s: %s == %d OK", TestNumber, TestContext, text, cell2);
|
||||
} else {
|
||||
PrintToServer("[%d] %s FAIL: %s should be %d, got %d", TestNumber, TestContext, text, cell2, cell1);
|
||||
ThrowError("test %d (%s in %s) failed", TestNumber, text, TestContext);
|
||||
}
|
||||
}
|
||||
|
||||
AssertFalse(const String:text[], bool:value)
|
||||
{
|
||||
TestNumber++;
|
||||
if (!value) {
|
||||
PrintToServer("[%d] %s: %s == false OK", TestNumber, TestContext, text, value);
|
||||
} else {
|
||||
PrintToServer("[%d] %s FAIL: %s should be false, got true", TestNumber, TestContext, text);
|
||||
ThrowError("test %d (%s in %s) failed", TestNumber, text, TestContext);
|
||||
}
|
||||
}
|
||||
|
||||
AssertTrue(const String:text[], bool:value)
|
||||
{
|
||||
TestNumber++;
|
||||
if (value) {
|
||||
PrintToServer("[%d] %s: %s == true OK", TestNumber, TestContext, text, value);
|
||||
} else {
|
||||
PrintToServer("[%d] %s FAIL: %s should be true, got false", TestNumber, TestContext, text);
|
||||
ThrowError("test %d (%s in %s) failed", TestNumber, text, TestContext);
|
||||
}
|
||||
}
|
106
env/include/tf2.inc
vendored
106
env/include/tf2.inc
vendored
@ -35,13 +35,13 @@
|
||||
#endif
|
||||
#define _tf2_included
|
||||
|
||||
#define TF_STUNFLAG_SLOWDOWN (1 << 0) // activates slowdown modifier
|
||||
#define TF_STUNFLAG_BONKSTUCK (1 << 1) // bonk sound, stuck
|
||||
#define TF_STUNFLAG_LIMITMOVEMENT (1 << 2) // disable forward/backward movement
|
||||
#define TF_STUNFLAG_CHEERSOUND (1 << 3) // cheering sound
|
||||
#define TF_STUNFLAG_NOSOUNDOREFFECT (1 << 5) // no sound or particle
|
||||
#define TF_STUNFLAG_THIRDPERSON (1 << 6) // panic animation
|
||||
#define TF_STUNFLAG_GHOSTEFFECT (1 << 7) // ghost particles
|
||||
#define TF_STUNFLAG_SLOWDOWN (1 << 0) /**< activates slowdown modifier */
|
||||
#define TF_STUNFLAG_BONKSTUCK (1 << 1) /**< bonk sound, stuck */
|
||||
#define TF_STUNFLAG_LIMITMOVEMENT (1 << 2) /**< disable forward/backward movement */
|
||||
#define TF_STUNFLAG_CHEERSOUND (1 << 3) /**< cheering sound */
|
||||
#define TF_STUNFLAG_NOSOUNDOREFFECT (1 << 5) /**< no sound or particle */
|
||||
#define TF_STUNFLAG_THIRDPERSON (1 << 6) /**< panic animation */
|
||||
#define TF_STUNFLAG_GHOSTEFFECT (1 << 7) /**< ghost particles */
|
||||
|
||||
#define TF_STUNFLAGS_LOSERSTATE TF_STUNFLAG_SLOWDOWN|TF_STUNFLAG_NOSOUNDOREFFECT|TF_STUNFLAG_THIRDPERSON
|
||||
#define TF_STUNFLAGS_GHOSTSCARE TF_STUNFLAG_GHOSTEFFECT|TF_STUNFLAG_THIRDPERSON
|
||||
@ -107,23 +107,67 @@ enum TFCond
|
||||
TFCond_RegenBuffed,
|
||||
TFCond_MarkedForDeath,
|
||||
TFCond_NoHealingDamageBuff,
|
||||
TFCond_SpeedBuffAlly,
|
||||
TFCond_SpeedBuffAlly, //32
|
||||
TFCond_HalloweenCritCandy,
|
||||
|
||||
TFCond_CritHype = 36,
|
||||
TFCond_CritCanteen,
|
||||
TFCond_CritDemoCharge,
|
||||
TFCond_CritHype,
|
||||
TFCond_CritOnFirstBlood,
|
||||
TFCond_CritOnWin,
|
||||
TFCond_CritOnFlagCapture,
|
||||
TFCond_CritOnKill,
|
||||
TFCond_RestrictToMelee
|
||||
TFCond_RestrictToMelee,
|
||||
TFCond_DefenseBuffNoCritBlock,
|
||||
TFCond_Reprogrammed,
|
||||
TFCond_CritMmmph,
|
||||
TFCond_DefenseBuffMmmph,
|
||||
TFCond_FocusBuff,
|
||||
TFCond_DisguiseRemoved,
|
||||
TFCond_MarkedForDeathSilent,
|
||||
TFCond_DisguisedAsDispenser,
|
||||
TFCond_Sapped,
|
||||
TFCond_UberchargedHidden,
|
||||
TFCond_UberchargedCanteen,
|
||||
TFCond_HalloweenBombHead,
|
||||
TFCond_HalloweenThriller,
|
||||
TFCond_RadiusHealOnDamage,
|
||||
TFCond_CritOnDamage,
|
||||
TFCond_UberchargedOnTakeDamage,
|
||||
TFCond_UberBulletResist,
|
||||
TFCond_UberBlastResist,
|
||||
TFCond_UberFireResist,
|
||||
TFCond_SmallBulletResist,
|
||||
TFCond_SmallBlastResist,
|
||||
TFCond_SmallFireResist,
|
||||
TFCond_Stealthed, // 64
|
||||
TFCond_MedigunDebuff,
|
||||
TFCond_StealthedUserBuffFade,
|
||||
TFCond_BulletImmune,
|
||||
TFCond_BlastImmune,
|
||||
TFCond_FireImmune,
|
||||
TFCond_PreventDeath,
|
||||
TFCond_MVMBotRadiowave,
|
||||
TFCond_HalloweenSpeedBoost,
|
||||
TFCond_HalloweenQuickHeal,
|
||||
TFCond_HalloweenGiant,
|
||||
TFCond_HalloweenTiny,
|
||||
TFCond_HalloweenInHell,
|
||||
TFCond_HalloweenGhostMode,
|
||||
};
|
||||
|
||||
const Float:TFCondDuration_Infinite = -1.0;
|
||||
|
||||
enum TFHoliday
|
||||
{
|
||||
TFHoliday_Birthday = 1,
|
||||
TFHoliday_Halloween,
|
||||
TFHoliday_Christmas,
|
||||
TFHoliday_ValentinesDay,
|
||||
TFHoliday_MeetThePyro,
|
||||
TFHoliday_FullMoon,
|
||||
TFHoliday_HalloweenOrFullMoon,
|
||||
TFHoliday_HalloweenOrFullMoonOrValentines,
|
||||
TFHoliday_AprilFools,
|
||||
};
|
||||
|
||||
enum TFObjectType
|
||||
@ -146,10 +190,11 @@ enum TFObjectMode
|
||||
* Sets a client on fire for 10 seconds.
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param attacker Attacker's index.
|
||||
* @noreturn
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native TF2_IgnitePlayer(client, target);
|
||||
native TF2_IgnitePlayer(client, attacker);
|
||||
|
||||
/**
|
||||
* Respawns a client
|
||||
@ -175,10 +220,12 @@ native TF2_RegeneratePlayer(client);
|
||||
* @param client Player's index.
|
||||
* @param condition Integer identifier of condition to apply.
|
||||
* @param duration Duration of condition (does not apply to all conditions).
|
||||
* Pass TFCondDuration_Infinite to apply until manually removed.
|
||||
* @param inflictor Condition inflictor's index (0 for no inflictor).
|
||||
* @noreturn
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native TF2_AddCondition(client, TFCond:condition, Float:duration);
|
||||
native TF2_AddCondition(client, TFCond:condition, Float:duration=TFCondDuration_Infinite, inflictor=0);
|
||||
|
||||
/**
|
||||
* Removes a condition from a player
|
||||
@ -227,10 +274,10 @@ native TF2_RemovePlayerDisguise(client);
|
||||
* Stuns a client
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param float Duration of stun.
|
||||
* @param float Slowdown percent (as decimal, 0.00-1.00)
|
||||
* (ignored if TF_STUNFLAG_SLOWDOWN is not set.
|
||||
* @param int Stun flags.
|
||||
* @param duration Duration of stun.
|
||||
* @param slowdown Slowdown percent (as decimal, 0.00-1.00)
|
||||
* Ignored if TF_STUNFLAG_SLOWDOWN is not set.
|
||||
* @param stunflags Stun flags.
|
||||
* @param attacker Attacker's index (0 is allowed for world).
|
||||
* @noreturn
|
||||
*/
|
||||
@ -241,7 +288,7 @@ native TF2_StunPlayer(client, Float:duration, Float:slowdown=0.0, stunflags, att
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param attacker Attacker's index.
|
||||
* @param float Duration of bleeding (in seconds).
|
||||
* @param duration Duration of bleeding (in seconds).
|
||||
* @noreturn
|
||||
*/
|
||||
native TF2_MakeBleed(client, attacker, Float:duration);
|
||||
@ -251,6 +298,7 @@ native TF2_MakeBleed(client, attacker, Float:duration);
|
||||
*
|
||||
* @return The current resource entity index.
|
||||
*/
|
||||
#pragma deprecated Use GetPlayerResourceEntity instead
|
||||
native TF2_GetResourceEntity();
|
||||
|
||||
/**
|
||||
@ -295,6 +343,14 @@ forward Action:TF2_OnGetHoliday(&TFHoliday:holiday);
|
||||
*/
|
||||
forward Action:TF2_OnIsHolidayActive(TFHoliday:holiday, &bool:result);
|
||||
|
||||
/**
|
||||
* Returns whether or not a holiday is active
|
||||
*
|
||||
* @param holiday Holiday being checked.
|
||||
* @return Boolean of whether or not the holiday is active.
|
||||
*/
|
||||
native bool:TF2_IsHolidayActive(TFHoliday:holiday);
|
||||
|
||||
/**
|
||||
* Returns whether or not a client (Player) is in a duel.
|
||||
*
|
||||
@ -335,6 +391,19 @@ forward TF2_OnWaitingForPlayersStart();
|
||||
*/
|
||||
forward TF2_OnWaitingForPlayersEnd();
|
||||
|
||||
/**
|
||||
* Called when a player attempts to use a teleporter to decide if the player should be allowed to teleport.
|
||||
* Return Plugin_Continue to let the original calculation or return a higher
|
||||
* action to override the decision with the value of 'result'
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param teleporter Teleporter entity index.
|
||||
* @param result Buffer param for the result of the decision.
|
||||
* This is prepopulated with the game's original decision to let a player teleport.
|
||||
* @return Plugin_Continue for original calculation, higher value to use 'result'.
|
||||
*/
|
||||
forward Action:TF2_OnPlayerTeleport(client, teleporter, &bool:result);
|
||||
|
||||
/**
|
||||
* Do not edit below this line!
|
||||
*/
|
||||
@ -366,5 +435,6 @@ public __ext_tf2_SetNTVOptional()
|
||||
MarkNativeAsOptional("TF2_GetResourceEntity");
|
||||
MarkNativeAsOptional("TF2_GetClass");
|
||||
MarkNativeAsOptional("TF2_IsPlayerInDuel");
|
||||
MarkNativeAsOptional("TF2_IsHolidayActive");
|
||||
}
|
||||
#endif
|
||||
|
48
env/include/tf2_stocks.inc
vendored
48
env/include/tf2_stocks.inc
vendored
@ -132,6 +132,18 @@ enum {
|
||||
TF_CUSTOM_PLASMA_GIB,
|
||||
TF_CUSTOM_PRACTICE_STICKY,
|
||||
TF_CUSTOM_EYEBALL_ROCKET,
|
||||
TF_CUSTOM_HEADSHOT_DECAPITATION,
|
||||
TF_CUSTOM_TAUNT_ARMAGEDDON,
|
||||
TF_CUSTOM_FLARE_PELLET,
|
||||
TF_CUSTOM_CLEAVER,
|
||||
TF_CUSTOM_CLEAVER_CRIT,
|
||||
TF_CUSTOM_SAPPER_RECORDER_DEATH,
|
||||
TF_CUSTOM_MERASMUS_PLAYER_BOMB,
|
||||
TF_CUSTOM_MERASMUS_GRENADE,
|
||||
TF_CUSTOM_MERASMUS_ZAP,
|
||||
TF_CUSTOM_MERASMUS_DECAPITATION,
|
||||
TF_CUSTOM_CANNONBALL_PUSH,
|
||||
TF_CUSTOM_TAUNT_ALLCLASS_GUITAR_RIFF,
|
||||
};
|
||||
|
||||
// Weapon codes as used in some events, such as player_death
|
||||
@ -218,9 +230,28 @@ enum {
|
||||
TF_WEAPON_RAYGUN,
|
||||
TF_WEAPON_PARTICLE_CANNON,
|
||||
TF_WEAPON_MECHANICAL_ARM,
|
||||
TF_WEAPON_DRG_POMSON,
|
||||
TF_WEAPON_BAT_GIFTWRAP,
|
||||
TF_WEAPON_GRENADE_ORNAMENT,
|
||||
TF_WEAPON_RAYGUN_REVENGE,
|
||||
TF_WEAPON_PEP_BRAWLER_BLASTER,
|
||||
TF_WEAPON_CLEAVER,
|
||||
TF_WEAPON_GRENADE_CLEAVER,
|
||||
TF_WEAPON_STICKY_BALL_LAUNCHER,
|
||||
TF_WEAPON_GRENADE_STICKY_BALL,
|
||||
TF_WEAPON_SHOTGUN_BUILDING_RESCUE,
|
||||
TF_WEAPON_CANNON,
|
||||
TF_WEAPON_THROWABLE,
|
||||
TF_WEAPON_GRENADE_THROWABLE,
|
||||
TF_WEAPON_PDA_SPY_BUILD,
|
||||
TF_WEAPON_GRENADE_WATERBALLOON,
|
||||
TF_WEAPON_HARVESTER_SAW,
|
||||
TF_WEAPON_SPELLBOOK,
|
||||
TF_WEAPON_SPELLBOOK_PROJECTILE,
|
||||
TF_WEAPON_SNIPERRIFLE_CLASSIC,
|
||||
};
|
||||
|
||||
// TF2 Weapon Slots for GetPlayerWeaponSlot
|
||||
// TF2 Weapon Loadout Slots
|
||||
enum
|
||||
{
|
||||
TFWeaponSlot_Primary,
|
||||
@ -328,6 +359,7 @@ stock TF2_SetPlayerClass(client, TFClassType:class, bool:weapons=true, bool:pers
|
||||
* @return Value or -1 on failure.
|
||||
* @error Invalid client index, client not in game or failed to find resource entity.
|
||||
*/
|
||||
#pragma deprecated Use GetPlayerResourceEntity and GetEntProp instead
|
||||
stock TF2_GetPlayerResourceData(client, TFResourceType:type)
|
||||
{
|
||||
if (!IsClientConnected(client))
|
||||
@ -363,6 +395,7 @@ stock TF2_GetPlayerResourceData(client, TFResourceType:type)
|
||||
* @return Value or -1 on failure.
|
||||
* @error Invalid client index, client not in game or failed to find resource entity.
|
||||
*/
|
||||
#pragma deprecated Use GetPlayerResourceEntity and SetEntProp instead
|
||||
stock bool:TF2_SetPlayerResourceData(client, TFResourceType:type, any:value)
|
||||
{
|
||||
if (!IsClientConnected(client))
|
||||
@ -403,7 +436,7 @@ stock TF2_RemoveWeaponSlot(client, slot)
|
||||
while ((weaponIndex = GetPlayerWeaponSlot(client, slot)) != -1)
|
||||
{
|
||||
RemovePlayerItem(client, weaponIndex);
|
||||
RemoveEdict(weaponIndex);
|
||||
AcceptEntityInput(weaponIndex, "Kill");
|
||||
}
|
||||
}
|
||||
|
||||
@ -437,6 +470,7 @@ stock TF2_GetPlayerConditionFlags(client)
|
||||
* Check whether or not a condition is set on a player
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param cond TFCond constant
|
||||
* @return True if set, false otherwise
|
||||
*/
|
||||
stock bool:TF2_IsPlayerInCondition(client, TFCond:cond)
|
||||
@ -455,7 +489,7 @@ stock bool:TF2_IsPlayerInCondition(client, TFCond:cond)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (_:cond < 64)
|
||||
{
|
||||
new bit = (1 << (_:cond - 32));
|
||||
if ((GetEntProp(client, Prop_Send, "m_nPlayerCondEx") & bit) == bit)
|
||||
@ -463,6 +497,14 @@ stock bool:TF2_IsPlayerInCondition(client, TFCond:cond)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
new bit = (1 << (_:cond - 64));
|
||||
if ((GetEntProp(client, Prop_Send, "m_nPlayerCondEx2") & bit) == bit)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
1
env/include/timers.inc
vendored
1
env/include/timers.inc
vendored
@ -92,6 +92,7 @@ native Handle:CreateTimer(Float:interval, Timer:func, any:data=INVALID_HANDLE, f
|
||||
/**
|
||||
* Kills a timer. Use this instead of CloseHandle() if you need more options.
|
||||
*
|
||||
* @param timer Timer Handle to kill.
|
||||
* @param autoClose If autoClose is true, the data that was passed to CreateTimer() will
|
||||
* be closed as a handle if TIMER_DATA_HNDL_CLOSE was not specified.
|
||||
* @noreturn
|
||||
|
30
env/include/topmenus.inc
vendored
30
env/include/topmenus.inc
vendored
@ -178,11 +178,11 @@ native bool:LoadTopMenuConfig(Handle:topmenu, const String:file[], String:error[
|
||||
* @param name Object name (MUST be unique).
|
||||
* @param type Object type.
|
||||
* @param handler Handler for object.
|
||||
* @param cmdname Command name (for access overrides).
|
||||
* @param flags Default access flags.
|
||||
* @param parent Parent object ID, or INVALID_TOPMENUOBJECT for none.
|
||||
* Items must have a category parent.
|
||||
* Categories must not have a parent.
|
||||
* @param cmdname Command name (for access overrides).
|
||||
* @param flags Default access flags.
|
||||
* @param info_string Arbitrary storage (max 255 bytes).
|
||||
* @return A new TopMenuObject ID, or INVALID_TOPMENUOBJECT on
|
||||
* failure.
|
||||
@ -201,7 +201,7 @@ native TopMenuObject:AddToTopMenu(Handle:topmenu,
|
||||
* Retrieves the info string of a top menu item.
|
||||
*
|
||||
* @param topmenu TopMenu Handle.
|
||||
* @param object TopMenuObject ID.
|
||||
* @param parent TopMenuObject ID.
|
||||
* @param buffer Buffer to store info string.
|
||||
* @param maxlength Maximum size of info string.
|
||||
* @return Number of bytes written, not including the
|
||||
@ -247,6 +247,17 @@ native RemoveFromTopMenu(Handle:topmenu, TopMenuObject:object);
|
||||
*/
|
||||
native bool:DisplayTopMenu(Handle:topmenu, client, TopMenuPosition:position);
|
||||
|
||||
/**
|
||||
* Displays a TopMenu category to a client.
|
||||
*
|
||||
* @param topmenu TopMenu Handle.
|
||||
* @param category Category object id.
|
||||
* @param client Client index.
|
||||
* @return True on success, false on failure.
|
||||
* @error Invalid TopMenu Handle or client not in game.
|
||||
*/
|
||||
native bool:DisplayTopMenuCategory(Handle:topmenu, TopMenuObject:category, client);
|
||||
|
||||
/**
|
||||
* Finds a category's object ID in a TopMenu.
|
||||
*
|
||||
@ -258,6 +269,17 @@ native bool:DisplayTopMenu(Handle:topmenu, client, TopMenuPosition:position);
|
||||
*/
|
||||
native TopMenuObject:FindTopMenuCategory(Handle:topmenu, const String:name[]);
|
||||
|
||||
/**
|
||||
* Change the menu title caching behaviour of the TopMenu. By default the titles are cached to reduce overhead.
|
||||
* If you need dynamic menu titles, which can change everytime the menu is displayed to a user, set this to false.
|
||||
*
|
||||
* @param topmenu TopMenu Handle.
|
||||
* @param cache_titles Cache the menu titles and don't call the handler with TopMenuAction_DisplayTitle everytime the menu is drawn?
|
||||
* @noreturn
|
||||
* @error Invalid TopMenu Handle
|
||||
*/
|
||||
native SetTopMenuTitleCaching(Handle:topmenu, bool:cache_titles);
|
||||
|
||||
/**
|
||||
* Do not edit below this line!
|
||||
*/
|
||||
@ -285,6 +307,8 @@ public __ext_topmenus_SetNTVOptional()
|
||||
MarkNativeAsOptional("AddToTopMenu");
|
||||
MarkNativeAsOptional("RemoveFromTopMenu");
|
||||
MarkNativeAsOptional("DisplayTopMenu");
|
||||
MarkNativeAsOptional("DisplayTopMenuCategory");
|
||||
MarkNativeAsOptional("FindTopMenuCategory");
|
||||
MarkNativeAsOptional("SetTopMenuTitleCaching");
|
||||
}
|
||||
#endif
|
||||
|
22
env/include/usermessages.inc
vendored
22
env/include/usermessages.inc
vendored
@ -43,6 +43,15 @@ enum UserMsg
|
||||
INVALID_MESSAGE_ID = -1,
|
||||
};
|
||||
|
||||
/**
|
||||
* UserMsg message serialization formats
|
||||
*/
|
||||
enum UserMessageType
|
||||
{
|
||||
UM_BitBuf = 0,
|
||||
UM_Protobuf,
|
||||
};
|
||||
|
||||
/**
|
||||
* @section Message Flags.
|
||||
*/
|
||||
@ -54,6 +63,13 @@ enum UserMsg
|
||||
* @endsection
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns usermessage serialization type used for the current engine
|
||||
*
|
||||
* @return The supported usermessage type.
|
||||
*/
|
||||
native UserMessageType:GetUserMessageType();
|
||||
|
||||
/**
|
||||
* Returns the ID of a given message, or -1 on failure.
|
||||
*
|
||||
@ -115,7 +131,7 @@ native EndMessage();
|
||||
* Called when a message is hooked
|
||||
*
|
||||
* @param msg_id Message index.
|
||||
* @param bf Handle to the input bit buffer of the message.
|
||||
* @param msg Handle to the input bit buffer or protobuf.
|
||||
* @param players Array containing player indexes.
|
||||
* @param playersNum Number of players in the array.
|
||||
* @param reliable True if message is reliable, false otherwise.
|
||||
@ -124,7 +140,7 @@ native EndMessage();
|
||||
* blocks the message from being sent, and Plugin_Continue
|
||||
* resumes normal functionality.
|
||||
*/
|
||||
functag public Action:MsgHook(UserMsg:msg_id, Handle:bf, const players[], playersNum, bool:reliable, bool:init);
|
||||
functag public Action:MsgHook(UserMsg:msg_id, Handle:msg, const players[], playersNum, bool:reliable, bool:init);
|
||||
|
||||
/**
|
||||
* Called when a message hook has completed.
|
||||
@ -142,7 +158,7 @@ functag public MsgPostHook(UserMsg:msg_id, bool:sent);
|
||||
* @param intercept If intercept is true, message will be fully intercepted,
|
||||
* allowing the user to block the message. Otherwise,
|
||||
* the hook is normal and ignores the return value.
|
||||
* @param notify Notification function.
|
||||
* @param post Notification function.
|
||||
* @noreturn
|
||||
* @error Invalid message index.
|
||||
*/
|
||||
|
15
env/include/version.inc
vendored
15
env/include/version.inc
vendored
@ -35,8 +35,15 @@
|
||||
#endif
|
||||
#define _version_included
|
||||
|
||||
#define SOURCEMOD_V_MAJOR 1 /**< SourceMod Major version */
|
||||
#define SOURCEMOD_V_MINOR 4 /**< SourceMod Minor version */
|
||||
#define SOURCEMOD_V_RELEASE 1 /**< SourceMod Release version */
|
||||
#tryinclude <version_auto>
|
||||
|
||||
#define SOURCEMOD_VERSION "1.4.1" /**< SourceMod version string (major.minor.release.build) */
|
||||
#if !defined _auto_version_included
|
||||
#define SOURCEMOD_V_TAG "manual"
|
||||
#define SOURCEMOD_V_REV 0
|
||||
#define SOURCEMOD_V_CSET "0"
|
||||
#define SOURCEMOD_V_MAJOR 1 /**< SourceMod Major version */
|
||||
#define SOURCEMOD_V_MINOR 6 /**< SourceMod Minor version */
|
||||
#define SOURCEMOD_V_RELEASE 0 /**< SourceMod Release version */
|
||||
|
||||
#define SOURCEMOD_VERSION "1.6.0-manual" /**< SourceMod version string (major.minor.release-tag) */
|
||||
#endif
|
||||
|
15
env/include/version_auto.inc
vendored
Normal file
15
env/include/version_auto.inc
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
#if defined _auto_version_included
|
||||
#endinput
|
||||
#endif
|
||||
#define _auto_version_included
|
||||
|
||||
#define SOURCEMOD_V_TAG ""
|
||||
#define SOURCEMOD_V_CSET "95ab81f"
|
||||
#define SOURCEMOD_V_MAJOR 1
|
||||
#define SOURCEMOD_V_MINOR 6
|
||||
#define SOURCEMOD_V_RELEASE 0
|
||||
#define SOURCEMOD_V_REV 4525
|
||||
|
||||
#define SOURCEMOD_VERSION "1.6.0"
|
||||
|
BIN
env/linux/bin/spcomp-1.6.0
vendored
Executable file
BIN
env/linux/bin/spcomp-1.6.0
vendored
Executable file
Binary file not shown.
32
env/readme.txt
vendored
32
env/readme.txt
vendored
@ -1,16 +1,16 @@
|
||||
Compiling:
|
||||
|
||||
- Windows: Use compile.bat in the source code repository.
|
||||
- Linux: Use the Makefile script.
|
||||
|
||||
The binary will be made in <repos>/build.
|
||||
|
||||
The develop environment should be mostly stand-alone with SourcePawn compiler
|
||||
some tools and include files.
|
||||
|
||||
Linux requirements:
|
||||
- Make
|
||||
- Mercurial
|
||||
|
||||
Windows requirements:
|
||||
- TortoiseHg or Mercurial
|
||||
Compiling:
|
||||
|
||||
- Windows: Use compile.bat in the source code repository.
|
||||
- Linux: Use the Makefile script.
|
||||
|
||||
The binary will be made in <repos>/build.
|
||||
|
||||
The develop environment should be mostly stand-alone with SourcePawn compiler
|
||||
some tools and include files.
|
||||
|
||||
Linux requirements:
|
||||
- Make
|
||||
- Mercurial
|
||||
|
||||
Windows requirements:
|
||||
- TortoiseHg or Mercurial
|
||||
|
BIN
env/win32/bin/spcomp-1.6.0.exe
vendored
Normal file
BIN
env/win32/bin/spcomp-1.6.0.exe
vendored
Normal file
Binary file not shown.
@ -185,6 +185,7 @@ AmbientSoundsRestart()
|
||||
if (tAmbientSounds != INVALID_HANDLE)
|
||||
{
|
||||
KillTimer(tAmbientSounds);
|
||||
tAmbientSounds = INVALID_HANDLE;
|
||||
}
|
||||
|
||||
// If ambience is disabled, then stop.
|
||||
|
@ -1,13 +1,13 @@
|
||||
@echo off
|
||||
|
||||
REM To avoid complicated and maybe impossible tasks in windows batch scripts,
|
||||
REM this script will execute another linux shell script using cygwin.
|
||||
|
||||
set BASH=env\win32\bin\bash.exe
|
||||
set DATEPATH=env\win32\bin\date.exe
|
||||
|
||||
REM Converts a windows path to a linux path for cygwin (/cygdrive/c/...).
|
||||
for /f %%s in ('env\win32\bin\cygpath.exe -u "%DATEPATH%"') do set DATEPATH=%%s
|
||||
|
||||
%BASH% updateversion.sh %DATEPATH%
|
||||
exit
|
||||
@echo off
|
||||
|
||||
REM To avoid complicated and maybe impossible tasks in windows batch scripts,
|
||||
REM this script will execute another linux shell script using cygwin.
|
||||
|
||||
set BASH=env\win32\bin\bash.exe
|
||||
set DATEPATH=env\win32\bin\date.exe
|
||||
|
||||
REM Converts a windows path to a linux path for cygwin (/cygdrive/c/...).
|
||||
for /f %%s in ('env\win32\bin\cygpath.exe -u "%DATEPATH%"') do set DATEPATH=%%s
|
||||
|
||||
%BASH% updateversion.sh %DATEPATH%
|
||||
exit
|
||||
|
Loading…
Reference in New Issue
Block a user