mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 22:22:46 +00:00
32 lines
589 B
Plaintext
32 lines
589 B
Plaintext
# 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`
|