Server
getName
Function to get player's name in the game (not steam name)
function HRLib.bridge.getName(playerId: integer, nameType: 'firstname'|'lastname'?):
string? playerNameParameters description
playerId- the target player's server IdnameType- the name type,'firstname','lastname'ornilfor both with space between them
Return description
playerName- the player's name
getJob
Function to get player's job
function HRLib.bridge.getJob(playerId: integer, returnGrade: boolean?):
string? jobName,
integer? jobGradeParameters description
playerId- the target player's server IdreturnGrade- sets whether or not return grade of the player in its current job
Return description
jobName- the current player job's namejobGrade- the current player job's grade (only available if returnGrade is true)
getMoney
Function to get player's money balance
function HRLib.bridge.getMoney(playerId: integer, account: 'cash'|'bank'):
integer? moneyBalanceParameters description
playerId- the target player's server Idaccount- the account to focus on getting the balance of
Return description
moneyAmount- the amount of money in the specified account
setJob
Function to set player's job and grade
function HRLib.bridge.setJob(playerId: integer, jobName: string, jobGrade: integer)Parameters description
playerId- the target player's server IdjobName- the job namejobGrade- the job grade
setMoney
Function to set player's money balance in a specific account
function HRLib.bridge.setMoney(
playerId: integer,
account: 'cash'|'bank',
amount: integer
)Parameters description
playerId- the target player's server Idaccount- the account to focus on setting the money balanceamount- the amount to set
removeMoney
Function to remove money from the current balance in the specified account
function HRLib.bridge.removeMoney(
playerId: integer,
account: 'cash'|'bank',
amount: integer
)Parameters description
playerId- the target player's server Idaccount- the account to focus on removing money ofamount- the amount to remove from the balance
giveMoney
Function to give money to target player's account
function HRLib.bridge.giveMoney(
playerId: integer,
account: 'cash'|'bank',
amount: integer
)Parameters description
playerId- the target player's server Idaccount- the account to focus on giving the money toamount- the amount to add to the account's balance
doesJobExist
Function to check if a specific job name exists in the framework's jobs list
function HRLib.bridge.doesJobExist(jobName: string, jobGrade: string?): booleanParameters description
jobName- the name of the jobjobGrade- specific job grade for the chosen jobName if you want to check if this specific grade exists for the job
Last updated