Add button text arg for info and error GUI
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user