low effort ox_target docs

This commit is contained in:
Linden committed 2022-08-20 01:26:52 +10:00
1 parent 40faff4ab8
commit efbe5fe087
7 files changed
+306

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
# Usage
When calling exports to add options, the input is an array of tables with the following properties.
```lua
{
-- an identifier used when removing options
name? = string,
-- an icon from font-awesome
icon? = string,
-- display text
label = string,
-- range to display (default: 2, max: 7)
distance? = number,
-- a group, array of groups, or groups and grades needed to display
groups? = string | string[] | { [string]: number }
-- an item, array of items, or items and counts needed to display
items? = string | string[] | { [string]: number }
-- custom check to hide or display the option
canInteract? = function(entity, distance, coords, name),
-- triggered on option selection (one only)
onSelect? = function(data),
export? = string,
event? = string,
serverEvent? = string,
command? = string
}
```