From e950ad0a002905d552b44c4845098593a4e0b98c Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Thu, 3 Mar 2022 01:20:15 -0600 Subject: [PATCH] Add button text arg for info and error GUI --- scripts/server/client.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/server/client.js b/scripts/server/client.js index 0ab56b6f..1e72c866 100644 --- a/scripts/server/client.js +++ b/scripts/server/client.js @@ -410,14 +410,14 @@ function showPlayerPromptGUI(client, promptMessage, promptTitle, yesButtonText, // =========================================================================== -function showPlayerInfoGUI(client, infoMessage, infoTitle) { +function showPlayerInfoGUI(client, infoMessage, infoTitle, buttonText = "OK") { logToConsole(LOG_DEBUG, `[VRR.Client] Sending show info GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${infoTitle}, Message: ${infoMessage})`); sendNetworkEventToPlayer("vrr.showInfo", client, infoMessage, infoTitle, buttonText); } // =========================================================================== -function showPlayerErrorGUI(client, errorMessage, errorTitle) { +function showPlayerErrorGUI(client, errorMessage, errorTitle, buttonText = "OK") { logToConsole(LOG_DEBUG, `[VRR.Client] Sending show error GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${errorTitle}, Message: ${errorMessage})`); sendNetworkEventToPlayer("vrr.showInfo", client, errorMessage, errorTitle, buttonText); } @@ -522,13 +522,6 @@ function sendPlayerFrozenState(client, state) { // =========================================================================== -function givePlayerWeapon(client, weaponId, ammo, active = true) { - logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to give weapon (Weapon: ${weaponId}, Ammo: ${ammo})`); - sendNetworkEventToPlayer("vrr.giveWeapon", client, weaponId, ammo, active); -} - -// =========================================================================== - function clearPlayerWeapons(client) { logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to clear weapons`); sendNetworkEventToPlayer("vrr.clearWeapons", client);