diff --git a/scripts/server/misc.js b/scripts/server/misc.js index 54a27c4e..b543fdba 100644 --- a/scripts/server/misc.js +++ b/scripts/server/misc.js @@ -327,4 +327,21 @@ function checkPlayerSpawning() { } } +// --------------------------------------------------------------------------- + +function showPlayerPrompt(client, promptType, promptMessage, promptTitle) { + if(promptType == AG_PROMPT_NONE) { + return false; + } + + getPlayerData(client).promptType = promptType; + + if(canPlayerUseGUI(client)) { + showPlayerPromptGUI(client, promptMessage, promptTitle); + } else { + messagePlayerNormal(client, `❓ ${promptMessage}`); + messagePlayerInfo(client, `[#FFFFFF]Use [#AAAAAA]/yes or [#AAAAAA]/no`); + } +} + // --------------------------------------------------------------------------- \ No newline at end of file