Tell player about available language for region

This commit is contained in:
Vortrex
2022-09-29 11:12:54 -05:00
parent 472e6c7177
commit f9e7597c4c

View File

@@ -132,6 +132,8 @@ class ClientData {
this.pedState = AGRP_PEDSTATE_NONE; this.pedState = AGRP_PEDSTATE_NONE;
this.promptType = AGRP_PROMPT_NONE; this.promptType = AGRP_PROMPT_NONE;
this.privateMessageReplyTo = null; this.privateMessageReplyTo = null;
this.enteringExitingProperty = null;
this.inProperty = null;
// Paintball // Paintball
this.inPaintBall = false; this.inPaintBall = false;
@@ -266,11 +268,16 @@ function initClient(client) {
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled).`); logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled).`);
messagePlayerNormal(client, getLocaleString(client, "WelcomeBack", getServerName(), getPlayerName(client), "/login"), getColourByName("softGreen")); messagePlayerNormal(client, getLocaleString(client, "WelcomeBack", getServerName(), getPlayerName(client), "/login"), getColourByName("softGreen"));
//if(checkForGeoIPModule()) { if (checkForGeoIPModule()) {
// let iso = module.geoip.getCountryISO(getPlayerIP(client)); let iso = module.geoip.getCountryISO(getPlayerIP(client));
// let localeId = getLocaleFromCountryISO(iso); let localeId = getLocaleFromCountryISO(iso);
//}
//showSmallGameMessage(client, getLocaleString(client, "LocaleOffer", `/lang ${getLocaleData(localeId)[2]}`), getColourByName("white"), 10000, "Roboto"); if (localeId != 0) {
if (getLocaleData(localeId).enabled) {
messagePlayerTip(client, getLanguageLocaleString(localeId, "LocaleOffer", `/lang ${getLocaleData(localeId).isoCode}`), getColourByName("white"), 10000, "Roboto");
}
}
}
} }
startLoginTimeoutForPlayer(client); startLoginTimeoutForPlayer(client);
playRadioStreamForPlayer(client, getServerIntroMusicURL(), true, getPlayerStreamingRadioVolume(client)); playRadioStreamForPlayer(client, getServerIntroMusicURL(), true, getPlayerStreamingRadioVolume(client));