mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 22:22:46 +00:00
* refactor: Add h1 headers to all pages missing it * refactor: missed example h3 * change hooks example heading to bold text --------- Co-authored-by: Luke <[email protected]>
34 lines
603 B
Plaintext
34 lines
603 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)
|
|
```
|
|
|
|
- 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`
|