Player Functions
Functions available on the server player object. Use GetPlayer to retrieve the object.
Last updated
Functions available on the server player object. Use GetPlayer to retrieve the object.
Last updated
To first access the player functions, you need to get the player
Parameter | Required | Type | Description |
---|---|---|---|
Add money to the player in the selected place
Parameter | Required | Type | Description |
---|---|---|---|
Remove money from the player in the selected place
Add a job to the player
Remove a job to the player
Returns a bool indicating if the player (character) has the defined job. If a grade is also defined, it'll return a bool indicating if the player (character) has the defined job and grade. If the player (character) doesn't have the job (and optionally, the grade) then it'll return a second string value indicating if the mismatch is the defined job or grade
Returns a bool indicating if the player (character) has the defined job and grade access
Returns either a bool or a string indicating if the player is on duty for any or the optionally defined job. If the player is on duty, it'll also return the grade level of the on-duty job
Returns either a bool or a string indicating if the player is on duty for a job that is a business
Returns a bool indicating if the player duty was set
Add an item to the player's inventory
Remove an item to the player's inventory
Update the metadata/info of a specific item
Returns a bool indicating if the player (character) has the defined item
Set metadata on the player object
Set the rep value for a player. Will initialise at a value of 0 if it doesn't exist
Adds the rep value to the existing rep for a player. Will initialise at a value of 0 if it doesn't exist
Returns the full name of the player character
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Requried | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
source
Number
Source of the player
type
String
Money type e.g. cash or bank
amount
Number
Amount to be added
reason
String
Reason (Shown on bank statements)
type
String
Money type e.g. cash or bank
amount
Number
Amount to be removed
reason
String
Reason (Shown on bank statements)
job
String
The job to add to the player
grade
Number
The grade to set the player to. If not set will default to 1
job
String
The job to remove from the player
job
String
The job name that the player must have
grade
Number
The grade number that the player must have
job
String
The job name that the player must have
grade
Number
The grade number that the player must have
maxGrade
Bool
This defines the grade floor and ceiling when checking for access
job
String
The job name that'll be used to check if the player is on duty
job
String
The job to set duty for
onDuty
Bool
If the player should be set on duty
item
String
The item to add to the player
amount
Number
The amount of items to add
slot
Number
The specific slot to add the item to
info
Object
The info/metadata for the object
item
String
The item to remove from the player
amount
Number
The amount of items to remove
slot
Number
The specific slot to remove the item from
slot
Number
The slot to update
slotIndex
Number
The slot index to update
info
Object
The updated item metadata (full object)
name
String
The item name to check for
metadataKey
String
The key to set within the player object
value
Any
The value to set
rep
String
The rep to set
value
Any
The value to set
rep
String
The rep to add to
value
Any
The value to add