Fix bug by player not in game for some plugins(no compiled plugin)#972
Closed
apples1949 wants to merge 2 commits into
Closed
Fix bug by player not in game for some plugins(no compiled plugin)#972apples1949 wants to merge 2 commits into
apples1949 wants to merge 2 commits into
Conversation
SirPlease
reviewed
May 26, 2026
| return; | ||
|
|
||
| if (GetClientTeam(client) == L4D_TEAM_SURVIVOR && !IsPlayerAlive(client)) | ||
| if (IsClientInGame(client) && GetClientTeam(client) == L4D_TEAM_SURVIVOR && !IsPlayerAlive(client)) |
Owner
There was a problem hiding this comment.
This seems to only be needed when you create your own player_disconnect event.
Normally this event is guaranteed to have the client still considered in-game.
I'd suggest fixing this in your other plugins that are creating a manual player_disconnect event.
| } | ||
|
|
||
| if (bSpecSeeChat && GetClientTeam(client) != 1) | ||
| if (bSpecSeeChat && IsValidClient(client) && GetClientTeam(client) != 1) |
Owner
There was a problem hiding this comment.
After looking at this plugin's code, my eyes started hurting 😅
I'd suggest leaving this plugin out of the PR for now, this one needs a rewrite.
SirPlease
added a commit
that referenced
this pull request
Jun 24, 2026
Not the greatest review experience 💢
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
L 05/23/2026 - 20:43:21: [SM] Blaming: optional/readyup.smx
L 05/23/2026 - 20:43:21: [SM] Call stack trace:
L 05/23/2026 - 20:43:21: [SM] [0] GetClientTeam
L 05/23/2026 - 20:43:21: [SM] [1] Line 101, readyup/player.inc::IsPlayer
L 05/23/2026 - 20:43:21: [SM] [2] Line 27, readyup/command.inc::Ready_Cmd
L 05/23/2026 - 20:43:21: [SM] [3] Line 417, readyup.sp::Vote_Callback
L 05/23/2026 - 20:43:22: [SM] Exception reported: Client 2 is not in game
L 01/04/2026 - 09:39:10: Info (map "c2m1_highway") (file "/root/steamcmd/l4d2/left4dead2/addons/sourcemod/logs/errors_20260104.log")
L 01/04/2026 - 09:39:10: [SM] Exception reported: Client 7 is not in game
L 01/04/2026 - 09:39:10: [SM] Blaming: optional/autopause.smx
L 01/04/2026 - 09:39:10: [SM] Call stack trace:
L 01/04/2026 - 09:39:10: [SM] [0] GetClientTeam
L 01/04/2026 - 09:39:10: [SM] [1] Line 246, j:\Documents\GitHub\L4D2-Competitive-Rework\addons\sourcemod\scripting\autopause.sp::Event_PlayerDisconnect
L 01/04/2026 - 09:39:10: [SM] Exception reported: Client 7 is not in game
L 01/04/2026 - 09:39:10: [SM] Blaming: optional/autopause.smx
L 01/04/2026 - 09:39:10: [SM] Call stack trace:
L 01/04/2026 - 09:39:10: [SM] [0] GetClientTeam
L 01/04/2026 - 09:39:10: [SM] [1] Line 246, j:\Documents\GitHub\L4D2-Competitive-Rework\addons\sourcemod\scripting\autopause.sp::Event_PlayerDisconnect
L 01/04/2026 - 09:39:10: [SM] [3] FireEvent
L 01/04/2026 - 09:39:10: [SM] [4] Line 104, cannounce\suppress.sp::event_PlayerDisconnect_Suppress
L 01/04/2026 - 09:39:10: [SM] [5] Line 216, cannounce.sp::event_PlayerDisconnect
L 01/04/2026 - 09:57:35: Error log file session closed.
L 03/22/2026 - 11:57:43: SourceMod error session started
L 03/22/2026 - 11:57:43: Info (map "c1m1_hotel") (file "/root/steamcmd/test/left4dead2/addons/sourcemod/logs/errors_20260322.log")
L 03/22/2026 - 11:57:43: [SM] Exception reported: Client 5 is not in game
L 03/22/2026 - 11:57:43: [SM] Blaming: fixes/bequiet.smx
L 03/22/2026 - 11:57:43: [SM] Call stack trace:
L 03/22/2026 - 11:57:43: [SM] [0] GetClientTeam
L 03/22/2026 - 11:57:43: [SM] [1] Line 71, C:\Users\Sir\Documents\GitHub\L4D2-Competitive-Rework\addons\sourcemod\scripting\bequiet.sp::TeamSay_Callback
L 03/22/2026 - 12:18:38: Error log file session closed.
L 03/07/2026 - 13:09:14: [SM] Exception reported: Client 6 is not in game
L 03/07/2026 - 13:09:14: [SM] Blaming: optional/playermanagement.smx
L 03/07/2026 - 13:09:14: [SM] Call stack trace:
L 03/07/2026 - 13:09:14: [SM] [0] GetClientTeam
L 03/07/2026 - 13:09:14: [SM] [1] Line 563, C:\Users\Sir\Documents\GitHub\L4D2-Competitive-Rework\addons\sourcemod\scripting\playermanagement.sp::GetClientTeamEx
L 03/07/2026 - 13:09:14: [SM] [2] Line 164, C:\Users\Sir\Documents\GitHub\L4D2-Competitive-Rework\addons\sourcemod\scripting\playermanagement.sp::Spectate_Cmd
L 03/07/2026 - 13:22:14: Error log file session closed.
L 05/23/2026 - 22:18:21: [SM] Exception reported: Client 6 is not in game
L 05/23/2026 - 22:18:21: [SM] Blaming: optional/l4d2_ghost_warp.smx
L 05/23/2026 - 22:18:21: [SM] Call stack trace:
L 05/23/2026 - 22:18:21: [SM] [0] GetClientTeam
L 05/23/2026 - 22:18:21: [SM] [1] Line 123, C:\Users\Sir\Documents\GitHub\L4D2-Competitive-Rework\addons\sourcemod\scripting\l4d2_ghost_warp.sp::Cmd_WarpToSurvivor