Server
Server-sided exports
GetReputationData
Returns basic reputation stats as a plain table.
exports["t1ger_chopshop"]:GetPlayerReputation(src)
Parameters
src
(number) – The player's server ID.
Returns
table|nil
– A table with:points
(integer) – Reputation pointsparts
(integer) – Total parts choppedscraps
(integer) – Total full vehicles scrapped
AddReputationPoints
Adds reputation points to a player and syncs it to their statebag.
exports["t1ger_chopshop"]:AddReputationPoints(src, amount)
Parameters
src
(number) – The player's server ID.amount
(number) – The amount of XP to add.
Returns
boolean
–true
if successful,false
otherwise.
RemoveReputationPoints
Removes reputation points from a player (min 0), and syncs to statebag.
exports["t1ger_chopshop"]:RemoveReputationPoints(src, amount)
Parameters
src
(number) – The player's server ID.amount
(number) – The amount of XP to remove.
Returns
boolean
–true
if successful,false
otherwise.
SetReputationPoints
Sets a player’s reputation points directly and syncs to statebag.
exports["t1ger_chopshop"]:SetReputationPoints(src, amount)
Parameters
src
(number) – The player's server ID.amount
(number) – The amount of XP to remove.
Returns
boolean
–true
if successful,false
otherwise.
GetChopList
Returns the current active Chop List entries.
exports["t1ger_chopshop"]:GetChopList()
Returns
ChopListEntry[]
– An array of chop list entries with model, hash, quota, and remaining fields.
GetChopListRefreshTime
Returns the remaining time (in seconds) until the next Chop List refresh.
exports["t1ger_chopshop"]:GetChopListRefreshTime()
Returns
integer
– Seconds remaining until the next chop list update.
RefreshChopList
Force-refreshes the Chop List immediately. Useful for admin tools, debugging, or manual triggers.
exports["t1ger_chopshop"]:RefreshChopList()
Returns
void
CreateBounty
Creates a bounty entry in the database and deducts the reward from the player's cash. Only valid, existing vehicles (if a plate is provided) and players with sufficient funds can place a bounty.
exports["t1ger_chopshop"]:CreateBounty(src, model, plate, reward)
Parameters
src
(number
) – The server ID of the player placing the bounty.model
(string
) – The vehicle model name (e.g.,"sultan"
).plate
(string | nil
) – (Optional) Specific license plate to target. Ifnil
, any vehicle of the model is valid.reward
(number
) – The cash reward the player is offering for the bounty.
Returns
boolean
–true
if the bounty was created successfully,false
if validation failed (e.g., invalid model, unowned plate, insufficient funds).
RemoveBounty
Removes an active bounty from the database and optionally refunds the player based on configuration. Only valid, unclaimed bounties placed by the requesting player can be removed.
exports["t1ger_chopshop"]:RemoveBounty(src, bountyId)
Parameters
src
(number
) – The server ID of the player attempting to remove the bounty.bountyId
(number
) – The database ID of the bounty to be removed.
Returns
boolean
–true
if the bounty was removed successfully,false
if validation failed (e.g., bounty not found, not owned by player, already completed).
Last updated