diff --git a/pages/ox_doorlock/Server/events.mdx b/pages/ox_doorlock/Server/events.mdx index 4d495340..1dbedd91 100644 --- a/pages/ox_doorlock/Server/events.mdx +++ b/pages/ox_doorlock/Server/events.mdx @@ -9,15 +9,16 @@ These events are safe to trigger and handle in other scripts. Can be triggered to lock or unlock a door. ``` -TriggerEvent('ox_doorlock:setState', doorId, state) +TriggerEvent('ox_doorlock:setState', doorId, state, lockpick) ``` - doorId: `number` -- state: `0` or `1` +- state: `0` or `1` or `boolean` +- lockpick: `boolean` ## Handlers -These events shouldn't be triggered by any other scripts. +These events **should not** be triggered by any other scripts. ### ox_doorlock:stateChanged @@ -29,5 +30,5 @@ AddEventHandler('ox_doorlock:stateChanged', function(source, doorId, state, used - source: `number` or `nil` - doorId: `number` -- state: `0` or `1` -- usedItem: `string` or `false` +- state: `boolean` +- usedItem: `string` or `false` or `nil` diff --git a/pages/ox_doorlock/Server/functions.mdx b/pages/ox_doorlock/Server/functions.mdx index 4f67d34a..7b65cacc 100644 --- a/pages/ox_doorlock/Server/functions.mdx +++ b/pages/ox_doorlock/Server/functions.mdx @@ -8,15 +8,13 @@ Gets data for a door with the given id, matching the id for the database entry. exports.ox_doorlock:getDoor(id) ``` -### Parameters +Gets data for a door with the given `id`, matching the id for the database entry. - id: `number` -### Returns +Return: -- `table` - -Gets data for a door with the given name, matching the name for the database entry. +- door: `table` ## getDoorFromName @@ -24,10 +22,19 @@ Gets data for a door with the given name, matching the name for the database ent exports.ox_doorlock:getDoorFromName(name) ``` -### Parameters +Gets data for a door with the given `name`, matching the name for the database entry. - name: `string` -### Returns +Return: -- `table` +- door: `table` + +## editDoor + +```lua +exports.ox_doorlock:editDoor(id, data) +``` + +- id: `number` +- data: `table` diff --git a/pages/ox_doorlock/settings.mdx b/pages/ox_doorlock/settings.mdx index 3668d4c0..9463732a 100644 --- a/pages/ox_doorlock/settings.mdx +++ b/pages/ox_doorlock/settings.mdx @@ -26,6 +26,8 @@ title: Door Settings - Door can be lockpicked when interacting with a targeting resource. - Hide UI - No indicators (i.e. icon, text) will display on the door. +- Hold Open + - Holds the door open while unlocked. ## Characters @@ -44,13 +46,24 @@ title: Door Settings - Item - Name of the item. - Metadata type - - Requires metadata support (i.e. ox_inventory) to check slot.metadata.type + - Requires metadata support (i.e. ox_inventory) to check slot.metadata.type. +- Remove on use + - Removes the item after interacting with the door. ## Lockpick - Difficulty - Sets the skillcheck difficulty (see [docs](../ox_lib/Modules/Interface/Client/skillcheck)). - Area size - - Custom difficulty area size. + - Custom difficulty area size in degrees. - Speed multiplier - - Custom difficulty idicator speed. + - Custom difficulty idicator speed multipier. + +## Sound + +- Lock sound + - Sound to play on door lock. +- Unlock sound + - Sound to play on door unlock. + +*Note*: Sounds are stored in the `./web/public/sounds` directory. diff --git a/pages/ox_fuel.mdx b/pages/ox_fuel.mdx index d82cfdf8..ab7bdcf8 100644 --- a/pages/ox_fuel.mdx +++ b/pages/ox_fuel.mdx @@ -27,15 +27,3 @@ These resources aren't required but provide additional functionality. - [ox_target](../ox_target/) - -## Get vehicle fuel amount - -```lua -local fuel = Entity(vehicleId).state.fuel -``` - -## Set vehicle fuel amount - -```lua -Entity(vehicleId).state.fuel = fuelAmount -``` diff --git a/pages/ox_fuel/Shared.mdx b/pages/ox_fuel/Shared.mdx new file mode 100644 index 00000000..f73bac8b --- /dev/null +++ b/pages/ox_fuel/Shared.mdx @@ -0,0 +1,11 @@ +## Get vehicle fuel amount + +```lua +local fuel = Entity(vehicleId).state.fuel +``` + +## Set vehicle fuel amount + +```lua +Entity(vehicleId).state.fuel = fuelAmount +``` diff --git a/pages/ox_lib/Modules/Zones/Shared.mdx b/pages/ox_lib/Modules/Zones/Shared.mdx index 78102e0d..4cea121f 100644 --- a/pages/ox_lib/Modules/Zones/Shared.mdx +++ b/pages/ox_lib/Modules/Zones/Shared.mdx @@ -21,9 +21,9 @@ lib.zones.poly(data) - All z values must match - thickness?: `number` - Default: `4` - - onEnter: `function(self: table)` - - onExit: `function(self: table)` - - inside: `function(self: table)` + - onEnter?: `function(self: table)` + - onExit?: `function(self: table)` + - inside?: `function(self: table)` - debug?: `boolean` ## lib.zones.box @@ -35,12 +35,13 @@ lib.zones.box(data) - data: `table` - coords: `vector3` - size?: `vector3` - - Default: `vec3(4, 4, 4)` + - Default: `vec3(2, 2, 2)` - rotation?: `number` - Angle in degrees - - onEnter: `function(self: table)` - - onExit: `function(self: table)` - - inside: `function(self: table)` + - Default: `0` + - onEnter?: `function(self: table)` + - onExit?: `function(self: table)` + - inside?: `function(self: table)` - debug?: `boolean` ## lib.zones.sphere @@ -53,9 +54,9 @@ lib.zones.sphere(data) - coords: `vector3` - radius?: `number` - Default: `2` - - onEnter: `function`(self: `table`) - - onExit: `function`(self: `table`) - - inside: `function`(self: `table`) + - onEnter?: `function(self: table)` + - onExit?: `function(self: table)` + - inside?: `function(self: table)` - debug?: `boolean` ## Methods diff --git a/pages/ox_target/Functions/Client.mdx b/pages/ox_target/Functions/Client.mdx index 9f14c9d1..4dc83969 100644 --- a/pages/ox_target/Functions/Client.mdx +++ b/pages/ox_target/Functions/Client.mdx @@ -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` - 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` - 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