Hi, I have a robbery script which adds cash money to thief’s wallet but I wan’t to change it to make it give it to them in dirty money but I can’t find anything on the ESX documentation that explains how to add money to their dirty money, only thing’s I can find is for their normal accounts. Any ideas?
I tryed this:
xPlayer.addAccountMoney('black_money', amount)
And this is the original robbery script(Robbery Completed Event only):
TriggerClientEvent('esx_holdupbank:robberycomplete', savedSource, job)
if(xPlayer)then
xPlayer.addMoney(bank.reward)
local xPlayers = ESX.GetPlayers()
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'police' then
TriggerClientEvent('esx:showNotification', xPlayers[i], _U('robbery_complete_at') .. bank.nameofbank)
TriggerClientEvent('esx_holdupbank:killblip', xPlayers[i])
end
end
end