My players had loads of issues with the traphouse in QBCore, so I made this for my server. It includes a lot of configuration and the config.lua is commented so you can change & configure it to suit your server.
This script is designed to work with gtaDPS’s Abandoned Laundromat MLO, if you do not use this you will need to change the coordinates in config.lua
Features
Leave your dirty money at the laundromat while it gets cleaned
Phone notification when it’s completed
Make more marked bills take longer
Earn more from laundering marked bills when police are around
I downloaded this a few moments ago and upon restarting the server, I get this error and nothing showing up in the Laundromat map.
[ c-scripting-core] Creating script environments for qb-overlord-laundering
[ c-scripting-core] Failed to load script @qb-core/import.lua.
[script:qb-overlord-l] Error loading script config.lua in resource qb-overlord-laundering: citizen:/scripting/lua/scheduler.lua:881: No such export GetSharedObject in resource qb-core
[script:qb-overlord-l] stack traceback:
[script:qb-overlord-l] [C]: in function 'error'
[script:qb-overlord-l] citizen:/scripting/lua/scheduler.lua:881: in metamethod '__index'
[script:qb-overlord-l] @qb-overlord-laundering/config.lua:1: in main chunk
[ c-scripting-core] Failed to load script config.lua.
Under advice from friends, I changed line 1 of config.lua to
local QBCore = exports['qb-core']:GetCoreObject()
Which loads up the 3D text at the Washing Machines, but now I get this error
SCRIPT ERROR: @qb-overlord-laundering/server/main.lua:14: attempt to index a nil value (global 'QBCore')
Edit: Got it fixed. Small thing after the fact, changing server/main.lua’s getPlayerData to getPlayer, and now the script works great. Thanks for creating it in the first place!
i got the same error
SCRIPT ERROR: @qb-overlord-laundering/server/main.lua:14: attempt to index a nil value (global ‘QBCore’)
and I have tried to change this server/main.lua’s getPlayerData to getPlayer
but i still get the same error can you help me?
Did you manage to get it working, Ive put local QBCore = exports[‘qb-core’]:GetCoreObject() on line 1 on the config file and the getplayerdata was already changed to getPlayer but still getting the error
[script:qb-overlord-l] SCRIPT ERROR: @qb-overlord-laundering/server/main.lua:14: attempt to index a nil value (global ‘QBCore’)
I cannot get this working aha Ive done all what you have but still have the following error.
i can press E to wash and it removes Marked_money from inventory but the 3dtxt staying on washing infinite.
try to edit the time in the config like this
CONFIG[‘BaseTime’] = math.random(4,5) – time in minutes the washing machine always takes
–CONFIG[‘BaseTime’] = 1
CONFIG[‘TimePerItem’] = math.random(3,4) – time in minutes each additional item of dirty money adds
–CONFIG[‘TimePerItem’] = 1
Still unable to get this to work… The interact E text is there, but does nothing. I’ve added the local QBCore = exports[‘qb-core’]:GetCoreObject() to the files,
here’s what the console tells me…
[ c-scripting-core] Creating script environments for qb-overlord-laundering
[ c-scripting-core] Failed to load script @qb-core/import.lua.
[script:qb-overlord-l] Error parsing script @qb-overlord-laundering/server/main.lua in resource qb-overlord-laundering: @qb-overlord-laundering/server/main.lua:1: unexpected symbol near ‘<\226>’
[ c-scripting-core] Failed to load script server/main.lua.
[ citizen-server-impl] Started resource qb-overlord-laundering