diff --git a/src/zombiereloaded.sp b/src/zombiereloaded.sp index 94300fb..fd3d54c 100644 --- a/src/zombiereloaded.sp +++ b/src/zombiereloaded.sp @@ -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); + } // ====================================================================== diff --git a/src/zr/cvars.inc b/src/zr/cvars.inc index 6bcebe4..1cabeaf 100644 --- a/src/zr/cvars.inc +++ b/src/zr/cvars.inc @@ -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)