Use locales for random tips (unfinished)
This commit is contained in:
@@ -237,14 +237,14 @@ function checkPayDays() {
|
||||
// ===========================================================================
|
||||
|
||||
function showRandomTipToAllPlayers() {
|
||||
let tipId = getRandom(0, randomTips.length-1);
|
||||
|
||||
let clients = getClients();
|
||||
for (let i in clients) {
|
||||
if (isClientInitialized(clients[i])) {
|
||||
if (isPlayerLoggedIn(clients[i]) && isPlayerSpawned(clients[i])) {
|
||||
if (!doesPlayerHaveRandomTipsDisabled(clients[i])) {
|
||||
messagePlayerTimedRandomTip(null, randomTips[tipId]);
|
||||
let localeId = getPlayerLocaleId(clients[i]);
|
||||
let tipId = getRandom(0, getServerData().localeStrings[localeId]["RandomTips"].length - 1);
|
||||
messagePlayerTip(clients[i], getGroupedLocaleString(clients[i], "RandomTips", tipId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user