Skip to content

Fix bug by player not in game for some plugins(no compiled plugin)#972

Closed
apples1949 wants to merge 2 commits into
SirPlease:masterfrom
apples1949:test
Closed

Fix bug by player not in game for some plugins(no compiled plugin)#972
apples1949 wants to merge 2 commits into
SirPlease:masterfrom
apples1949:test

Conversation

@apples1949

@apples1949 apples1949 commented May 26, 2026

Copy link
Copy Markdown
Contributor

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

Comment thread addons/sourcemod/scripting/readyup/player.inc
return;

if (GetClientTeam(client) == L4D_TEAM_SURVIVOR && !IsPlayerAlive(client))
if (IsClientInGame(client) && GetClientTeam(client) == L4D_TEAM_SURVIVOR && !IsPlayerAlive(client))

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread addons/sourcemod/scripting/l4d2_ghost_warp.sp
Comment thread addons/sourcemod/scripting/playermanagement.sp
@apples1949 apples1949 closed this Jun 23, 2026
SirPlease added a commit that referenced this pull request Jun 24, 2026
Not the greatest review experience 💢
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants