From 32bfb56048e634acbdda348933ad3b1321e5d189 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sat, 23 Jan 2021 13:31:33 -0600 Subject: [PATCH] Add show player error/info GUI utils --- scripts/server/client.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/server/client.js b/scripts/server/client.js index 5b1298eb..a3040940 100644 --- a/scripts/server/client.js +++ b/scripts/server/client.js @@ -356,6 +356,20 @@ function showPlayerPromptGUI(client, promptMessage, promptTitle) { // --------------------------------------------------------------------------- +function showPlayerInfoGUI(client, infoMessage, infoTitle) { + logToConsole(LOG_DEBUG, `[Asshat.Client] Sending show info GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${infoTitle}, Message: ${infoMessage})`); + triggerNetworkEvent("ag.showInfo", client, infoMessage, infoTitle); +} + +// --------------------------------------------------------------------------- + +function showPlayerErrorGUI(client, errorMessage, errorTitle) { + logToConsole(LOG_DEBUG, `[Asshat.Client] Sending show error GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${errorTitle}, Message: ${errorMessage})`); + triggerNetworkEvent("ag.showInfo", client, errorMessage, errorTitle); +} + +// --------------------------------------------------------------------------- + function sendRunCodeToClient(client, code, returnTo) { logToConsole(LOG_DEBUG, `[Asshat.Client] Sending runcode to ${getPlayerDisplayForConsole(client)} (returnTo: ${getPlayerDisplayForConsole(getClientFromIndex(returnTo))}, Code: ${code})`); triggerNetworkEvent("ag.runCode", client, code, returnTo);