mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 14:38:50 +00:00
new docs
This commit is contained in:
1 parent
3cebaf7fa5
commit
b5eba8423f
229 files changed
+6238
-10690
No files matched your search
@@ -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`
|
||||
@@ -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`
|
||||
Reference in new issue
Block a user