Merged heads.
This commit is contained in:
commit
f6565bc81c
@ -617,6 +617,10 @@ zr_zspawn_team_override "1"
|
||||
// Default: "0"
|
||||
zr_zspawn_team_zombie "0"
|
||||
|
||||
// Block players disconnecting and rejoing the game using zspawn.
|
||||
// Default: "1"
|
||||
zr_zspawn_block_rejoin "1"
|
||||
|
||||
// Put a time limit on the use of ZSpawn.
|
||||
// Default: "1"
|
||||
zr_zspawn_timelimit "1"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <cstrike>
|
||||
#include <zrtools>
|
||||
|
||||
#define VERSION "3.0-dev"
|
||||
#define VERSION "3.0.0-dev"
|
||||
|
||||
// Header includes.
|
||||
#include "zr/log.h"
|
||||
|
@ -146,6 +146,7 @@ enum CvarsList
|
||||
Handle:CVAR_ZSPAWN,
|
||||
Handle:CVAR_ZSPAWN_TEAM_OVERRIDE,
|
||||
Handle:CVAR_ZSPAWN_TEAM_ZOMBIE,
|
||||
Handle:CVAR_ZSPAWN_BLOCK_REJOIN,
|
||||
Handle:CVAR_ZSPAWN_TIMELIMIT,
|
||||
Handle:CVAR_ZSPAWN_TIMELIMIT_TIME,
|
||||
Handle:CVAR_ZSPAWN_TIMELIMIT_ZOMBIE,
|
||||
@ -440,6 +441,7 @@ CvarsCreate()
|
||||
|
||||
g_hCvarsList[CVAR_ZSPAWN_TEAM_OVERRIDE] = CreateConVar("zr_zspawn_team_override", "1", "Override spawn team when spawning by means of ZSpawn.");
|
||||
g_hCvarsList[CVAR_ZSPAWN_TEAM_ZOMBIE] = CreateConVar("zr_zspawn_team_zombie", "0", "Spawn player on zombie team when spawning by means of ZSpawn. [Dependency: zr_zspawn_team_override | Override: zr_respawn_zombie]");
|
||||
g_hCvarsList[CVAR_ZSPAWN_BLOCK_REJOIN] = CreateConVar("zr_zspawn_block_rejoin", "1", "Block players disconnecting and rejoing the game using zspawn.");
|
||||
|
||||
g_hCvarsList[CVAR_ZSPAWN_TIMELIMIT] = CreateConVar("zr_zspawn_timelimit", "1", "Put a time limit on the use of ZSpawn.");
|
||||
g_hCvarsList[CVAR_ZSPAWN_TIMELIMIT_TIME] = CreateConVar("zr_zspawn_timelimit_time", "120.0", "Time from the start of the round to allow ZSpawn. [Dependency: zr_zspawn_timelimit]");
|
||||
|
@ -210,7 +210,8 @@ bool:ZSpawnClient(client, bool:force = false, bool:zombie = false)
|
||||
}
|
||||
|
||||
// Block if client has already played during this round.
|
||||
if (!force && SteamidCacheClientExists(g_hZSpawnSteamIDCache, client))
|
||||
new blockrejoin = GetConVarBool(g_hCvarsList[CVAR_ZSPAWN_BLOCK_REJOIN]);
|
||||
if (!force && SteamidCacheClientExists(g_hZSpawnSteamIDCache, client) && blockrejoin)
|
||||
{
|
||||
// Tell client the command may only be used when joining late.
|
||||
TranslationPrintToChat(client, "ZSpawn double spawn");
|
||||
|
Loading…
Reference in New Issue
Block a user