DirkScripts
Docs
Client
#lib.player.identifier
Get the current character's unique identifier (citizenid)
lualocal id = lib.player.identifier()
#lib.player.name
Get the current character's name
lualocal first, last = lib.player.name()
#lib.player.getPlayerData
Get the full player data object, or a specific key from it
lualocal data = lib.player.getPlayerData(key)
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | no | Specific key to retrieve. Omit for full data object |
#lib.player.getMetadata
Get player metadata, or a specific metadata key
lualocal meta = lib.player.getMetadata(key)
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | no | Specific metadata key. Omit for all metadata |
#lib.player.getMoney
Get the player's balance for a specific account
lualocal amount = lib.player.getMoney(account)
| Parameter | Type | Required | Description |
|---|---|---|---|
| account | string | yes | Account name (e.g. "cash", "bank") |
#lib.player.getJob
Get the player's current job data
lualocal job = lib.player.getJob() -- job.name, job.label, job.grade, job.gradeLabel, job.onDuty
#lib.player.getGang
Get the player's current gang data
lualocal gang = lib.player.getGang()
#lib.player.editStatus
Modify player status values (hunger, thirst, etc.)
lualib.player.editStatus(status)
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | table | yes | Status changes to apply |
#lib.player.getItems
Get all items in the player's inventory
lualocal items = lib.player.getItems()
#lib.player.getLicenses
Get all licenses the player holds
lualocal licenses = lib.player.getLicenses()
#lib.player.hasLicense
Check if the player has a specific license
lualocal has = lib.player.hasLicense(license)
| Parameter | Type | Required | Description |
|---|---|---|---|
| license | string | yes | License name to check |
#lib.player.hasGroup
Check if the player belongs to a specific group (job/gang)
lualocal has = lib.player.hasGroup(group)
| Parameter | Type | Required | Description |
|---|---|---|---|
| group | string | yes | Group name to check |
#lib.player.setSkin
Open the skin/character appearance editor
lualib.player.setSkin()
#lib.player.openCustomisation
Open the clothing/barber customisation menu
lualib.player.openCustomisation()
