Hello I wanted to know if there was a script for laundering dirty thanks to you for your help
1 Like
- Buy a laundering machines
- Put dirty in it.
- Select washing program
- Eject wash from machine
- Dirty is clean now
11 Likes
loool in lua ā¦
Best answer I ever seen so far on this forum .
2 Likes
- you use triggerevent for the remove you dirty money
- you use triggerevent for add money
sorry for my english iām french
One of the easiest to do I feel but here a basic idea code that will work
local dirtycash = 0
RegisterServerEvent('dm:cleanMoney')
AddEventHandler('dm:cleanMoney', function ()
mysource = source
TriggerEvent('es:getPlayerFromId', mysource, function(user)
dirtycash = user.getDirtyMoney() -- get players dirty cash
if dirtycash > 0 then
user.addBank(dirtycash) -- add same amount of normal cash as dirty cash
user.removeDirtyMoney(dirtycash) -- remove old dirty cash
end
TriggerClientEvent('dm:cleanDone', mysource, "all done now get out of here!.") -- send to client to show a message
end)
end)