Created a CVAR for enabling/disabling the zombie_version CVAR.

This commit is contained in:
richard 2009-04-22 23:32:43 +02:00
parent b99d253477
commit 54242bb529
2 changed files with 8 additions and 2 deletions

View File

@ -142,8 +142,12 @@ public OnPluginStart()
// ======================================================================
CreateConVar("gs_zombiereloaded_version", VERSION, "[ZR] Current version of this plugin", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
CreateConVar("zombie_version", VERSION, "Zombie:Reloaded Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
CreateConVar("zombie_enabled", "1", "Not synced with zr_enable", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
// Create zombie_version variable if specified.
if (GetConVarBool(g_hCvarsList[CVAR_ENABLE_ZM_VERSION_VAR]))
{
CreateConVar("zombie_version", VERSION, "Zombie:Reloaded Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
}
// ======================================================================

View File

@ -15,6 +15,7 @@
enum CvarsList
{
Handle:CVAR_ENABLE,
Handle:CVAR_ENABLE_ZM_VERSION_VAR,
Handle:CVAR_LOG,
Handle:CVAR_LOGFLAGS,
Handle:CVAR_ROUNDEND_OVERLAY,
@ -117,6 +118,7 @@ CvarsInit()
// ===========================
g_hCvarsList[CVAR_ENABLE] = CreateConVar("zr_enable", "1", "");
g_hCvarsList[CVAR_ENABLE_ZM_VERSION_VAR] = CreateConVar("zr_enable_zm_version_var", "1", "Enable zombie_version variable for compatibility with ZombieMod server filters.");
// ===========================
// Log (core)