Fixed hardcoded dollar sign, group money

This commit is contained in:
ElPumpo
2018-11-25 16:02:22 +01:00
parent f44e0c0e4f
commit 3cfae09503
7 changed files with 29 additions and 15 deletions
+17 -7
View File
@@ -23,7 +23,7 @@ end
function UpdateSocietyMoneyHUDElement(money)
ESX.UI.HUD.UpdateElement('society_money', {
money = money
money = ESX.Math.GroupDigits(money)
})
end
@@ -87,8 +87,7 @@ function OpenBossMenu(society, close, options)
if data.current.value == 'withdraw_society_money' then
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'withdraw_society_money_amount_' .. society,
{
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'withdraw_society_money_amount_' .. society, {
title = _U('withdraw_amount')
}, function(data, menu)
@@ -167,7 +166,7 @@ function OpenManageEmployeesMenu(society)
align = 'top-left',
elements = {
{label = _U('employee_list'), value = 'employee_list'},
{label = _U('recruit'), value = 'recruit'},
{label = _U('recruit'), value = 'recruit'}
}
}, function(data, menu)
@@ -242,7 +241,12 @@ function OpenRecruitMenu(society)
for i=1, #players, 1 do
if players[i].job.name ~= society then
table.insert(elements, {label = players[i].name, value = players[i].source, name = players[i].name, identifier = players[i].identifier})
table.insert(elements, {
label = players[i].name,
value = players[i].source,
name = players[i].name,
identifier = players[i].identifier
})
end
end
@@ -295,7 +299,12 @@ function OpenPromoteMenu(society, employee)
for i=1, #job.grades, 1 do
local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label)
table.insert(elements, {label = gradeLabel, value = job.grades[i].grade, selected = (employee.job.grade == job.grades[i].grade)})
table.insert(elements, {
label = gradeLabel,
value = job.grades[i].grade,
selected = (employee.job.grade == job.grades[i].grade)
})
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'promote_employee_' .. society,
@@ -329,8 +338,9 @@ function OpenManageGradesMenu(society)
for i=1, #job.grades, 1 do
local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label)
table.insert(elements, {
label = (string.format ('%s - <span style="color: green;">$%i</span>', gradeLabel, job.grades[i].salary)),
label = ('%s - <span style="color:green;">%s</span>'):format(gradeLabel, _U('money_generic', ESX.Math.GroupDigits(job.grades[i].salary))),
value = job.grades[i].grade
})
end
+1
View File
@@ -1,6 +1,7 @@
Locales['en'] = {
['actions'] = 'actions',
['boss_menu'] = 'boss menu',
['money_generic'] = '$%s',
['deposit_amount'] = 'deposit amount',
['deposit_society_money'] = 'deposit society money',
['do_you_want_to_recruit'] = 'do you want to recruit %s?',
+2 -1
View File
@@ -1,6 +1,7 @@
Locales['fi'] = {
['actions'] = 'toiminnot',
['boss_menu'] = 'boss menu',
['money_generic'] = '€%s',
['deposit_amount'] = 'talletus summa',
['deposit_society_money'] = 'talleta yritykselle rahaa',
['do_you_want_to_recruit'] = 'do you want to recruit %s?',
@@ -25,7 +26,7 @@ Locales['fi'] = {
['withdraw_amount'] = 'nostettava määrä',
['withdraw_society_money'] = 'nosta yrityksen rahoja',
['yes'] = 'kyllä',
['you_have'] = 'you have ~g~$%s~s~ waiting in ~y~money laundering~s~ (24h).',
['you_have'] = 'you have ~g~%s~s~ waiting in ~y~money laundering~s~ (24h).',
['you_have_laundered'] = 'olet ~r~pessyt~s~ rahojasi: ~g~€%s~s~',
['you_have_hired'] = 'sinä palkkasit henkilön %s',
['you_have_been_hired'] = 'sinut on palkattu pelaajan %s toimesta',
+1
View File
@@ -1,6 +1,7 @@
Locales['fr'] = {
['actions'] = 'actions',
['boss_menu'] = 'patron',
['money_generic'] = '$%s',
['deposit_amount'] = 'montant du dépôt',
['deposit_society_money'] = 'déposer argent société',
['do_you_want_to_recruit'] = 'Voulez-vous recruter %s?',
+1
View File
@@ -1,6 +1,7 @@
Locales['pl'] = {
['actions'] = 'akcje',
['boss_menu'] = 'boss menu',
['money_generic'] = '$%s',
['deposit_amount'] = 'ilość depozytu',
['deposit_society_money'] = 'zdeponuj społeczne pieniądze',
['do_you_want_to_recruit'] = 'czy chcesz zrekrutować %s?',
+1
View File
@@ -1,6 +1,7 @@
Locales['sv'] = {
['actions'] = 'handlingar',
['boss_menu'] = 'chefmeny',
['money_generic'] = '%s SEK',
['deposit_amount'] = 'insättningsbelopp',
['deposit_society_money'] = 'insätt samhälls pengar',
['do_you_want_to_recruit'] = 'vill du anställa %s?',
+6 -7
View File
@@ -70,7 +70,7 @@ AddEventHandler('esx_society:withdrawMoney', function(society, amount)
account.removeMoney(amount)
xPlayer.addMoney(amount)
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_withdrawn', amount))
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_withdrawn', ESX.Math.GroupDigits(amount)))
else
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('invalid_amount'))
end
@@ -89,7 +89,7 @@ AddEventHandler('esx_society:depositMoney', function(society, amount)
account.addMoney(amount)
end)
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_deposited', amount))
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_deposited', ESX.Math.GroupDigits(amount)))
else
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('invalid_amount'))
@@ -111,7 +111,7 @@ AddEventHandler('esx_society:washMoney', function(society, amount)
['@society'] = society,
['@amount'] = amount
}, function(rowsChanged)
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_have', amount))
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_have', ESX.Math.GroupDigits(amount)))
end)
else
@@ -236,7 +236,7 @@ ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier
if xTarget ~= nil then
xTarget.setJob(job, grade)
if type == 'hire' then
TriggerClientEvent('esx:showNotification', xTarget.source, _U('you_have_been_hired', job))
elseif type == 'promote' then
@@ -334,11 +334,10 @@ function WashMoneyCRON(d, h, m)
-- send notification if player is online
local xPlayer = ESX.GetPlayerFromIdentifier(result[i].identifier)
if xPlayer ~= nil then
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_have_laundered', result[i].amount))
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_have_laundered', ESX.Math.GroupDigits(result[i].amount)))
end
MySQL.Async.execute('DELETE FROM society_moneywash WHERE id = @id',
{
MySQL.Async.execute('DELETE FROM society_moneywash WHERE id = @id', {
['@id'] = result[i].id
})
end