From 7767dc226cffccb9d1c46db56b979660e23a2720 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 28 Apr 2024 22:34:20 +0800 Subject: [PATCH] [server] Implement and match `n_SetGameModeText(...)` --- server/scrcustom.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/scrcustom.cpp b/server/scrcustom.cpp index bfb0e3a..aa3b4dd 100644 --- a/server/scrcustom.cpp +++ b/server/scrcustom.cpp @@ -287,9 +287,15 @@ static cell AMX_NATIVE_CALL n_GameModeExit(AMX *amx, cell *params) return 0; } +// native SetGameModeText(const string[]) static cell AMX_NATIVE_CALL n_SetGameModeText(AMX *amx, cell *params) { - // TODO: SetGameModeText + CHECK_PARAMS(1); + + char* szGameModeText; + amx_StrParam(amx, params[1], szGameModeText); + pConsole->SetStringVariable("gamemodetext", szGameModeText); + return 0; }