Commit 51be5ff7 authored by Jordan Allard's avatar Jordan Allard

Fix error on line 165. Checks if client is valid before checking if they are alive in for loop.

parent 8e404281
This diff was suppressed by a .gitattributes entry.
......@@ -162,8 +162,8 @@ public void OnClientSayCommand_Post(int client, const char[] command, const char
else if (StrEqual(command, "say_team")) {
for (int i = 1; i <= MaxClients; i++) {
// If the admin is an alive SA or a dead admin of any level on the opposite team show the opposite team's team chat
bool adminAlive = IsPlayerAlive(i);
if (IsValidClient(i, false) && GetClientTeam(i) != team && (IsClientSA(i) || (!adminAlive && IsClientAdmin(i)))) {
bool adminAlive = IsValidClient(i, true);
if (GetClientTeam(i) != team && (IsClientSA(i) || (!adminAlive && IsClientAdmin(i)))) {
if (team == CS_TEAM_T)
PrintToChat(i, "(\x10T\x01) \x0F%s\x01: %s", name, sArgs);
else if (team == CS_TEAM_CT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment