Add button text arg for info and error GUI

This commit is contained in:
Vortrex
2022-03-03 01:20:15 -06:00
parent 83fe407f19
commit e950ad0a00

View File

@@ -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);