šŸ”„ [ESX] Money Laundering GoPostal [New][Updated 9/11/18]

@pdc0001"If u donā€™t have dirty money, your dirty money account go to negative when job is finish, but u still have the clean money added to your account."

To dont let account goes on debet
Change your server event in server/main.lua on this:

> RegisterServerEvent('esx_godirtyjob:pay')
>  AddEventHandler('esx_godirtyjob:pay', function(amount)
> 	local _source = source
> 	local xPlayer = ESX.GetPlayerFromId(_source)
> 	if xPlayer ~= nil and amount > 1 then
> 		local money = xPlayer.getAccount('black_money').money
> 		if money > amount or money == amount then
> 			xPlayer.addMoney(tonumber(amount)) -- Add Clean Money
> 			xPlayer.removeAccountMoney('black_money', amount) -- Removes Dirty Money
> 			TriggerClientEvent('esx:showNotification', _source, "U cleaned:" ..amount)
> 		else
> 			TriggerClientEvent('esx:showNotification', _source, "U don't have dirty money...")
> 		end
> 	end
> end)

And remove any lane with shipments_plus in your client/main.lua

1 Like

Thanks for the support for them, I will run this script test it out and if it does fix the issue I will add it into the release as well as give you credit :slight_smile:

After Testing
I realized there is an issue also, If you do so many runs then you donā€™t have the amount that is paying out then it will say that you donā€™t have enough dirty money sadly, so there has to be a way that I can set it so it removes the dirty money after every delivery then when you have 0 dirty money its over.

I did what u said but i changed 1000 to 10000. I changed all checkpoints price to 10000 and it doesnā€™t work. I am getting always 1 point of delivery. No matter how much black money i have, 100k, 80k, 12k. Do u know why does it works like that?

I had problem with code prob. Work on that.

Please prove me your config.lua that way I can check something I think thats causing the issue

Please explain in more detail nothing I can do if you just say you had a problemā€¦ doesnā€™t really help me assist you in fixing it.

I said that to Piontak. And that was about the second code i gave (where i check how many dirty money player have).

Hello. I have a small problem with that script. I want to change a ammount of money after finished job cuz I can wash maximum 3000$. Where I can change it? :stuck_out_tongue:

Just change the delivery cost

If someone wants to fix the code this is what they need to do

  • Check their payout every frame or two or every delivery
  • Have it payout a fixed rate everytime they deliver instead of waiting till they are at the end of the delivery
  • then check if they have the payout amount if not then make them payout the remainder of their dirty money.
1 Like

Changelogs
Updated [9/11/18] 4:31PM EST

āœ”ļø Fixed Problem with not being able to do the job unless you were a specified job 
Every job can do it now except police.
āœ”ļø Fixed Payout not paying out till the end 
āœ”ļø Deliveries now pay out once you do the delivery

Post and Github has been updated If you run into issues let me know.

This is now in the github readme it should specify how to change the payout.

Change the max deliveries in the config should be at the top of the config.lua

Thanks we fixed that issue in the new If statement with the dirty money.

No Job no longer we removed the requirement for a specified job hope this helps.

This has been fixed if you want to test the new script more give it a shot.

In the github it shows what you need to look for to change the payout of each delivery.

Emm, i have to have a Postal job to laundry money ?

Could you help me help?
I have 5000 dirty money but I can not get the vehicle

Honestly, You donā€™t need gopostal job to be able to do the job anymore its been fixed so you donā€™t need the job

You need to put on your work wear then go to the other circle in the middle and choose the vehicle it will spawn it behind you it will actually spawn the van in the script you should look in the client file to see what its actually spawning.

emmm. Something dont work :frowning:

Change the

~= ā€œpoliceā€

to your police job on your server.

In policejob config?

No in my Script, There is a section stating if their job is not police then they can use that marker if their job is not police then they are able to clean their money

Can someone help me solve this error?
wanted to use this feature

In which folder i can find this? In server or client?