formatting and typos

This commit is contained in:
DokaDoka committed 2022-12-11 15:00:43 +11:00
1 parent 75698216e0
commit 724c7e356d
99 files changed
+515 -305

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ Registers options that will apply to all entities of that type (object, ped, pla
```lua
local options = {
{
{
name = 'ox:option1',
event = 'ox_target:debug',
icon = 'fa-solid fa-road',
+3 -4
View File
@@ -1,6 +1,6 @@
```lua
local options = {
{
{
name = 'ox:option1',
event = 'ox_target:debug',
icon = 'fa-solid fa-road',
@@ -42,7 +42,7 @@ exports.ox_target:removeModel(models, optionNames)
## addEntity
Add new options when targeting a networked entity matching the given netid or list of netids.
Add new options when targeting a networked entity matching the given netid or list of netIds.
Requires the use of [NetworkGetNetworkIdFromEntity](https://docs.fivem.net/natives/?_0x9E35DAB6) on an entity id.
```lua
@@ -51,14 +51,13 @@ exports.ox_target:addEntity(netIds, options)
## removeEntity
Remove options from a networked entity matching the given netid or list of netids.
Remove options from a networked entity matching the given netid or list of netIds.
Requires the use of [NetworkGetNetworkIdFromEntity](https://docs.fivem.net/natives/?_0x9E35DAB6) on an entity id.
```lua
exports.ox_target:removeEntity(netIds, optionNames)
```
## addLocalEntity
Add new options when targeting a local entity or list of entities.
+11 -11
View File
@@ -10,11 +10,11 @@ exports.ox_target:addSphereZone(parameters)
```lua
{
coords = vector3,
radius = number,
debug? = boolean,
drawSprite? = boolean,
options = options,
coords = vector3,
radius = number,
debug? = boolean,
drawSprite? = boolean,
options = options,
}
```
@@ -49,12 +49,12 @@ exports.ox_target:addBoxZone(parameters)
```lua
{
coords = vector3,
size = vector3,
rotation = number,
debug? = boolean,
drawSprite? = boolean,
options = options,
coords = vector3,
size = vector3,
rotation = number,
debug? = boolean,
drawSprite? = boolean,
options = options,
}
```
+22 -22
View File
@@ -4,27 +4,27 @@ When calling exports to add options, the input is an array of tables with the fo
```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 }
-- a bone, bones table to select specific parts
bones? = string | string[] -> example : 'bonnet' || { 'bonnet', 'boot' }
-- custom check to hide or display the option
canInteract? = function(entity, distance, coords, name, bone),
-- triggered on option selection (one only)
onSelect? = function(data),
export? = string,
event? = string,
serverEvent? = string,
command? = string
-- 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 }
-- a bone, bones table to select specific parts
bones? = string | string[] -> example : 'bonnet' || { 'bonnet', 'boot' }
-- custom check to hide or display the option
canInteract? = function(entity, distance, coords, name, bone),
-- triggered on option selection (one only)
onSelect? = function(data),
export? = string,
event? = string,
serverEvent? = string,
command? = string
}
```