mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
add docs for ox_doorlock
This commit is contained in:
1 parent
05d6333992
commit
56d0fe1f80
9 files changed
+176
No files matched your search
@@ -0,0 +1,14 @@
|
||||
# Server
|
||||
|
||||
## 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`
|
||||
@@ -0,0 +1,5 @@
|
||||
Attempt to pick the lock of the closest door. Dependant on server-side checks and may fail.
|
||||
|
||||
```lua
|
||||
exports.ox_doorlock:pickClosestDoor()
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
Interact with the closest door. Dependant on server-side checks and may fail.
|
||||
|
||||
```lua
|
||||
exports.ox_doorlock:useClosestDoor()
|
||||
```
|
||||
@@ -0,0 +1,7 @@
|
||||
Gets data for a door with the given id, matching the id for the database entry.
|
||||
|
||||
```lua
|
||||
exports.ox_doorlock:getDoor(id)
|
||||
```
|
||||
|
||||
- id: `number`
|
||||
@@ -0,0 +1,7 @@
|
||||
Gets data for a door with the given name, matching the name for the database entry.
|
||||
|
||||
```lua
|
||||
exports.ox_doorlock:getDoorFromName(name)
|
||||
```
|
||||
|
||||
- name: `string`
|
||||
@@ -0,0 +1,6 @@
|
||||
# Door Conversion
|
||||
|
||||
Door configuration files written for nui_doorlock (and its fork, qb-doorlock) can be automatically added to your MySQL database.
|
||||
|
||||
- Any files with the `.lua` extension placed in the `ox_doorlock/convert` directory will be read on resource start.
|
||||
- Conversion cannot be guaranteed, especially if the config was not written for nui_doorlock.
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
title: Getting started
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
We always recommend using Git so you can track changes and update easily, however this requires building the UI.
|
||||
Otherwise, download the [latest release](https://github.com/overextended/ox_doorlock/releases).
|
||||
|
||||
### Building
|
||||
|
||||
You can ignore this if you downloaded a release build.
|
||||
|
||||
- [Download](https://www.nodejs.org/) and install the LTS version of Node.js.
|
||||
- Open a terminal, command prompt, etc. and navigate to your resources folder.
|
||||
- Execute the following commands
|
||||
|
||||
```bash
|
||||
npm install --location=global pnpm
|
||||
git clone https://github.com/overextended/ox_core.git
|
||||
cd web
|
||||
pnpm i
|
||||
pnpm build
|
||||
```
|
||||
|
||||
### Dependencies
|
||||
|
||||
- [oxmysql](https://github.com/overextended/oxmysql/)
|
||||
- [ox_lib](https://github.com/overextended/ox_lib/)
|
||||
|
||||
### Optional Dependencies
|
||||
|
||||
- [ox_target](https://github.com/overextended/ox_target/) or [qtarget](https://github.com/overextended/qtarget) or [qb-target](https://github.com/qbcore-framework/qb-target)
|
||||
- Doors can be lockpicked using the interaction menu.
|
||||
|
||||
### Supported Frameworks
|
||||
|
||||
These aren't necessary to run ox_doorlock, but they will add additional features.
|
||||
|
||||
- [ox_core](https://github.com/overextended/ox_core)
|
||||
- [esx](https://github.com/esx-framework/esx-legacy)
|
||||
- [qb-core](https://github.com/qbcore-framework/qb-core)
|
||||
|
||||
## Opening the UI
|
||||
|
||||
Assuming you've installed the resource and it has started, you can use `/doorlock` to open the UI.
|
||||
|
||||
- If the cursor is displayed but nothing appeared, the UI hasn't been built.
|
||||
- Check you are authorised to use the command.
|
||||
- Type `test_ace player.1 command.doorlock` in the server console (replace 1 with your server id).
|
||||
@@ -0,0 +1,53 @@
|
||||
# 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.
|
||||
|
||||
+28
@@ -48,6 +48,11 @@ const sidebars = {
|
||||
label: 'Inventory',
|
||||
href: '/docs/ox_inventory',
|
||||
},
|
||||
{
|
||||
type: 'link',
|
||||
label: 'Doorlock',
|
||||
href: '/docs/ox_doorlock',
|
||||
},
|
||||
],
|
||||
ox_target: [
|
||||
{
|
||||
@@ -161,6 +166,29 @@ const sidebars = {
|
||||
],
|
||||
},
|
||||
],
|
||||
ox_doorlock: [
|
||||
{
|
||||
type: 'link',
|
||||
label: '← Home',
|
||||
href: '/docs',
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Doorlock',
|
||||
link: {
|
||||
type: 'generated-index',
|
||||
title: 'Ox Doorlock',
|
||||
description:
|
||||
'Door management resource.',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
type: 'autogenerated',
|
||||
dirName: 'ox_doorlock',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = sidebars;
|
||||
Reference in new issue
Block a user