[FREE] [QBCore] Flex Moneywash

QB-Core Flex Moneywash [FREE]

How it works
  1. Find the location
  2. Go inside
  3. Intert a coin to start the washingmachine
  4. Add moneybags inside the machine to wash
  5. Auto collect the clean money

Preview video: Watch here
Download here: Github
Direct download: Download


ADD This to items.lua or change in config

['washcoin'] 				 	 = {['name'] = 'washcoin', 			  	  		['label'] = 'Washcoin', 				['weight'] = 0, 		['type'] = 'item', 		['image'] = 'washcoin.png', 			['unique'] = false, 	['useable'] = false, 	['shouldClose'] = false,	['combinable'] = nil,   ['description'] = 'Coin for washingmachine'},
Code is accessible Yes
Subscription-based No
Lines (approximately) 218
Requirements Requirements
Support Yes (dm if needed)
5 Likes

config says money bag amount … but qbcore stores the value of the bags in the meta. how would i adapt this to wash the value of each bag

I think this should be it (don’t quote me on that)

Get the item info

local src = source
local Player = QBCore.Functions.GetPlayer(src)
local itemInfo = Player.Functions.GetItemByName('markedbills')

Then you can get

itemInfo.worth

Not tested but this should be it

RegisterNetEvent('flex-moneywash:server:reward', function()
    local src = source
    local Player = QBCore.Functions.GetPlayer(src)
    local itemInfo = Player.Functions.GetItemByName(Config.BagItem)
    local cashamount = Config.BagAmount * itemInfo.worth
    if Player.Functions.RemoveItem(Config.BagItem, Config.BagAmount) and Player ~= nil then
        TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items[Config.BagItem], "remove", Config.BagAmount)
        Player.Functions.AddMoney('cash', cashamount)
        TriggerClientEvent('QBCore:Notify', src, Lang:t('success.getmoney')..cashamount, 'success')
    end
end)
1 Like

Do you know any reason the location won’t show up? Everything is set correctly and there are no errors, but nothing is showing up @ the vec locations for the washers or tp.

Shoot me a dm here and we can try to figure it out

I added the script and everything works but I dont have the actual washing machines, what MLO (if any) do I need?

You dont need an MLO.
It is with a teleport system that send you to the default gta ipl location.

Then what do I need in order to see the washers? I get teleported into the room without washing machines

try using an IPL loader lke bob74 ipl
No idea if that will fix it tho

Dope script!

  • How can I change the € to $?
  • Use multiple machines (changing the “already using a machine”) so I don’t have to wait each time. I could use all machines if needed. I looked into the client/server side, but I must of missed it.

locales > en.lua
To change to dollar sign

To use more machines
client > main > remove line 137, 147, 148, 149
99% sure it will stop working tho

It’s on en.lua, message still shows €moneyamount instead of $moneyamount


Update You have the € in the en.lua
image

Thanks again for the script!

Its up to you to change it to whatever money sign you need :smiley:

1 Like

Paste this into the client.lua? and what do I comment out?

Check in your code editor for these line numbers
137
147
148
149

Lol you lost me there. What am I checking for?

shoot me a dm here

washcoin.png not included? not major, just curious if you had an image in mind.

1 Like

Thats up to you to create to fit in your design of your city! :smiley:

1 Like

cool, just wanted to make sure there wasnt a specific image you had in mind.
love the resource by the way, quick, simple and effective!
:+1:

1 Like