Types
Classes and aliases used by export parameters and return values.
Named types from each resource's types/ folder. Fields marked optional may be nil.
cobalt_core
BanIdentifier
'license' | 'discord' | 'steam'
BanOptions
| Field | Type | Optional | Description |
|---|---|---|---|
reason | string | No | |
bannedBy | string | No | |
expire | integer | Yes | unix time the ban ends, permanent when nil |
identifiers | BanIdentifier[] | Yes | which of the player's identifiers to ban, all three when nil |
CardItemMetadata
| Field | Type | Optional | Description |
|---|---|---|---|
citizenid | string | No | |
firstname | string | No | |
lastname | string | No | |
birthdate | string | No | YYYY-MM-DD |
gender | integer | No | 0 male, 1 female |
nationality | string | No | |
licence | string | Yes | the licence key, such as driver or weapon; missing on an ID card |
issued | string | No | YYYY-MM-DD, the day the card was made |
CharInfo
| Field | Type | Optional | Description |
|---|---|---|---|
firstname | string | No | |
lastname | string | No | |
birthdate | string | No | |
gender | 0 | 1 | No | |
nationality | string | No | |
phone | string | Yes | |
account | string | Yes |
Commands
| Field | Type | Optional | Description |
|---|---|---|---|
List | table<string, table> | No | |
IgnoreList | table<string, boolean> | No |
Core
The table GetCoreObject() returns. Players, Commands and Player exist on the server only; PlayerData on the client only.
| Field | Type | Optional | Description |
|---|---|---|---|
Functions | Functions | No | |
Shared | Shared | No | |
Players | table<integer, CorePlayer> | No | |
PlayersByCid | table<string, CorePlayer> | No | |
PlayersByLicense | table<string, CorePlayer> | No | |
PlayersByPhone | table<string, CorePlayer> | No | online characters by PlayerData.phone_number |
Player | PlayerModule | No | |
Commands | Commands | No | |
Player_Buckets | table<integer, { id: integer, bucket: integer }> | No | |
Entity_Buckets | table<integer, { id: integer, bucket: integer }> | No | |
PlayerData | PlayerData | No |
CoreAccount
| Field | Type | Optional | Description |
|---|---|---|---|
license | string | No | |
name | string | Yes | the connected player's name, or else the name saved with the most recently changed character |
stateid | integer | Yes | the permanent number from state_ids, nil when the license has never connected |
online | CoreAccountOnline | Yes | nil when the license isn't connected |
characters | CoreAccountCharacter[] | No | every character on the license, by slot |
bans | CoreAccountBan[] | No | bans on the license, newest first, active and expired |
CoreAccountBan
| Field | Type | Optional | Description |
|---|---|---|---|
id | integer | No | the bans id, which Unban takes |
reason | string | Yes | |
by | string | No | who banned the license |
expires | integer | Yes | unix time the ban ends, nil when permanent |
active | boolean | No | false once it has expired; the connect check deletes expired bans of a player who joins |
createdAt | integer | No | unix time of the ban |
CoreAccountCharacter
| Field | Type | Optional | Description |
|---|---|---|---|
citizenid | string | No | |
cid | integer | No | the character's slot on the license |
name | string | Yes | first and last name, nil when the character has neither |
charinfo | CharInfo | No | |
phone_number | string | Yes | the number npwd stored in players.phone_number, nil until npwd gives the character one |
job | Job | Yes | cobalt_management's job, nil when it never set one |
gang | Gang | Yes | cobalt_management's gang, nil when it never set one |
money | table<MoneyType, integer> | No | the wallets in players.money; the bank balance is cobalt_banking's |
metadata | PlayerMetadata | No | every metadata key, licences, needs and status included |
position | vector3 | vector4 | table | Yes | where the character was last saved |
lastPlayed | integer | No | unix time the row last changed, or the time of the call for the character being played |
online | boolean | No | whether this is the character being played, read from memory instead of players |
CoreAccountOnline
| Field | Type | Optional | Description |
|---|---|---|---|
source | integer | No | the connected player's server id |
citizenid | string | Yes | the character being played, nil while the player is still choosing one |
CoreJobDefinition
| Field | Type | Optional | Description |
|---|---|---|---|
label | string | No | |
type | 'leo' | 'ems' | 'mechanic' | Yes | |
society | boolean | Yes | |
defaultDuty | boolean | No | |
offDutyPay | boolean | No | |
grades | table<string, JobGradeDefinition> | No |
CorePlayer
Server. A loaded or offline character. Methods are on both Player:Name(...) and Player.Functions.Name(...).
| Field | Type | Optional | Description |
|---|---|---|---|
PlayerData | PlayerData | No | |
Offline | boolean | No | |
deleted | boolean | Yes | set once the character is deleted, so no save writes its row again |
Functions | PlayerFunctions | No |
CoreProgressProps
Extends InterfaceProgressProps.
| Field | Type | Optional | Description |
|---|---|---|---|
onFinish | function | Yes | |
onCancel | function | Yes |
CriminalRecord
| Field | Type | Optional | Description |
|---|---|---|---|
hasRecord | boolean | No | |
date | string | Yes |
Functions
Cobalt.Functions, called with a dot. Each entry is tagged with the side it exists on.
Gang
| Field | Type | Optional | Description |
|---|---|---|---|
name | string | No | |
label | string | No | |
isboss | boolean | No | |
grade | Grade | No |
GangDefinition
| Field | Type | Optional | Description |
|---|---|---|---|
label | string | No | |
society | boolean | Yes | |
grades | table<string, GangGradeDefinition> | No |
GangGradeDefinition
| Field | Type | Optional | Description |
|---|---|---|---|
name | string | No | |
isboss | boolean | Yes |
Grade
| Field | Type | Optional | Description |
|---|---|---|---|
name | string | No | |
level | integer | No | |
payment | integer | Yes | |
isboss | boolean | Yes |
Job
| Field | Type | Optional | Description |
|---|---|---|---|
name | string | No | |
label | string | No | |
type | 'none' | 'leo' | 'ems' | 'mechanic' | string | Yes | |
onduty | boolean | No | |
isboss | boolean | No | |
grade | Grade | No |
JobGradeDefinition
| Field | Type | Optional | Description |
|---|---|---|---|
name | string | No | |
payment | integer | No | |
isboss | boolean | Yes |
Licences
| Field | Type | Optional | Description |
|---|---|---|---|
driver | boolean | No | |
business | boolean | No | |
weapon | boolean | No |
LicenseRecord
| Field | Type | Optional | Description |
|---|---|---|---|
held | boolean | No | |
grantedAt | integer | Yes | unix time of the grant, missing for grants made before it was recorded |
grantedBy | string | Yes | who granted it, such as LSPD or the DMV |
revokedAt | integer | Yes | unix time of the last revocation, while it is not held |
points | integer | No | points on it, kept after the points limit revokes it and cleared by a new grant |
pointsLimit | integer | Yes |
LicenseType
| Field | Type | Optional | Description |
|---|---|---|---|
label | string | No | |
pointsLimit | integer | Yes | points that revoke it, missing for a licence without points |
LogLevel
'debug' | 'info' | 'warn' | 'error' | 'fatal' | 'security'
MoneyType
'cash' | 'bank' | 'crypto' | string
NotifyType
'primary' | 'inform' | 'info' | 'success' | 'warning' | 'warn' | 'error'
OrgResult
'success' | 'invalid_job_name' | 'job_exists' | 'job_not_exists' | 'invalid_gang_name' | 'gang_exists' | 'gang_not_exists' | 'invalid_method_name' | 'invalid_field_name'
PlayerData
| Field | Type | Optional | Description |
|---|---|---|---|
source | integer | Yes | nil on a character loaded from the database |
citizenid | string | No | |
license | string | No | |
phone_number | string | Yes | the number npwd stored in players.phone_number, nil until npwd gives the character one |
stateid | integer | No | the player's permanent number across all their characters, issued in join order; also on the player's replicated cobalt:stateid state bag |
name | string | No | |
cid | integer | No | |
charinfo | CharInfo | No | |
money | table<MoneyType, integer> | No | |
job | Job | Yes | the same table as metadata.job; SetMetaData sets both |
gang | Gang | Yes | the same table as metadata.gang; SetMetaData sets both |
metadata | PlayerMetadata | No | |
position | vector3 | vector4 | No | |
[string] | any | No |
PlayerFunctions
PlayerMetadata
| Field | Type | Optional | Description |
|---|---|---|---|
cash | integer | No | |
hunger | number | No | 0 to 100 |
thirst | number | No | 0 to 100 |
stress | number | No | |
isdead | boolean | No | |
inlaststand | boolean | No | |
armor | number | No | |
ishandcuffed | boolean | No | set while cobalt_police has the character restrained |
optin | boolean | No | admins with this on receive player reports |
status | table | No | |
rep | table<string, integer> | No | |
callsign | string | No | |
bloodtype | string | No | |
fingerprint | string | No | |
walletid | string | No | |
criminalrecord | CriminalRecord | No | |
licences | Licences | No | |
starterApartment | string | Yes | |
job | Job | Yes | cobalt_management's job; players.job_name indexes its name |
gang | Gang | Yes | cobalt_management's gang; players.gang_name indexes its name |
secondjobs | table<string, table> | No | cobalt_management's second jobs, keyed by job name |
[string] | any | No |
PlayerModule
Server. Cobalt.Player: loading, saving and deleting characters.
Shared
| Field | Type | Optional | Description |
|---|---|---|---|
Jobs | table<string, CoreJobDefinition> | No | |
Gangs | table<string, GangDefinition> | No | |
Vehicles | table<string, SharedVehicle> | No | |
VehicleHashes | table<integer, SharedVehicle> | No | |
Locations | table | No | |
ForceJobDefaultDutyAtLogin | boolean | No | |
MaleNoGloves | table<integer, true> | No | |
FemaleNoGloves | table<integer, true> | No |
SharedVehicle
| Field | Type | Optional | Description |
|---|---|---|---|
model | string | No | |
spawncode | string | No | |
name | string | No | |
brand | string | No | |
price | integer | No | |
category | string | No | vehicle class name, such as 'compacts' or 'super' |
class | integer | Yes | GTA vehicle class number of category, 0 to 22; nil for a category GTA has no class for |
type | string | No | vehicle type, such as 'automobile' or 'boat' |
hash | integer | No | |
shops | string[] | Yes | dealerships that sell it; without it, every dealership selling its category does |
shop | string[] | Yes | same as shops, for qb-core scripts |
image | string | Yes | dealership preview image for add-on cars |
enabled | boolean | Yes | false stops dealerships selling it |
StreetName
| Field | Type | Optional | Description |
|---|---|---|---|
main | string | No | |
cross | string | No |
TempJob
| Field | Type | Optional | Description |
|---|---|---|---|
name | string | No | |
label | string | No | |
data | table? | No | |
resource | string | No | the resource that set it; the job clears when that resource stops |
cobalt_management
GangPermission
'vault_view' | 'vault_deposit' | 'vault_withdraw' | 'vault_audit' | 'gang_invite'
ManagementEmployee
| Field | Type | Optional | Description |
|---|---|---|---|
citizenid | string | No | |
name | string | No | |
grade | integer | No | |
rank | string | No | |
pay | integer | No | per payday, after the boss's pay changes |
isBoss | boolean | No | |
online | boolean | No | |
onDuty | boolean | No | |
onLeave | boolean | No | |
joinedAt | string | Yes | ISO 8601 UTC |
shiftStartedAt | string | Yes | ISO 8601 UTC |
weekMinutes | integer | No | |
lastWeekMinutes | integer | No | |
monthBonuses | integer | No | |
source | integer | Yes | server id when online |
ManagementFleetVehicle
| Field | Type | Optional | Description |
|---|---|---|---|
plate | string | No | |
model | string | No | |
label | string | No | |
minGrade | integer | No | lowest grade that may drive it |
ManagementGang
| Field | Type | Optional | Description |
|---|---|---|---|
name | string | No | |
label | string | No | |
isboss | boolean | No | |
grade | table | No | |
since | integer | Yes | unix seconds when the character joined the gang; nil outside a gang |
permissions | GangPermission[] | Yes | server only: what the member's rank can do |
founderCid | string | Yes | server only |
ManagementJob
| Field | Type | Optional | Description |
|---|---|---|---|
name | string | No | |
label | string | No | |
type | string | No | leo, ems, mechanic, or the job's own type |
onduty | boolean | No | |
isboss | boolean | No | |
grade | table | No | |
since | integer | Yes | unix seconds when the character joined the job |
ManagementJobStatus
| Field | Type | Optional | Description |
|---|---|---|---|
open | boolean | No | false while staff keep the job closed |
paidToday | integer | No | dollars paid out for the job since midnight, server time |
ManagementMenu
'job' | 'gang' | 'gangAdmin' | 'apply' | 'charter'
ManagementPermission
'open_menu' | 'view_dashboard' | 'give_bonus' | 'society'
cobalt_interfaces
AlertProps
| Field | Type | Optional | Description |
|---|---|---|---|
header | string | No | |
content | string | Yes | |
type | 'confirm' | 'danger' | Yes | |
icon | string | Yes | |
cancel | boolean | Yes | |
labels | table | Yes |
ContextMenu
| Field | Type | Optional | Description |
|---|---|---|---|
id | string | No | |
title | string | No | |
menu | string | Yes | id of the parent menu; shows a back button |
canClose | boolean | Yes | |
onExit | function | Yes | |
onBack | function | Yes | |
options | table | ContextOption[] | No |
ContextOption
| Field | Type | Optional | Description |
|---|---|---|---|
title | string | Yes | |
description | string | Yes | |
icon | string | Yes | Phosphor icon name (common Font Awesome names also resolve) |
iconColor | string | Yes | |
progress | number | Yes | 0 to 100 |
colorScheme | string | Yes | hex, or blue, green, yellow, orange, red |
arrow | boolean | Yes | |
menu | string | Yes | id of a submenu to open |
disabled | boolean | Yes | |
readOnly | boolean | Yes | |
onSelect | function | Yes | |
event | string | Yes | |
serverEvent | string | Yes | |
args | any | Yes |
InputOptions
| Field | Type | Optional | Description |
|---|---|---|---|
allowCancel | boolean | Yes | |
icon | string | Yes | |
description | string | Yes | |
submitText | string | Yes | |
cancelText | string | Yes |
InputRow
| Field | Type | Optional | Description |
|---|---|---|---|
type | 'input' | 'number' | 'select' | 'multi-select' | 'slider' | 'checkbox' | 'textarea' | 'date' | 'color' | Yes | |
label | string | No | |
description | string | Yes | |
placeholder | string | Yes | |
icon | string | Yes | |
prefix | string | Yes | |
required | boolean | Yes | |
disabled | boolean | Yes | |
default | any | Yes | |
checked | boolean | Yes | |
password | boolean | Yes | |
min | number | Yes | |
max | number | Yes | |
step | number | Yes | |
options | table[] | Yes | |
returnString | boolean | Yes |
InterfaceNotifyProps
| Field | Type | Optional | Description |
|---|---|---|---|
id | string | Yes | replaces a visible notification with the same id |
title | string | Yes | |
description | string | Yes | |
type | 'success' | 'error' | 'warning' | 'info' | 'inform' | Yes | |
duration | number | Yes | milliseconds, 5000 by default |
icon | string | Yes | Phosphor icon name |
iconColor | string | Yes |
InterfaceProgressProps
| Field | Type | Optional | Description |
|---|---|---|---|
label | string | Yes | |
duration | number | No | milliseconds |
icon | string | Yes | Phosphor icon name |
useWhileDead | boolean | Yes | |
allowRagdoll | boolean | Yes | |
allowCuffed | boolean | Yes | |
allowFalling | boolean | Yes | |
allowSwimming | boolean | Yes | |
canCancel | boolean | Yes | |
anim | table | Yes | |
prop | table | Yes | same shape as ox_lib's progress props |
disable | table | Yes |
InterfaceRadialItem
| Field | Type | Optional | Description |
|---|---|---|---|
id | string | No | |
label | string | No | |
icon | string | Yes | Phosphor icon name |
menu | string | Yes | id of a menu from registerRadial, opened in place |
onSelect | function | Yes | |
event | string | Yes | |
serverEvent | string | Yes | |
args | any | Yes | |
keepOpen | boolean | Yes | |
disabled | boolean | function | Yes | |
canInteract | function | Yes |
InterfaceTextUIOptions
| Field | Type | Optional | Description |
|---|---|---|---|
key | string | Yes | keycap label; "[E] - Open trunk" also works |
icon | string | Yes | Phosphor icon name, shown when there is no key |
position | 'left-center' | 'right-center' | 'top-center' | 'bottom-center' | Yes |
RadialMenu
| Field | Type | Optional | Description |
|---|---|---|---|
id | string | No | |
label | string | Yes | |
items | InterfaceRadialItem[] | No |
SkillCheckDifficulty
'easy' | 'medium' | 'hard' | table
cobalt_inventory
InventoryAccessMode
'readonly' | 'remove' | 'full'
InventoryCarryAction
| Value | Description |
|---|---|
'sprint' | |
'jump' | |
'enterVehicle' | getting into a vehicle |
'combat' | aiming, shooting and melee |
InventoryContainer
| Field | Type | Optional | Description |
|---|---|---|---|
slots | integer | No | cells in the inventory the item opens |
maxWeight | integer | No | grams it holds |
whitelist | string[] | Yes | the only item names it takes; nil takes any item but another container |
InventoryGroups
job or gang names, or names mapped to the lowest grade allowed or to a list of the grades allowed
string[] | table<string, integer | integer[]>
InventoryItem
| Field | Type | Optional | Description |
|---|---|---|---|
id | string | No | uuid, stable across moves |
name | string | No | |
label | string | No | |
description | string | Yes | |
x | integer | No | grid column, 0 to 4 |
y | integer | No | grid row, 0-based |
rotated | boolean | No | |
amount | integer | No | |
metadata | InventoryItemMetadata | No |
InventoryItemCarry
| Field | Type | Optional | Description |
|---|---|---|---|
model | string | No | prop model |
bone | integer | No | ped bone the prop attaches to |
pos | vector3 | No | attach offset |
rot | vector3 | No | attach rotation |
anim | table | Yes | looped while carrying; use an upper-body flag such as 49 so the player can walk |
disable | InventoryCarryAction[] | Yes | what the player can't do while carrying it |
InventoryItemClient
| Field | Type | Optional | Description |
|---|---|---|---|
usetime | ItemRange | Yes | progress bar length in ms |
label | string | Yes | key in locales/en.json for the progress bar text; default "Using <label>" |
anim | table | Yes | |
prop | InventoryItemProp | InventoryItemProp[] | Yes | held while the progress bar runs |
image | string | Yes | image file in _nui/images, or a full URL; ox_inventory callers read it as a full path |
disable | table<string, boolean> | Yes | controls disabled during the progress, default { combat = true } |
cancel | boolean | Yes | the progress can be cancelled, default true |
status | table | Yes | applied on the server after the item is removed; negative stress relieves it |
notification | string | Yes | key in locales/en.json for the text shown after use, beside the "Used" item box |
export | string | Yes | resource.Export, called on the client as (event, item, slot), or as (data, { name, slot, metadata }) when the export's resource is neither a cobalt_ resource nor authored by Project Cobalt |
exportStyle | 'cobalt' | 'ox' | Yes | which call export gets, overriding the guess from its resource's author |
event | string | Yes | client event fired with (data, { name, slot, metadata }); the handler calls useItem to go ahead |
[string] | any | No | extra data the export reads from item.client |
InventoryItemDef
| Field | Type | Optional | Description |
|---|---|---|---|
name | string | No | |
label | string | No | |
description | string | Yes | |
weight | integer | No | grams per unit |
consume | integer | Yes | taken from the stack on use, 0 keeps it; defaults to 1 when the item has status, usetime or an export |
close | boolean | Yes | closes the inventory on use, default true |
stack | false | Yes | each one takes its own cell, as in ox_inventory; containers and weapons other than throwables never stack |
container | InventoryContainer | Yes | the item is a bag, case or wallet that opens this inventory |
weapon | true | Yes | the item is the GTA weapon of the same name, set at start for each weapon data/weapons.lua lists |
throwable | true | Yes | a thrown weapon, one throw per item, that stacks and has no serial or durability |
client | InventoryItemClient | Yes | |
server | InventoryItemServer | Yes | |
carry | InventoryItemCarry | Yes | held in the hands while the player has any of the item |
InventoryItemMetadata
| Field | Type | Optional | Description |
|---|---|---|---|
durability | number | Yes | 0 to 100, set on weapons |
serial | string | Yes | set on weapons |
ammo | integer | Yes | rounds loaded in a weapon |
ammoType | string | Yes | |
[string] | any | No |
InventoryItemProp
| Field | Type | Optional | Description |
|---|---|---|---|
model | string | No | |
bone | integer | No | ped bone the prop attaches to |
pos | vector3 | No | |
rot | vector3 | No |
InventoryItemServer
| Field | Type | Optional | Description |
|---|---|---|---|
export | string | Yes | resource.Export, called on the server as (event, item, inventory, slot, data), or as ox_inventory calls it, (event, item, inventory, slot) in ox's shapes, when the export's resource is neither a cobalt_ resource nor authored by Project Cobalt |
exportStyle | 'cobalt' | 'ox' | Yes | which call export gets, overriding the guess from its resource's author |
[string] | any | No | extra data the export reads from item.server |
InventorySearchOptions
| Field | Type | Optional | Description |
|---|---|---|---|
mode | InventoryAccessMode | Yes | default readonly |
InventoryShop
| Field | Type | Optional | Description |
|---|---|---|---|
label | string | No | the name on the shop's header |
items | table<string, InventoryShopItem> | No | keyed by item name |
payment | 'cash' | 'bank' | ('cash' | 'bank')[] | Yes | how players may pay; nil takes both |
groups | string | InventoryGroups | Yes | the jobs or gangs that may open it, at a grade; nil lets anyone |
license | string | Yes | a cobalt_core licence the player must hold to open it |
InventoryShopItem
| Field | Type | Optional | Description |
|---|---|---|---|
price | number | No | dollars for one |
stock | integer | Yes | how many it holds until cobalt_inventory restarts; nil for unlimited |
tags | string[] | Yes | filter tags, each a shop_tag.<tag> key in cobalt_inventory's locales/en.json |
license | string | Yes | a cobalt_core licence the buyer must hold |
groups | InventoryGroups | Yes | the jobs or gangs that may buy it |
metadata | table | Yes | metadata on every one sold |
InventoryStash
| Field | Type | Optional | Description |
|---|---|---|---|
label | string | No | the name on the inventory header; in data/stashes.lua a key in locales/en.json |
slots | integer | No | cells, laid out 5 to a row |
maxWeight | integer | No | grams it holds |
owner | true | string | Yes | whose copy opens: true gives each character their own copy, a citizenid or a license keeps one copy under that owner, nil keeps one shared copy. It never limits who opens the stash |
groups | string | InventoryGroups | Yes | the jobs or gangs that may open it, at a grade; nil lets anyone |
coords | vector3 | vector3[] | Yes | where it opens: players must be within 5 meters of a point. data/stashes.lua also puts an ox_target zone at each point; a registered stash relies on the calling resource's own prompt |
whitelist | string[] | Yes | the only item names it takes; nil takes any item |
instance | integer | string | Yes | the routing bucket players must be in to open it; nil or 0 for any |
InventoryWeapon
| Field | Type | Optional | Description |
|---|---|---|---|
name | string | No | weapon item name, e.g. weapon_pistol |
invName | string | No | |
itemId | string | No | |
metadata | InventoryItemMetadata | No |
ItemRange
number | table
cobalt_banking
BankingAccessibleAccount
| Field | Type | Optional | Description |
|---|---|---|---|
accountId | BankingAccountId | No | |
type | BankingAccountType | No | |
name | string | No | the account label, or the org's label for a society account |
balance | integer | No | |
primary | boolean | No | |
role | BankingMemberRole | No | on a society account: owner for a boss, member with the society rank permission, viewer for the rest of the org |
BankingAccount
| Field | Type | Optional | Description |
|---|---|---|---|
id | BankingAccountId | No | |
accountId | BankingAccountId | No | |
type | BankingAccountType | No | |
label | string? | No | |
balance | integer | No | |
ownerCid | string? | No | |
createdAt | integer | No | epoch seconds |
members | BankingAccountMember[] | Yes | only on rows the bank app loads with their members |
BankingAccountId
string
BankingAccountMember
| Field | Type | Optional | Description |
|---|---|---|---|
cid | string | No | |
role | BankingMemberRole | No | |
addedAt | integer | No | epoch seconds |
BankingAccountRef
an account id (CB 1234 5678, also read without spaces, or society_<org>), or a citizenid for that character's personal account
BankingAccountId | string
BankingAccountType
'personal' | 'shared' | 'society'
BankingCashPointView
| Field | Type | Optional | Description |
|---|---|---|---|
x | number | No | |
y | number | No | |
z | number | No | |
label | string | No | |
atm | boolean | No |
BankingDetails
| Field | Type | Optional | Description |
|---|---|---|---|
note | string | Yes | the line shown on the statement |
initiator | string | Yes | recorded as initiated_by: a citizenid, or a system tag such as payroll or ems, which statements show with no name |
BankingFailure
| Value | Description |
|---|---|
'invalid_amount' | |
'not_found' | |
'no_permission' | |
'same_account' | |
'insufficient_funds' | |
'already_member' | |
'member_limit' | |
'invalid_invoice' | a malformed invoice, filter, payment method or void reason |
'settled' | the invoice is already paid or void |
'payer_offline' | a cash payment needs the payer online |
BankingInvoice
| Field | Type | Optional | Description |
|---|---|---|---|
id | integer | No | |
issuer | string | No | the job, gang or kind that sent it, such as ambulance |
citizenid | string | No | the character who owes it |
payerName | string | No | |
payee | BankingAccountId | No | the account it pays into |
issuerCitizenid | string? | No | the character who wrote it; nil when the system sent it or that character was deleted |
issuerName | string? | No | |
summary | string | No | what it's for, shown on the bank statement; may be empty |
amount | integer | No | |
status | BankingInvoiceStatus | No | |
data | BankingInvoiceData | No | |
dueAt | integer | No | epoch seconds |
createdAt | integer | No | epoch seconds |
declinedAt | integer? | No | epoch seconds the payer last turned it down or their bank couldn't cover it |
paidAt | integer? | No | epoch seconds |
voidReason | string? | No |
BankingInvoiceData
| Field | Type | Optional | Description |
|---|---|---|---|
lines | BankingInvoiceLine[] | Yes | the itemized charges behind amount |
reportId | integer | Yes | the issuer's report the invoice bills for |
[string] | any | No | anything else the issuer keeps on it |
BankingInvoiceInput
| Field | Type | Optional | Description |
|---|---|---|---|
issuer | string | No | the job, gang or kind sending it, up to 32 characters |
citizenid | string | No | the character who owes it |
amount | number | No | a whole amount from 1 to 1000000000 |
summary | string | Yes | up to 255 characters |
payee | BankingAccountRef | Yes | the account it pays into; defaults to society_<issuer> |
issuerCitizenid | string | Yes | the character writing it |
issuerName | string | Yes | up to 120 characters; defaults to the name of issuerCitizenid |
dueDays | integer | Yes | 1 to 365; defaults to InvoiceDueDays in the config |
data | BankingInvoiceData | Yes |
BankingInvoiceLine
| Field | Type | Optional | Description |
|---|---|---|---|
label | string | No | |
amount | integer | No |
BankingInvoiceMethod
| Value | Description |
|---|---|
'bank' | from the payer's personal account; a short balance records declinedAt |
'cash' | from the payer's pocket; needs them online |
'cash_or_bank' | cash when they're online and carry enough, the bank otherwise |
'manual' | marks it paid without moving money, for payment taken some other way |
BankingInvoicePayment
| Field | Type | Optional | Description |
|---|---|---|---|
method | BankingInvoiceMethod | Yes | default bank |
BankingInvoiceQuery
| Field | Type | Optional | Description |
|---|---|---|---|
citizenid | string | string[] | Yes | |
issuer | string | Yes | |
status | BankingInvoiceStatus | Yes | unpaid includes overdue ones |
data | table<string, string|number|boolean> | Yes | top-level data keys that must equal these values |
limit | integer | Yes | 1 to 500, default 50 |
before | integer | Yes | an invoice id; returns older ones, for paging |
BankingInvoiceResult
table | BankingRefusal
BankingInvoiceStatus
| Value | Description |
|---|---|
'unpaid' | |
'overdue' | unpaid past dueAt |
'paid' | |
'void' |
BankingInvoiceTotals
| Field | Type | Optional | Description |
|---|---|---|---|
unpaid | integer | No | dollars on unpaid invoices, overdue ones included |
unpaidCount | integer | No | |
overdue | integer | No | |
overdueCount | integer | No | |
billed | integer | No | dollars invoiced since since, void ones excluded |
paid | integer | No | dollars paid since since |
owed | table<string, integer> | No | unpaid dollars per citizenid in the filter, for those who owe any |
BankingInvoiceTotalsQuery
| Field | Type | Optional | Description |
|---|---|---|---|
citizenid | string | string[] | Yes | also fills owed for these characters |
issuer | string | Yes | |
since | integer | Yes | epoch seconds that start the billed and paid window; default 7 days ago |
BankingMember
| Field | Type | Optional | Description |
|---|---|---|---|
citizenid | string | No | |
name | string | No | |
role | BankingMemberRole | No | |
rank | string | Yes | the org rank, on society members |
BankingMemberList
| Field | Type | Optional | Description |
|---|---|---|---|
ok | true | No | |
accountId | BankingAccountId | No | |
type | BankingAccountType | No | |
role | BankingMemberRole | No | the caller's role |
canManage | boolean | No | |
maxMembers | integer | No | |
members | BankingMember[] | No |
BankingMemberRole
'owner' | 'admin' | 'member' | 'viewer'
BankingParty
| Field | Type | Optional | Description |
|---|---|---|---|
accountId | BankingAccountId | No | |
type | BankingAccountType? | No | |
name | string? | No |
BankingRecipient
| Field | Type | Optional | Description |
|---|---|---|---|
accountId | BankingAccountId | No | |
type | BankingAccountType | No | |
label | string | Yes | the account's own label, on FindRecipient results |
name | string | No | |
lastAt | integer | Yes | epoch seconds of the last transfer, on GetRecentRecipients rows |
BankingRefusal
| Field | Type | Optional | Description |
|---|---|---|---|
ok | false | No | |
reason | BankingFailure | No |
BankingStatementEntry
| Field | Type | Optional | Description |
|---|---|---|---|
id | integer | No | |
accountId | BankingAccountId | No | |
type | BankingTransactionType | No | |
amount | integer | No | negative for money out |
note | string? | No | |
balanceAfter | integer? | No | |
receipt | string? | No | |
counterparty | BankingParty? | No | |
initiator | table? | No | name is nil for system initiators such as payroll |
createdAt | integer | No | epoch seconds |
BankingStatementPage
| Field | Type | Optional | Description |
|---|---|---|---|
ok | true | No | |
entries | BankingStatementEntry[] | No | newest first |
nextCursor | integer? | No |
BankingStatementQuery
| Field | Type | Optional | Description |
|---|---|---|---|
limit | integer | Yes | 1 to 50, default 20 |
before | integer | Yes | the nextCursor of the previous page |
direction | 'all' | 'in' | 'out' | Yes |
BankingTransactionType
| Value | Description |
|---|---|
'deposit' | |
'withdrawal' | |
'transfer_in' | |
'transfer_out' | |
'fee' | |
'paycheck' | |
'bill_paid' | a character paying an invoice, or a Transfer with bill = true |
'bill_received' | the payee's side of that bill |
'admin_credit' | |
'admin_debit' |
BankingTransferDetails
Extends BankingDetails.
| Field | Type | Optional | Description |
|---|---|---|---|
bill | boolean | Yes | record bill_paid and bill_received instead of transfer_out and transfer_in |
BankingTransferReceipt
| Field | Type | Optional | Description |
|---|---|---|---|
ok | true | No | |
balance | integer | No | the source account's balance after the transfer and fee |
fee | integer | No | |
receipt | string | No | |
transactionId | integer | No | the source account's transfer_out entry |
toAccountId | BankingAccountId | No |
BankingTransferRequest
| Field | Type | Optional | Description |
|---|---|---|---|
from | BankingAccountId | No | |
to | string | No | account number or citizen ID, which sends to that character's personal account |
amount | integer | No | |
note | string | Yes |
BankingTransferResult
BankingTransferReceipt | BankingRefusal
cobalt_housing
HousingBoxZone
| Field | Type | Optional | Description |
|---|---|---|---|
kind | 'box' | No | |
coords | vector3 | No | |
size | vector3 | No | |
rotation | number | No |
HousingPolyZone
| Field | Type | Optional | Description |
|---|---|---|---|
kind | 'poly' | No | |
points | vector3[] | No | |
thickness | number | No |
HousingProperty
Extends HousingPropertySummary.
| Field | Type | Optional | Description |
|---|---|---|---|
owner | string | Yes | citizenid |
price | integer | No | |
zone | HousingZone | Yes |
HousingPropertySummary
| Field | Type | Optional | Description |
|---|---|---|---|
id | integer | No | |
name | string | No | |
shell | string | No | |
door | vector4 | No | |
garage | vector4 | Yes |
HousingZone
HousingPolyZone | HousingBoxZone
cobalt_police
PoliceBlip
'default' | 'panic' | 'robbery' | 'shooting' | 'vehicle' | 'medical' | 'call' | 'explosion'
PoliceCall
| Field | Type | Optional | Description |
|---|---|---|---|
id | integer | No | |
code | string | No | |
title | string | No | |
description | string | No | |
location | string | No | |
plate | string | Yes | |
coords | vector3 | Yes | |
priority | 1 | 2 | 3 | No | |
jobs | PoliceDispatchJob[] | No | |
blip | string | No | |
caller | table | Yes | |
raisedBy | string | Yes | |
responders | PoliceCallResponder[] | No | |
notes | table[] | No | |
status | 'open' | 'closed' | No | |
createdAt | integer | No | epoch seconds |
PoliceCallResponder
| Field | Type | Optional | Description |
|---|---|---|---|
citizenid | string | No | |
name | string | No | |
callsign | string | No |
PoliceCuffType
'cuffs' | 'zipties'
PoliceDispatchInput
| Field | Type | Optional | Description |
|---|---|---|---|
title | string | No | |
code | string | Yes | defaults to '10-80' |
description | string | Yes | |
location | string | Yes | street and area; clients fill it from coords when empty |
coords | vector3 | Yes | |
priority | 1 | 2 | 3 | Yes | 1 is the most urgent, defaults to 2 |
jobs | PoliceDispatchJob[] | Yes | defaults to { 'leo' } |
blip | PoliceBlip | Yes | |
caller | table | Yes | |
raisedBy | string | Yes |
PoliceDispatchJob
'leo' | 'ems'
PoliceMdtPage
'dashboard' | 'dispatch' | 'citizens' | 'vehicles' | 'weapons' | 'properties' | 'incidents' | 'warrants' | 'bolos' | 'evidence' | 'penalcode' | 'roster' | 'management'
cobalt_ambulancejob
AmbulancePrescription
| Field | Type | Optional | Description |
|---|---|---|---|
id | integer | No | |
citizenid | string | No | |
patientName | string | No | |
medication | string | No | |
dose | string | No | |
reason | string | No | |
refills | integer | No | fills allowed after the first |
refillsUsed | integer | No | refills taken, 0 until the second fill |
controlled | boolean | No | |
prescriber | string | No | |
createdAt | integer | No | epoch seconds |
endsAt | integer | No | epoch seconds |
status | 'active' | 'expired' | 'cancelled' | No | |
lastFill | table | Yes | the latest pharmacy fill, at in epoch seconds; nil until first filled |
AmbulanceReportSummary
| Field | Type | Optional | Description |
|---|---|---|---|
id | integer | No | |
citizenid | string? | No | |
patientName | string | No | |
summary | string | No | |
medic | string | No | |
medicCitizenid | string? | No | |
outcome | 'scene' | 'transported' | 'deceased' | 'respawned' | No | |
status | 'draft' | 'filed' | No | |
billing | 'pending' | 'billed' | 'waived' | No | |
billed | integer? | No | |
createdAt | integer | No | epoch seconds |
AmbulanceReviveStateName
'alive' | 'knocked_out' | 'down' | 'dead'
cobalt_cityhall
CrewMemberView
| Field | Type | Optional | Description |
|---|---|---|---|
id | integer | No | |
name | string | No | |
leader | boolean | No | |
earned | integer | No |
ShiftView
| Field | Type | Optional | Description |
|---|---|---|---|
job | string | No | |
startedAt | integer | No | unix seconds |
earned | integer | No | |
done | integer | No | |
crew | CrewMemberView[] | No | |
task | TaskView | Yes | |
vehicle | integer | Yes | network id |
carrying | boolean | Yes | holding a trash bag |
TaskView
| Field | Type | Optional | Description |
|---|---|---|---|
title | string | No | |
label | string | No | |
coords | vector3 | No | |
radius | number | No | |
step | string | Yes | |
stage | string | Yes | |
progress | table | Yes | |
open | boolean | Yes | the back of the crew vehicle is open |
task | string | Yes | the stop's task key |
heading | number | Yes | the way the player faces for the work |
marker | boolean | Yes | |
passenger | vector4 | Yes | the pavement a taxi fare waits on at a pickup and walks to at a drop-off |
distance | integer | Yes | meters from the player, filled in on the client |
cobalt_sound
SoundData
| Field | Type | Optional | Description |
|---|---|---|---|
sound | string | No | file in sounds/ (alert or alert.ogg) or an http(s) URL on an allowed host |
coords | vector3 | Yes | |
entity | integer | Yes | network id |
player | integer | Yes | server id, or -1 for everyone |
bucket | integer | Yes | routing bucket of a coords sound, default 0; an entity sound plays in the entity's bucket |
volume | number | Yes | 0 to 1, default 1 |
distance | number | Yes | meters |
falloff | number | Yes | curve exponent, 1 is linear |
loop | boolean | Yes | |
paused | boolean | Yes | |
offset | number | Yes | seconds to start from |
cobalt_weather
WeatherReport
Extends WeatherState.
| Field | Type | Optional | Description |
|---|---|---|---|
blackout | boolean | No |
WeatherState
| Field | Type | Optional | Description |
|---|---|---|---|
current | WeatherType | No | |
next | WeatherType | Yes | |
transition | number | No | seconds |
changesAt | integer | Yes | unix time of the next change |
frozen | boolean | No |
WeatherTime
| Field | Type | Optional | Description |
|---|---|---|---|
hour | integer | No | 0 to 23 |
minute | integer | No | 0 to 59 |
frozen | boolean | No |
WeatherType
'EXTRASUNNY' | 'CLEAR' | 'NEUTRAL' | 'SMOG' | 'FOGGY' | 'OVERCAST' | 'CLOUDS' | 'CLEARING' | 'RAIN' | 'THUNDER' | 'SNOW' | 'BLIZZARD' | 'SNOWLIGHT' | 'XMAS' | 'HALLOWEEN'
cobalt_map
MapPostal
| Field | Type | Optional | Description |
|---|---|---|---|
code | string | No | |
x | number | No | |
y | number | No |
cobalt_chat
ChatLegacyMessage
| Field | Type | Optional | Description |
|---|---|---|---|
args | any[] | Yes | { author, text }, or { text } for a message from System |
color | integer[] | Yes | |
multiline | boolean | Yes | |
template | string | Yes |
ox_doorlock
OxDoorlockAuthorizationPayload
| Field | Type | Optional | Description |
|---|---|---|---|
source | integer | No | |
door | table | No | |
lockpick | boolean | Yes | |
authorised | boolean | string | Yes |
OxDoorlockClientDoor
Extends OxDoorlockDoor.
| Field | Type | Optional | Description |
|---|---|---|---|
entity | integer | Yes | |
distance | number | No | |
hideUi | boolean | Yes |
OxDoorlockDoor
| Field | Type | Optional | Description |
|---|---|---|---|
id | integer | No | |
name | string | No | |
state | 0 | 1 | No | 0 unlocked, 1 locked |
coords | vector3 | No | |
characters | string[] | Yes | |
groups | table<string, integer> | Yes | group name to minimum grade |
items | table[] | Yes | remove takes the item on use |
maxDistance | number | No |
OxDoorlockHookOptions
| Field | Type | Optional | Description |
|---|---|---|---|
print | boolean | Yes | print each time the hook runs |
nameFilter | string | Yes | Lua pattern the door name must match |
ox_lib
SkillCheckDifficulity
'easy' | 'medium' | 'hard' | table