Add prompt util

This commit is contained in:
Vortrex
2021-01-23 13:33:09 -06:00
parent f6e5886aaf
commit 1b3c53f9cb

View File

@@ -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`);
}
}
// ---------------------------------------------------------------------------