All interact actions are formated as an array containing objects with the following properties.
name?: string
string
label: string
icon?: string (fontawesome icon)
string (fontawesome icon)
key?: string (default: E)
string (default: E)
progress?: ProgressProps
ProgressProps
distance?: number
number
pointDistance?: number
groups?: string | string[] | table<string, number | number[]>
string | string[] | table<string, number | number[]>
canInteract?: function(entity, distance, coords, name, bone)
function(entity, distance, coords, name, bone)
onSelect?: function(data)
function(data)
export?: string (example: ox_inventory.openInventory)
string (example: ox_inventory.openInventory)
event?: string
serverEvent?: string
command?: string
args?: any
any
duration?: number
color?: string
color2?: string
color2Percentage?: string
This is the data returned to a registered callback or event for selected option.
A selected option will trigger a single action, in order of priority:
onSelect
export
event
server event
command
data: table
table
coords: vector3
vector3
coordsId: string
playerId: number
entity: number
distance: number
Last updated 6 months ago