Skip to content
Permalink
Browse files

FIx #447 (#448)

  • Loading branch information
Mrkl21full authored and Bara committed Nov 4, 2019
1 parent 4dccf35 commit 17230772393910a1e7da57e59ea4ae92392c05f7
Showing with 12 additions and 9 deletions.
  1. +12 −9 addons/sourcemod/scripting/ttt/ttt_talk_override.sp
@@ -39,6 +39,7 @@ public void OnPluginStart()
}

HookEvent("player_spawn", Event_PlayerSpawn);
HookEvent("player_death", Event_PlayerDeath);
HookEvent("player_team", Event_PlayerTeam);

TTT_LoadTranslations();
@@ -151,6 +152,17 @@ public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadca
}
}

public Action Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast)
{
int victim = GetClientOfUserId(event.GetInt("userid"));

if (TTT_IsClientValid(victim))
{
g_bTVoice[victim] = false;
SetListen(victim);
}
}

public void TTT_OnClientGetRole(int client, int role)
{
SetListen(client);
@@ -166,15 +178,6 @@ public int TTT_OnRoundSlay(int client, int remaining)
SetListen(client);
}

public void TTT_OnClientDeath(int victim, int attacker, bool badAction)
{
if (TTT_IsClientValid(victim))
{
g_bTVoice[victim] = false;
SetListen(victim);
}
}

public void Event_PlayerTeam(Event event, const char[] name, bool dontBroadcast)
{
int client = GetClientOfUserId(event.GetInt("userid"));

0 comments on commit 1723077

Please sign in to comment.
You can’t perform that action at this time.