This commit is contained in:
Luke committed 2023-06-04 15:15:21 +02:00
1 parent 3cebaf7fa5
commit b5eba8423f
229 files changed
+6238 -10690

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
## pickClosestDoor
Attempt to pick the lock of the closest door. Dependant on server-side checks and may fail.
```lua
exports.ox_doorlock:pickClosestDoor()
```
## useClosestDoor
Interact with the closest door. Dependant on server-side checks and may fail.
```lua
exports.ox_doorlock:useClosestDoor()
```
+31
View File
@@ -0,0 +1,31 @@
# Triggers
These events are safe to trigger and handle in other scripts.
## ox_doorlock:setState
Can be triggered to lock or unlock a door.
```
TriggerEvent('ox_doorlock:setState', doorId, state)
```
- doorId: `number`
- state: `0` or `1`
# Handlers
These events shouldn't be triggered by any other scripts.
## ox_doorlock:stateChanged
Triggered when a doors state is updated.
```lua
AddEventHandler('ox_doorlock:stateChanged', function(source, doorId, state, usedItem) end)
```
- source: `number` or `nil`
- doorId: `number`
- state: `0` or `1`
- usedItem: `string` or `false`
+31
View File
@@ -0,0 +1,31 @@
Gets data for a door with the given id, matching the id for the database entry.
## getDoor
```lua
exports.ox_doorlock:getDoor(id)
```
### Parameters
- id: `number`
### Returns
- `table`
Gets data for a door with the given name, matching the name for the database entry.
## getDoorFromName
```lua
exports.ox_doorlock:getDoorFromName(name)
```
### Parameters
- name: `string`
### Returns
- `table`
+54
View File
@@ -0,0 +1,54 @@
---
title: Door settings
---
## General
- Door name
- Used to easily identify the door.
- Passcode
- Door can be unlocked by anybody by using the code or phrase.
- Autolock interval
- Door will be locked after x seconds.
- Interact distance
- Door can only be used when within x metres.
- Door rate
- Door movement speed for sliding/garage/automatic doors, or swinging doors when locked.
- Locked
- Sets the door as locked by default.
- Double
- Door is a set of two doors, controlled together.
- Automatic
- Sliding/garage/automatic door.
- Lockpick
- Door can be lockpicked when interacting with a targeting resource.
- Hide UI
- No indicators (i.e. icon, text) will display on the door.
## Characters
- Character Id
- Character identifier used by a framework (i.e. player.charid, xPlayer.identifier, Player.CitizenId).
## Groups
- Group
- Framework dependent, referring to jobs, gangs, etc.
- Grade
- The minimum grade to allow access for the group (0 to allow all).
## Items
- Item
- Name of the item.
- Metadata type
- Requires metadata support (i.e. ox_inventory) to check slot.metadata.type
## Lockpick
- Difficulty
- Sets the skillcheck difficulty (see [docs](https://overextended.github.io/docs/ox_lib/Interface/Client/skillcheck)).
- Area size
- Custom difficulty area size.
- Speed multiplier
- Custom difficulty idicator speed.