mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Add pacycheck reason
Adds the string 'paycheck' for AddMoney function 'reason' variable.
This commit is contained in:
@@ -213,16 +213,16 @@ function PaycheckInterval()
|
|||||||
if account < payment then -- Checks if company has enough money to pay society
|
if account < payment then -- Checks if company has enough money to pay society
|
||||||
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('error.company_too_poor'), 'error')
|
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('error.company_too_poor'), 'error')
|
||||||
else
|
else
|
||||||
Player.Functions.AddMoney('bank', payment)
|
Player.Functions.AddMoney('bank', payment, 'paycheck')
|
||||||
exports['qb-management']:RemoveMoney(Player.PlayerData.job.name, payment)
|
exports['qb-management']:RemoveMoney(Player.PlayerData.job.name, payment)
|
||||||
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment}))
|
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment}))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Player.Functions.AddMoney('bank', payment)
|
Player.Functions.AddMoney('bank', payment, 'paycheck')
|
||||||
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment}))
|
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment}))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Player.Functions.AddMoney('bank', payment)
|
Player.Functions.AddMoney('bank', payment, 'paycheck')
|
||||||
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment}))
|
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment}))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -426,4 +426,4 @@ function QBCore.Functions.PrepForSQL(source,data,pattern)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user