Exports
Server-Side Exports
updateStats
What it does Increments a particular stat (e.g. arrests, ticketsIssued) for a player’s job, and optionally logs the event.
Parameters
src
(number) — the player’s server source IDjobName
(string) — key of the job to update (e.g."police"
)statName
(string) — which stat to bump ("arrests"
,"ticketsIssued"
, etc.)amount
(number) — how much to adddoLog
(boolean) — iftrue
, the update will be logged (if logging is enabled)
Example
addSocietyDeposit
What it does Moves money from a boss’s personal cash or bank into the shared society account for that job.
Parameters
source
(number) — the boss’s server source IDjobName
(string) — the society job key (e.g."mechanic"
)amount
(number) — how much to deposit (must be > 0)moneyType
(string) —"cash"
or"bank"
Returns
(number) new society balance on success
false
on error (e.g. insufficient funds, invalid job)
Example
withdrawSocietyFunds
What it does Removes money from the shared society account and gives it to the boss’s cash or bank.
Parameters
source
(number) — the boss’s server source IDjobName
(string) — the society job key (e.g."ambulance"
)amount
(number) — how much to withdraw (must be > 0)moneyType
(string) —"cash"
or"bank"
Returns
(number) new society balance on success
false
on error (e.g. not a boss, insufficient society funds)
Example
getSocietyBalance
What it does Returns the current balance of the boss’s society account, and (if applicable) the full transaction history.
Parameters
source
(number) — any player source; must be a boss of at least one job
Returns
(number) current society balance
(table | nil) array of transaction records, each
{ date, who, name, action, amount }
, ornil
if using external banking
Example
Last updated