money laundering
Requirements, install steps, items and first start for money laundering (lation_laundering), a FiveM script where players wash dirty money through buyers around the city and at a warehouse.
With money laundering (lation_laundering), players wash dirty money two ways. They take contracts from a launderer and meet buyers around the city, trading dirty money for cash on the spot, and can haggle for a bigger deal. From level 5 they buy the key to a warehouse, wash larger amounts on a timer and count the bills into cash at a money counter. Every option is in config.lua, every line of text in strings.lua and the Discord logs in logs.lua.
Works on Qbox, QBCore and ESX.
Requirements
| Resource | Needed | What for |
|---|---|---|
oxmysql | Required | Each player's level, stats and wash in progress |
ox_lib | Required | Callbacks, the alert and amount dialogs, and the default menus, notifications and progress bars |
es_extended or qb-core | Required | Players, money and items |
bob74_ipl | Required for the default warehouse | Fills the warehouse interior with its washing machines and money counters. Not needed if you move the warehouse into your own interior. |
| An inventory | Required | ox_inventory is used directly when it runs; any other inventory works through your framework's item functions. |
lation_ui | Optional | Menus, notifications, progress bars and text prompts in the lation ui look. The text prompts use it unless you change them: see prompts. |
ox_target, qb-target or qtarget | Optional | Target options in place of text prompts. lation interact answers all three. |
qb-menu | Optional | Menus, with Config.Menu = 'qb' |
okokNotify, sd-notify or wasabi_notify | Optional | Other notification systems |
jg-textui or okokTextUI | Optional | Other text prompts |
| A phone | Optional | A message when a wash is done, picked in Config.Phone: qb-phone, npwd, qs-smartphone, Quasar's Smartphone PRO (qs-smartphonepro), lb-phone, gksphone or yseries |
| A dispatch | Optional | An alert when a buyer turns a player down: cd_dispatch, ps-dispatch, qs-dispatch, core_dispatch, rcore_dispatch, aty_dispatch or linden_outlawalert |
| A fuel script | Optional | Fills the contract car: LegacyFuel, cdn-fuel, ps-fuel, lj-fuel, okokGasStation or nd_fuel |
| A keys script | Optional | Keys to the contract car: wasabi_carlock, okokGarage, qb-vehiclekeys, qs-vehiclekeys, cd_garage, vehicles_keys, t1ger_keys or Renewed-Vehiclekeys |
oxmysql and ox_lib are dependencies in fxmanifest.lua. On Qbox, qbx_core answers as qb-core, so it runs through the QBCore side of the bridge. The framework and ox_inventory are detected when the script loads, so they must start before it. Fuel and keys scripts are used when they are running, with nothing to set.
Install
Follow the install guide, then:
Keep the folder name
Keep the folder name lation_laundering. The script calls its own exports by that name, and a renamed folder prints an error on start and again every 15 minutes.
Add the items
Add the two items and their images to your inventory. The files ship in install/items/, and the images in install/items/images/ are named after the items.
Paste the contents of install/items/ox_inventory.txt into ox_inventory/data/items.lua, then copy both files in install/items/images/ into ox_inventory/web/images/. This is the one to use on Qbox.
Paste the contents of install/items/qb-inventory.txt into qb-core/shared/items.lua, then copy both files in install/items/images/ into qb-inventory/html/images/.
Paste the contents of install/items/qs-inventory.txt into the item list of qs-inventory, then copy both files in install/items/images/ into its image folder.
Add the same two items in your inventory's own format, with the labels in items below, and copy both images into its image folder.
Point it at your dirty money
Every level in Config.Levels names the dirty money it takes in dirtyMoney, and every level ships set to markedbills. Set it to what your server uses. See levels.
If your dirty money is markedbills, set Config.QBCore.metadata = false, so each one counts as $1, or give each a fixed value with hardValues. Otherwise set every level's dirtyMoney to your own item. See QBCore dirty money.
The defaults suit QBCore's markedbills: each bag counts at the worth stored on it, and every bag the player carries adds up. If yours carry no worth, set Config.QBCore.metadata = false (each counts as $1) or give them a fixed value with hardValues. See QBCore dirty money.
Set every level's dirtyMoney to black_money, ESX's dirty money account:
Config.Levels = {
[1] = {
dirtyMoney = 'black_money',
taxRate = 25,
-- ...
},
-- the same in [2] to [5]
}The warehouse takes the dirty money of the level it unlocks at, level 5 by default.
Choose how players interact
With Config.Target = 'none', the default, players get a text prompt on screen and press E. The prompts are drawn by lation ui unless you change them: without lation_ui, set the text UI at the top of client/functions.lua to 'ox_lib', or players can't talk to the launderer.
local textui = 'ox_lib' -- 'lation_ui', 'ox_lib', 'jg-textui', 'okokTextUI' or 'qbcore'To use a target instead, set Config.Target to 'ox_target', 'qb-target' or 'qtarget'. With lation interact, pick 'ox_target'. See interfaces.
Ensure it
Start it after your framework, your inventory, bob74_ipl and anything it uses. If you run lation ui, it goes first, above ox_lib, because the lation ox_lib fork looks for it when ox_lib starts.
ensure lation_ui # optional
ensure oxmysql
ensure ox_lib
ensure qbx_core # or qb-core / es_extended
ensure ox_target # optional: or lation_interact / qb-target
ensure ox_inventory # your inventory
ensure bob74_ipl
ensure lation_launderingThen restart the server.
The database
There is no SQL to import. On every start the script runs install/lation_laundering.sql, which creates the lation_laundering table when it's missing, so keep the install folder: without the file, the console prints an error every 10 seconds.
| Column | Holds |
|---|---|
player_identifier | The ESX identifier, or the citizenid on Qbox and QBCore |
level | Current level, from 1 |
experience | XP earned at the current level |
contracts_completed | Lifetime contracts |
total_money_cleaned | Lifetime dirty money laundered |
pending | Dirty money in the washing machine |
time_remaining | Milliseconds left on that wash |
Players are added the first time they're looked up. Their record is saved when they leave, when the resource stops and when txAdmin shuts the server down.
install/rename_table.sql is for servers coming from version 1: it renames the old money_washing table to lation_laundering.
What ships open
config.lua, strings.lua, logs.lua, the framework bridge in bridge/, client/functions.lua and server/functions.lua are unescrowed. The last two hold the integrations and the hooks; see developers.
Items
| Item | Label | Weight | Usable |
|---|---|---|---|
warehouse_key | Warehouse Key | 25 in ox_inventory, 20 in qb-inventory and qs-inventory | No, carried to enter the warehouse |
uncounted_money | Uncounted Money | none in ox_inventory, 1 in qb-inventory and qs-inventory | No, counted into cash at a money counter |
The names can be changed in Config.Items. The dirty money is your server's own and doesn't ship with the script.
First start
The launderer stands at 138.69, 270.68, 109.97 with a Money Laundering blip. Players walk up and talk to open the menu.
New Contract starts a run: a car for a deposit, then a buyer marked on the map. Follow contracts and the warehouse.
At level 5 the menu sells the warehouse key, and the Warehouse blip marks the door at 1142.69, -986.67, 45.91.
To try the warehouse without working up to level 5, set your level to 5 in the lation_laundering table while you're off the server. Records are kept in memory while a player is on, and saved over the table when they leave.
Troubleshooting
Nothing happens near the launderer
With text prompts (Config.Target = 'none'), the prompts are drawn by lation ui unless you changed the text UI in client/functions.lua. Without lation_ui running, set it to 'ox_lib'. With a target, check that Config.Target names the one you run; any other value prints "No target system defined in the config file." in the F8 console.
The buyer says You don't have enough money on you
The levels' dirtyMoney doesn't match the dirty money the player carries. On ESX set it to black_money. On QBCore, markedbills count by the worth stored on each bag; if yours carry no worth, set Config.QBCore.metadata = false. On Qbox with markedbills, set Config.QBCore.metadata = false. See install.
The warehouse is empty inside
Its washing machines and money counters come from bob74_ipl. Update it to the latest release, start it before lation_laundering and restart the server.
The console says to rename the folder
The resource folder isn't named lation_laundering. Rename it back and restart; the message repeats every 15 minutes until you do.
The console says install folder or .sql files missing
install/lation_laundering.sql was deleted or moved. Put the install folder back; the table is created from it on every start.
The console says Unable to fetch version information from API
The update check couldn't reach the version server. It changes nothing in game. Set Config.VersionCheck = false to skip it.
Still stuck? Ask in our Discord: the people who write the scripts answer.
Last updated