Permalink
Browse files

Readd flashlight @Nachtfrische

Works fine on my server (again)
  • Loading branch information...
Bara committed Dec 1, 2017
1 parent 58514e2 commit 55adbccedc5de4d66e9f23539fcb85b38a14884d
@@ -32,6 +32,8 @@ void SetupConfig()
g_cblockRadioMessage = AutoExecConfig_CreateConVar("ttt_block_radio_message", "1", "Block radio messages in chat. 1 = Block, 0 = Don't Block", _, true, 0.0, true, 1.0);
g_cshowDeathMessage = AutoExecConfig_CreateConVar("ttt_show_death_message", "1", "Display a message showing who killed you. 1 = Enabled, 0 = Disabled", _, true, 0.0, true, 1.0);
g_cshowKillMessage = AutoExecConfig_CreateConVar("ttt_show_kill_message", "1", "Display a message showing who you killed. 1 = Enabled, 0 = Disabled", _, true, 0.0, true, 1.0);
g_callowFlash = AutoExecConfig_CreateConVar("ttt_allow_flash", "1", "Enable Flashlight (+lookatweapon). 1 = Enabled, 0 Disabled", _, true, 0.0, true, 1.0);
g_cblockLookAtWeapon = AutoExecConfig_CreateConVar("ttt_block_look_at_weapon", "1", "Block weapon inspecting. 1 = Block, 0 = Don't Block)", _, true, 0.0, true, 1.0);
g_cenableNoBlock = AutoExecConfig_CreateConVar("ttt_enable_noblock", "0", "Enable No Block. 1 = Enabled, 0 = Disabled", _, true, 0.0, true, 1.0);
g_ckadRemover = AutoExecConfig_CreateConVar("ttt_kad_remover", "1", "Block kills, deaths and assists from appearing on the scoreboard. 1 = Enabled, 0 = Disabled", _, true, 0.0, true, 1.0);
g_cfakeHealth = AutoExecConfig_CreateConVar("ttt_fake_health", "100", "TODO: Add description");
@@ -172,6 +172,8 @@ ConVar g_cshowEarnKarmaMessage = null;
ConVar g_cshowLoseKarmaMessage = null;
ConVar g_cmessageTypKarma = null;
ConVar g_cblockSuicide = null;
ConVar g_callowFlash = null;
ConVar g_cblockLookAtWeapon = null;
ConVar g_cblockRadioMessage = null;
ConVar g_cenableNoBlock = null;
ConVar g_cpluginTag = null;
@@ -73,6 +73,7 @@ public void OnPluginStart()
RegConsoleCmd("sm_rslays", Command_RSlays);
RegConsoleCmd("sm_tttversion", Command_TTTVersion);
AddCommandListener(Command_LAW, "+lookatweapon");
AddCommandListener(Command_Say, "say");
AddCommandListener(Command_SayTeam, "say_team");
AddCommandListener(Command_InterceptSuicide, "kill");
@@ -3075,6 +3076,27 @@ stock void addArrayTime(char[] message)
g_aLogs.PushString(message);
}
public Action Command_LAW(int client, const char[] command, int argc)
{
if (!TTT_IsClientValid(client))
{
return Plugin_Continue;
}
if (g_callowFlash.BoolValue && IsPlayerAlive(client))
{
EmitSoundToAllAny(SND_FLASHLIGHT, client, SNDCHAN_AUTO, SNDLEVEL_NORMAL, SND_NOFLAGS, 0.6);
SetEntProp(client, Prop_Send, "m_fEffects", GetEntProp(client, Prop_Send, "m_fEffects") ^ 4);
}
if (g_cblockLookAtWeapon.BoolValue)
{
return Plugin_Handled;
}
return Plugin_Continue;
}
stock void manageRDM(int client)
{
if (!IsClientInGame(client))

0 comments on commit 55adbcc

Please sign in to comment.