From a515e7c85e5684d0e49ca8755e04009523d698ad Mon Sep 17 00:00:00 2001 From: rtxa Date: Wed, 7 Aug 2024 21:23:54 -0300 Subject: [PATCH] Fix players who just joined when a match is on not being shown as spectators when the server is paused --- valve/addons/amxmodx/scripting/agmodx.sma | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/valve/addons/amxmodx/scripting/agmodx.sma b/valve/addons/amxmodx/scripting/agmodx.sma index 33596d0..8f34bb5 100644 --- a/valve/addons/amxmodx/scripting/agmodx.sma +++ b/valve/addons/amxmodx/scripting/agmodx.sma @@ -447,6 +447,8 @@ public plugin_init() { register_concmd("help", "CmdHelp", ADMIN_ALL, "AGCMD_HELP", _, true); + register_concmd("test", "CmdTest", ADMIN_ALL); + register_clcmd("spectate", "CmdSpectate"); // block spectate register_clcmd("drop", "CmdDrop"); // block drop register_clcmd("jointeam", "CmdJoinTeam"); // this will make work the vgui @@ -559,8 +561,11 @@ public client_putinserver(id) { if (gSendConnectingToSpec) { // warning: authid checking can fail because client_authorized() can be called after this... if (!gVersusStarted || !RestoreScore_FindPlayer(id)) { + set_pev(id, pev_iuser1, 1); // This will make it show up in the scoreboard in spectator list set_task(0.1, "SendToSpec", id + TASK_SENDTOSPEC); // delay to avoid some scoreboard glitchs } + + } set_task(3.0, "ShowSettings", id);