diff --git a/scripts/server/account.js b/scripts/server/account.js index 0a2855db..f28b4d01 100644 --- a/scripts/server/account.js +++ b/scripts/server/account.js @@ -92,16 +92,17 @@ function toggleAutoSelectLastCharacterCommand(command, params, client) { // =========================================================================== function toggleAccountGUICommand(command, params, client) { + // Remember, the flag is BACKWARD. Enabled = NO GUI! let flagValue = getAccountSettingsFlagValue("NoGUI"); if(doesPlayerHaveGUIEnabled(client)) { - getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue); - messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softGreen}${toUpperCase(getLocaleString(client, "On"))}{MAINCOLOUR}`)); - logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`); - } else { getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue); messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softRed}${toUpperCase(getLocaleString(client, "Off"))}{MAINCOLOUR}`)); logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account OFF.`); + } else { + getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue); + messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softGreen}${toUpperCase(getLocaleString(client, "On"))}{MAINCOLOUR}`)); + logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`); } if(!isPlayerLoggedIn(client)) {