Add prompt util
This commit is contained in:
@@ -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`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
Reference in New Issue
Block a user