Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Server

Server-sided exports

AddBusiness

Gives a player a business. It skips the reputation and price requirements, but the player still can't own two businesses and the location must be free.

local success, reason = exports["t1ger_moneywash"]:AddBusiness(identifier, businessType, locationId)

Parameters

  • identifier – string – The identifier of the player who receives the business (the framework identifier, for example the ESX identifier or the QBCore citizen ID).

  • businessType – string – The business type, matching a key in shared/locations.lua (for example "coffee_shop").

  • locationId – integer – The ID of the location in shared/locations.lua.

Returns

  • boolean – true if the business was given, false otherwise.

  • string – "success", or the reason it failed: "business_store_not_ready" (the script is still loading), "invalid_player", "invalid_type", "invalid_location", "already_owned" (the location has an owner), "already_owns_business" (the player already has one) or "database_error".


RemoveBusiness

Removes a business permanently and puts its location back on the market. An active stock order for it is cancelled and refunded, and the owner is notified if they are online.

local success, reason = exports["t1ger_moneywash"]:RemoveBusiness(businessType, locationId)

Parameters

  • businessType – string – The business type, for example "coffee_shop".

  • locationId – integer – The ID of the business's location.

Returns

  • boolean – true if the business was removed, false otherwise.

  • string – "success", or the reason it failed: "invalid_type", "invalid_location", "not_owned" (nobody owns that location), "raid_in_progress", "review_in_progress" (the business is busy right now) or "database_error".


IsBusinessInReview

Returns whether a business currently has a books review running, from the first opened desk until the folder is delivered.

Parameters

  • businessId – integer – The business ID.

Returns

  • boolean – true if the business is in a review, false otherwise.


IsOnContractShift

Returns whether a player is currently on a launder contract shift.

Parameters

  • source – integer – The player's server ID.

Returns

  • boolean – true if the player is on a shift, false otherwise.


GetPlayerReputation

Returns a player's reputation points and the title of their current level.

Parameters

  • source – integer – The player's server ID.

Returns

  • table? – The player's reputation, or nil if it hasn't loaded yet:

    • points – integer – The player's total reputation points.

    • level – string – The title of the player's current level (for example "Registered").


IsReputationReady

Returns whether a player's reputation has finished loading from the database. Check it before you read or change reputation right after a player joins.

Parameters

  • source – integer – The player's server ID.

Returns

  • boolean – true if the reputation is loaded, false otherwise.


AddReputationPoints

Adds reputation points to a player and updates their screen straight away.

Parameters

  • source – integer – The player's server ID.

  • amount – number – The points to add.

Returns

  • boolean – true if the points were added, false if the player's reputation isn't loaded or amount isn't a number.


RemoveReputationPoints

Removes reputation points from a player. The total never goes below 0.

Parameters

  • source – integer – The player's server ID.

  • amount – number – The points to remove.

Returns

  • boolean – true if the points were removed, false if the player's reputation isn't loaded or amount isn't a number.


SetReputationPoints

Sets a player's reputation points directly. The value is rounded down and never goes below 0.

Parameters

  • source – integer – The player's server ID.

  • amount – number – The new total of points.

Returns

  • boolean – true if the points were set, false if the player's reputation isn't loaded or amount isn't a number.

Last updated