Fixed incorrect weapon name used in group restictions. Improved logging system (bit flags instead of on/off). CVAR zr_debug changed to zr_log. Added flag configuration to zombie admin menu. Fixed index out of bounds error in anticamp module.

This commit is contained in:
richard
2009-01-31 20:48:56 +01:00
parent 972136b859
commit 58949a7fe8
11 changed files with 246 additions and 49 deletions

View File

@ -9,7 +9,7 @@
enum ZRSettings
{
Handle:CVAR_ENABLE,
Handle:CVAR_DEBUG,
Handle:CVAR_LOG,
Handle:CVAR_ALLOW_PLAYER_TEAM,
Handle:CVAR_AMBIENCE,
Handle:CVAR_AMBIENCE_FILE,
@ -92,7 +92,7 @@ new gCvars[ZRSettings];
CreateCvars()
{
gCvars[CVAR_ENABLE] = CreateConVar("zr_enable", "1", "Enable zombie gameplay (0: Disable)");
gCvars[CVAR_DEBUG] = CreateConVar("zr_debug", "0", "Debug switch, for developers. Usually enables logging of messages and events to a console. (0: Disable)");
gCvars[CVAR_LOG] = CreateConVar("zr_log", "65", "Logging flags. Log messages to sourcemod logs, server console or client console. Use zr_log_flags to see a list of flags. (0: Disable)");
gCvars[CVAR_ALLOW_PLAYER_TEAM] = CreateConVar("zr_allow_player_team", "0", "This will allow the player_team event to be fired on first team join, enable when using mani model menu (0: Disable)");
gCvars[CVAR_AMBIENCE] = CreateConVar("zr_ambience", "1", "Enable creepy ambience to be played throughout the game (0: Disable)");
gCvars[CVAR_AMBIENCE_FILE] = CreateConVar("zr_ambience_file", "ambient/zr/zr_ambience.mp3", "Path to ambient sound file that will be played throughout the game, when zr_ambience is 1");
@ -221,3 +221,15 @@ public LimitTeamsHook(Handle:convar, const String:oldValue[], const String:newVa
{
SetConVarInt(FindConVar("mp_limitteams"), 0);
}
LogHasFlag(flag)
{
if (GetConVarInt(gCvars[CVAR_LOG]) & flag)
{
return 1;
}
else
{
return 0;
}
}