mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 06:28:54 +00:00
* 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
35 lines
661 B
Plaintext
35 lines
661 B
Plaintext
# Events
|
|
|
|
## 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, lockpick)
|
|
```
|
|
|
|
- doorId: `number`
|
|
- state: `0` or `1` or `boolean`
|
|
- lockpick: `boolean`
|
|
|
|
## Handlers
|
|
|
|
These events **should not** 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: `boolean`
|
|
- usedItem: `string` or `false` or `nil`
|