Add missing in-game check in adminmenu
Some checks failed
Continuous Integration / ${{ matrix.os_short }}-${{ matrix.compiler_cc }} (clang, clang++, ubuntu-latest, linux) (push) Has been cancelled
Continuous Integration / ${{ matrix.os_short }}-${{ matrix.compiler_cc }} (clang-14, clang++-14, ubuntu-22.04, linux) (push) Has been cancelled
Continuous Integration / ${{ matrix.os_short }}-${{ matrix.compiler_cc }} (msvc, windows-latest, win) (push) Has been cancelled
hl2sdk-mock tests / mock (push) Has been cancelled

This commit is contained in:
Nicholas Hastings 2025-06-01 13:54:41 -04:00
parent f9929ef9ac
commit 64a8c20243

View File

@ -186,7 +186,7 @@ public int __AddTargetsToMenu2(Handle plugin, int numParams)
public Action Command_DisplayMenu(int client, int args)
{
if (client == 0)
if (client == 0 || !IsClientInGame(client))
{
ReplyToCommand(client, "[SM] %t", "Command is in-game only");
return Plugin_Handled;