[Release] ESX_BLACKMONEY (Moneywash)

[Information]:

This is a script based on ESX, I’m using this on my server and I’ve disabled the esx_society moneywash due bugs which I couldn’t solve. This script is very easy to use and it’s restricted to an item called “moneywashid”. If the user has this item the user will be able to use the moneywash otherwise the player won’t be able to use the moneywash. Might be useful for some of you.
The money wash is located in Vinewood (the taxi company). There’s a marker outside of one of the doors.

NOTE: I do not support this script, it works as it is.

[Features]:

Opportunities

-Wash the dirtymoney.
-Restricted to an item.
-Print logs to console
-Easy setup/use

[Installation]:

Guide
  1. Add the following row into your server.cfg “start esx_blackmoney”.
  2. Insert the esx_blackmoney folder into your resource folder.
  3. Insert the blackmoney.sql file into your database in order to get the item to work.
  4. Restart/Start your server and it should all work.

[Screenshots]:

Images

mw1
mw2

[Download]:

esx_blackmoney.rar (2.0 KB)

NOTE: As I mentioned before I do no longer support this script and will most likely not do that in the future either. You’re free to post any edits in the comment section.

- P4NDA

6 Likes

Sounds like typical ESX… lets release a resource to the community and not support shit. Great work…sarcasm.

5 Likes

Sounds good.

Any screenshoots?

Why have you made an event for the notifcation, i get spams of notifications when im 0.5 distance to markers. I think you should work more before releasing.

1 Like

There’s a new .rar file with a better version of this script. Thanks for your feedback.


ESX = nil

Citizen.CreateThread(function()
	while ESX == nil do
		TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
		Citizen.Wait(0)
	end
end)

RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer)
    PlayerData = xPlayer
end)

function hintToDisplay(text)
	SetTextComponentFormat("STRING")
	AddTextComponentString(text)
	DisplayHelpTextFromStringLabel(0, 0, 1, -1)
end

local place = {
    --{x = 895.39,y = -179.52,z = 74.7},
	{x = 895.39,y = -179.52,z = 73.7}
}

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
        for k in pairs(place) do
            -- Marker (START)
            DrawMarker(27, place[k].x, place[k].y, place[k].z, 0, 0, 0, 0, 0, 0, 1.001, 1.0001, 0.5001, 0, 255, 50, 200, 0, 0, 0, 0)
			-- Marker (END)
        end
    end
end)

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)

        for k in pairs(place) do

            local plyCoords = GetEntityCoords(GetPlayerPed(-1), false)
            local dist = Vdist(plyCoords.x, plyCoords.y, plyCoords.z, place[k].x, place[k].y, place[k].z)

            if dist <= 0.5 then
                --doesnt spam notifcations only shows top corner
                hintToDisplay('Press ~INPUT_CONTEXT~ to wash your ~g~money')
				
				if IsControlJustPressed(0, 38) then -- "E"
					TriggerServerEvent('esx_blackmoney:washMoney')
				end			
            end
        end
    end
end)

server.lua

ESX = nil

TriggerEvent('esx:getSharedObject', function(obj)
	ESX = obj
end)

RegisterServerEvent('esx_blackmoney:washMoney')
AddEventHandler('esx_blackmoney:washMoney', function()
	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
	local accountMoney = 0
	
	accountMoney = xPlayer.getAccount('black_money').money

	local ticketQuantity = xPlayer.getInventoryItem('moneywashid').count
	
	if ticketQuantity > 0 then
		if accountMoney < 99 then
			notification('You do not have enough ~r~Black Money~s~ to wash')
		else
			xPlayer.removeAccountMoney('black_money', 100)
			xPlayer.addMoney(100)
			notification('You ~g~washed~s~ 100 cash')
		end
	else
		notification('You do not have access to wash money')
	end
end)

function notification(text)
	TriggerClientEvent('esx:showNotification', source, text)
end

this is what i did
no notifications spams, fixed notifcations in server to show whats happening, removed unescessary things in server.

was.rar (2.0 KB)

1 Like

Please god take away the key table.

Whenever I try to use it, I get “You do not have access to use this” I have 10k dirty money. Anyone know a fix to make anyone be able to use it?

You need to have the item called ”moneywashid” in your inventory. There’ll soon be a release where it’s restricted to the taxi job instead. If this didn’t solve your problem then please wait for the next release.

— Best regards

[Release] ESX_BLACKMONEY (Moneywash).url (91 Bytes) were do I get the ticket from or is there away to take the part out

Modify the server/main.lua:

ESX = nil

TriggerEvent('esx:getSharedObject', function(obj)
	ESX = obj
end)

RegisterServerEvent('esx_blackmoney:washMoney')
AddEventHandler('esx_blackmoney:washMoney', function()
	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
	local accountMoney = 0
	
	accountMoney = xPlayer.getAccount('black_money').money

	if accountMoney < 99 then
		notification('You do not have enough ~r~dirty money~s~ to wash')
	else
		xPlayer.removeAccountMoney('black_money', 100)
		xPlayer.addMoney(100)
		notification('You ~g~washed~s~ 100 ~r~dirty money')
	end
end)

function notification(text)
	TriggerClientEvent('esx:showNotification', source, text)
end

Would it be possible for you to allow anyone to do this? Like, without the item? Or is that already a feature. I can’t find a good money wash script.

Cheers!

The following one will allow everyone to wash their money:

esx_blackmoney_everyone.rar (1.9 KB)

4 Likes

Damn, thank you brother.

1 Like

How can I put every 20 seconds to wash 1000 of dirty money?

How do i give the ticket to a gang?

Should add license for this :smiley:

can someone tell me why isnt the menu button working on this thanks

howto select a anount for washing, not the 100 preinstalled but that u can give in a anount to wash

you do not have a tiket to user our moneywasher solucion¿?