Permalink
Browse files

Add message on player spawn with ttt details (configurable)

  • Loading branch information...
Bara committed Nov 28, 2017
1 parent 4ab02c1 commit 3c10154e553e4e734eeedc0484d0b13bf3507e9b
@@ -113,6 +113,7 @@ void SetupConfig()
g_cCheckDuringWarmup = AutoExecConfig_CreateConVar("ttt_check_players_during_warmup", "0", "Check players during warmup?", _, true, 0.0, true, 1.0);
g_cPrimaryWeaponUpdate = AutoExecConfig_CreateConVar("ttt_primary_weapon_update", "0", "What should happen on round start with the primary weapon? 0 - nothing, 1 - drop old weapon, 2 - remove old weapon", _, true, 0.0, true, 2.0);
g_cSecondaryWeaponUpdate = AutoExecConfig_CreateConVar("ttt_secondary_weapon_update", "0", "What should happen on round start with the secondary weapon? 0 - nothing, 1 - drop old weapon, 2 - remove old weapon", _, true, 0.0, true, 2.0);
g_cAdvert = AutoExecConfig_CreateConVar("ttt_show_advert_message", "1", "Print a message on player spawn with some ttt details (like \"Trouble in Terrorist Town Version X.X.XXXX\")", _, true, 0.0, true, 1.0);
g_cpluginTag.AddChangeHook(OnConVarChanged);
g_ckickImmunity.AddChangeHook(OnConVarChanged);
@@ -260,6 +260,7 @@ ConVar g_cCheckPlayers = null;
ConVar g_cCheckDuringWarmup = null;
ConVar g_cPrimaryWeaponUpdate = null;
ConVar g_cSecondaryWeaponUpdate = null;
ConVar g_cAdvert = null;
Handle g_hRules = null;
bool g_bRules[MAXPLAYERS + 1] = { false, ... };
@@ -1329,6 +1329,11 @@ public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadca
if (TTT_IsClientValid(client))
{
if (g_cAdvert.BoolValue)
{
CPrintToChat(client, "%s %T", g_sTag, "Player Spawn TTT Version", client, TTT_PLUGIN_VERSION);
}
if (g_bRoundStarted)
{
if (g_cslayAfterStart.BoolValue)
@@ -934,5 +934,11 @@
{
"en" "You found a decoy body! RUN!"
}
"Player Spawn TTT Version"
{
"#fomart" "{1:s}"
"en" "Trouble in Terrorist Town - Version: {1}"
}
}

0 comments on commit 3c10154

Please sign in to comment.