Resources
Types
Player

Player

Fields

Functions

SetJob

Attempts to overwrite the player's primary job and grade, and returns whether it was successful.

Player.Functions.SetJob(jobName, grade)
  • jobName: string
  • grade: integer

Returns: boolean

SetGang

Attempts to overwrite the player's primary gang and grade, and returns whether it was successful.

Player.Functions.SetGang(gangName, grade)
  • gangName: string
  • grade: integer

Returns: boolean

SetJobDuty

Sets the player's duty.

Player.Functions.SetJobDuty(onDuty)
  • onDuty: boolean

SetPlayerData

Overwrites the given top level key of the PlayerData with the given value.

Player.Functions.SetPlayerData(key, val)
  • key: string
  • val: any

SetMetaData

Stores the given key value pair in the player's metadata.

Player.Functions.SetMetaData(meta, val)
  • meta: string
  • val: any

GetMetaData

Returns the value pair of the given key in the player's metadata.

Player.Functions.GetMetaData(meta)
  • meta: string

Returns: any

AddJobReputation

Adds the given amount to the player's job reputation.

Player.Functions.AddJobReputation(amount)
  • amount: number

AddMoney

Attempts to add the given amount of money as the given type, and returns whether it was successful.

Player.Functions.AddMoney(moneytype, amount, reason)
  • moneytype: 'cash' | 'bank' | 'crypto'
  • amount: number
  • reason?: string

Returns: boolean

RemoveMoney

Attempts to subtract the given amount of money as the given type, and returns whether it was successful.

Player.Functions.RemoveMoney(moneytype, amount, reason)
  • moneytype: 'cash' | 'bank' | 'crypto'
  • amount: number
  • reason?: string

Returns: boolean

SetMoney

Attempts to set the given amount of money as the given type, and returns whether it was successful.

Player.Functions.SetMoney(moneytype, amount, reason)
  • moneytype: 'cash' | 'bank' | 'crypto'
  • amount: number
  • reason?: string

Returns: boolean

GetMoney

Returns the amount of money of the given type, or false if the type doesn't exist.

Player.Functions.GetMoney(moneytype)
  • moneytype: 'cash' | 'bank' | 'crypto'

Returns: number | false

SetCreditCard

Sets the player's owned credit card number.
Does not give the player's character any items.

Player.Functions.SetCreditCard(cardNumber)
  • cardNumber: number

Save

Saves the player's current character info to the database.

Player.Functions.Save()