diff --git a/changelog.txt b/changelog.txt index 2045168..623b055 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +2008.11.24 - 2.5.1.14 - Richard + * Made zr_ztele_humans cvar for allowing or disallowing humans to use the teleporter. Defaults to allow. + 2008.11.17 - 2.5.1.13 - Richard * Made a switch for printing suicide attempts to admin chat. * Added suicide response to client chat too, not just the console. diff --git a/src/zombiereloaded.sp b/src/zombiereloaded.sp index c7e41ed..605b430 100644 --- a/src/zombiereloaded.sp +++ b/src/zombiereloaded.sp @@ -15,7 +15,7 @@ #undef REQUIRE_PLUGIN #include -#define VERSION "2.5.1.13" +#define VERSION "2.5.1.14" #include "zr/zombiereloaded" #include "zr/global" diff --git a/src/zr/cvars.inc b/src/zr/cvars.inc index d4dac7b..9e64c3b 100644 --- a/src/zr/cvars.inc +++ b/src/zr/cvars.inc @@ -60,6 +60,7 @@ enum ZRSettings Handle:CVAR_ZSPAWN, Handle:CVAR_ZTELE, Handle:CVAR_ZTELE_LIMIT, + Handle:CVAR_ZTELE_HUMANS, Handle:CVAR_ZSTUCK, Handle:CVAR_ZHP, Handle:CVAR_ZHP_DEFAULT, @@ -132,6 +133,7 @@ CreateCvars() gCvars[CVAR_ZSPAWN] = CreateConVar("zr_zspawn", "1", "Allow players to spawn if they just joined the game (0: Disable)"); gCvars[CVAR_ZTELE] = CreateConVar("zr_ztele", "1", "Allows zombies who get stuck to teleport back to spawn (0: Disable)"); gCvars[CVAR_ZTELE_LIMIT] = CreateConVar("zr_ztele_limit", "1", "Max amount of teleports per round when zr_ztele is 1 (0: Unlimited)"); + gCvars[CVAR_ZTELE_HUMANS] = CreateConVar("zr_ztele_humans", "1", "Allow humans to use the teleporter (0: Disabled)"); gCvars[CVAR_ZSTUCK] = CreateConVar("zr_zstuck", "1", "Allow players that are stuck together to get unstuck (0: Disable)"); gCvars[CVAR_ZHP] = CreateConVar("zr_zhp", "1", "Allows clients to enable/disable zombie health display (1: On, 0: Off)"); gCvars[CVAR_ZHP_DEFAULT] = CreateConVar("zr_zhp_default", "1", "The default value of zombie health display to new clients (1: On, 0: Off)"); diff --git a/src/zr/sayhooks.inc b/src/zr/sayhooks.inc index bf12d6c..4b5f0c7 100644 --- a/src/zr/sayhooks.inc +++ b/src/zr/sayhooks.inc @@ -227,7 +227,8 @@ ZTele(client) return; } - if (!IsPlayerZombie(client) && zombieSpawned) + new bool:tele_humans = GetConVarBool(gCvars[CVAR_ZTELE_HUMANS]); + if (!IsPlayerZombie(client) && !tele_humans && zombieSpawned) { ZR_PrintToChat(client, "!ztele humans restricted");