Exports

Client

OpenMenu - Opens the main money laundering menu

exports.lation_laundering:OpenMenu()

IsLaundering - Returns true or false if player is actively laundering

local IsLaundering = exports.lation_laundering:IsLaundering()
if IsLaundering then
    print('Player is currently laundering/running contracts')
else
    print('Player is NOT laundering')
end

GetTimeRemaining - Returns time remaining for money currently in washer

local hours, minutes, seconds = exports.lation_laundering:GetTimeRemaining()
print('Player has ' ..hours.. ' hours, ' ..minutes.. ' minutes and ' ..seconds.. ' seconds left until their money is ready')

PoliceCount - Returns the number of police currently online

local policeOnline = exports.lation_laundering:PoliceCount()
print('There are currently' ..policeOnline.. ' police online!')

GetBalance - Returns the total balance of dirty money player has

-- Must pass the type of balance we want to get
-- Options are: 'cash', 'bank', 'markedbills', 'black_money'
local balance = exports.lation_laundering:GetBalance('markedbills')
print('Player currently has $' ..balance.. ' dirty money')

GetData - Returns all player data or specific data about a player

local data = exports.lation_laundering:GetData()
print(data.level) -- Level
print(data.experience) -- Experience
print(data.contracts_completed) -- Total contracts completed
print(data.total_money_cleaned) -- Total money cleaned
print(data.pending) -- Amount of money currently pending (in washer)
print(data.time_remaining) -- Time remaining until money is ready (in milliseconds)

-- If only looking for a specific data type, can also be used like so:
local playerLevel = exports.lation_laundering:GetData('level')
print('Player is currently level: ' ..playerLevel)

Server

GetData - Returns all player data or specific data about a player

local data = exports.lation_laundering:GetData(source)
print(data.level) -- Level
print(data.experience) -- Experience
print(data.contracts_completed) -- Total contracts completed
print(data.total_money_cleaned) -- Total money cleaned
print(data.pending) -- Amount of money currently pending (in washer)
print(data.time_remaining) -- Time remaining until money is ready (in milliseconds)

-- If only looking for a specific data type, can also be used like so:
local playerLevel = exports.lation_laundering:GetData(source, 'level')
print('Player is currently level: ' ..playerLevel)

AddData - Edit/change a players stored data

-- source number: Player ID
-- amount number: Amount to add or set data too
-- dataType string: level, experience, contracts_completed, total_money_cleaned, pending, time_remaining
-- action string: add or set ('add' will increment the data and 'set' will overwrite the data)
exports.lation_laundering:AddData(source, amount, dataType, action)

CheckLevel - Performs a check if player needs a level up (run after adding XP)

-- source number: Player ID
-- Note: this must be ran anytime you add experience
exports.lation_laundering:CheckLevel(source)

IsLaundering - Returns true or false if player is actively laundering

local IsLaundering = exports.lation_laundering:IsLaundering(source)
if IsLaundering then
    print('Player is currently laundering/running contracts')
else
    print('Player is NOT laundering')
end

Last updated