refactor(paycheckloop): Localise payment and format string

This commit is contained in:
Mojito-Fivem
2021-11-08 17:37:33 +00:00
parent aac822402d
commit b3346527be
+4 -3
View File
@@ -113,9 +113,10 @@ function PaycheckLoop()
local Players = QBCore.Players
for i = 1, #Players, 1 do
local Player = Players[i]
if Player.PlayerData.job and Player.PlayerData.job.onduty and Player.PlayerData.job.payment > 0 then
Player.Functions.AddMoney('bank', Player.PlayerData.job.payment)
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, 'You received your paycheck of $' .. Player.PlayerData.job.payment)
local payment = Player.PlayerData.job.payment
if Player.PlayerData.job and Player.PlayerData.job.onduty and payment > 0 then
Player.Functions.AddMoney('bank', payment)
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, ('You received your paycheck of $%s'):format(payment))
end
end
SetTimeout(QBCore.Config.Money.PayCheckTimeOut * (60 * 1000), PaycheckLoop)