chore: target, fuel, and doorlock updates (#136)

* chore: ox_target cleaned up

- minor fixes on ox_lib zones

* chore: move get/set fuel amount to shared.mdx file

* chore: Update removeZone input type

https://github.com/overextended/ox_target/commit/021b32d4d52fa58305045177f3dc3c0a969d07e5

* chore: doorlock cleaned up

* add missing export

* reorder textui sections
This commit is contained in:
Jag authored and GitHub committed 2023-07-27 11:45:12 +02:00
1 parent fc2622ad2b
commit de4051e62a
7 files changed
+96 -48

No files matched your search

+37 -10
View File
@@ -11,6 +11,7 @@ exports.ox_target:disableTargeting(state)
```
- state: `boolean`
- Setting `state` to `true` will turn off the targeting eye if it is active and prevent it from reopening until `state` is set to `false` again.
## addGlobalObject
@@ -64,7 +65,7 @@ exports.ox_target:addGlobalPlayer(options)
## removeGlobalPlayer
Removes all options from the global Ped list with the option names.
Removes all options from the global Player list with the option names.
```lua
exports.ox_target:removeGlobalPlayer(optionNames)
@@ -100,7 +101,7 @@ Creates new targetable options for a specific model or list of models.
exports.ox_target:addModel(models, options)
```
- models: `number` or `number[]`
- models: `number` or `string` or `Array<number | string>`
- options: `table`
## removeModel
@@ -111,12 +112,12 @@ Removes all options from the models list with the option names.
exports.ox_target:removeModel(models, optionNames)
```
- models: `number` or `number[]`
- models: `number` or `string` or `Array<number | string>`
- optionNames: `string` or `string[]`
## addEntity
Creates new targetable options for a specific network id (see [NetworkGetNetworkIdFromEntity](https://docs.fivem.net/natives/?_0x9E35DAB6)).
Creates new targetable options for a specific network id or list of network ids (see [NetworkGetNetworkIdFromEntity](https://docs.fivem.net/natives/?_0x9E35DAB6)).
```lua
exports.ox_target:addEntity(netIds, options)
@@ -138,7 +139,7 @@ exports.ox_target:removeEntity(netIds, optionNames)
## addLocalEntity
Creates new targetable options for a specific entity or list of entities.
Creates new targetable options for a specific entity handle or list of entity handles.
```lua
exports.ox_target:addLocalEntity(entities, options)
@@ -168,12 +169,13 @@ exports.ox_target:addSphereZone(parameters)
- parameters: `table`
- coords: `vector`
- radius: `number`
- radius?: `number`
- debug?: `boolean`
- drawSprite?: `boolean`
- options: `table`
**Returns:** `number`
Return:
- id: `number`
## addBoxZone
@@ -185,13 +187,33 @@ exports.ox_target:addBoxZone(parameters)
- parameters: `table`
- coords: `vector`
- size: `vector3`
- rotation: `number`
- size?: `vector3`
- rotation?: `number`
- debug?: `boolean`
- drawSprite?: `boolean`
- options: `table`
**Returns:** `number`
Return:
- id: `number`
## addPolyZone
Creates a new targetable [poly zone](../../ox_lib/Modules/Zones/Shared#libzonespoly).
```lua
exports.ox_target:addPolyZone(parameters)
```
- parameters: `table`
- points: `vector3[]`
- All z values must match
- thickness?: `number`
- debug?: `boolean`
- drawSprite?: `boolean`
- options: `table`
Return:
- id: `number`
## removeZone
@@ -200,3 +222,8 @@ Removes a targetable zone with the given id (returned by addBoxZone/addSphereZon
```lua
exports.ox_target:removeZone(id)
```
- id: `number` or `string`
- The `number` id that is returned by [addSphereZone](#addspherezone), [addBoxZone](#addboxzone), or [addPolyZone](#addpolyzone)
**OR**
- The `string` name that can be specified by the user