Made zr_ztele_humans cvar for allowing or disallowing humans to use the teleporter. Defaults to allow.

This commit is contained in:
richard 2008-11-24 21:30:23 +01:00
parent 298dec378c
commit 65a9ec01aa
4 changed files with 8 additions and 2 deletions

View File

@ -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 2008.11.17 - 2.5.1.13 - Richard
* Made a switch for printing suicide attempts to admin chat. * Made a switch for printing suicide attempts to admin chat.
* Added suicide response to client chat too, not just the console. * Added suicide response to client chat too, not just the console.

View File

@ -15,7 +15,7 @@
#undef REQUIRE_PLUGIN #undef REQUIRE_PLUGIN
#include <market> #include <market>
#define VERSION "2.5.1.13" #define VERSION "2.5.1.14"
#include "zr/zombiereloaded" #include "zr/zombiereloaded"
#include "zr/global" #include "zr/global"

View File

@ -60,6 +60,7 @@ enum ZRSettings
Handle:CVAR_ZSPAWN, Handle:CVAR_ZSPAWN,
Handle:CVAR_ZTELE, Handle:CVAR_ZTELE,
Handle:CVAR_ZTELE_LIMIT, Handle:CVAR_ZTELE_LIMIT,
Handle:CVAR_ZTELE_HUMANS,
Handle:CVAR_ZSTUCK, Handle:CVAR_ZSTUCK,
Handle:CVAR_ZHP, Handle:CVAR_ZHP,
Handle:CVAR_ZHP_DEFAULT, 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_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] = 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_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_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] = 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)"); gCvars[CVAR_ZHP_DEFAULT] = CreateConVar("zr_zhp_default", "1", "The default value of zombie health display to new clients (1: On, 0: Off)");

View File

@ -227,7 +227,8 @@ ZTele(client)
return; 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"); ZR_PrintToChat(client, "!ztele humans restricted");