Server
Doorlock (server). lockDoor and unlockDoor set a door's state through the active doorlock resource (Config.Doorlock).
Doorlock (server)
Separate calls for each state, so there is no boolean to get backwards.
lockDoor(doorId)
bridge.doorlock.lockDoor(doorId)| Param | Type | Description |
|---|---|---|
doorId | string | number | The door, as the doorlock resource names it (see client) |
| Returns | boolean — true when the request was sent, false for a bad id or no doorlock resource |
unlockDoor(doorId)
Same parameter and result as lockDoor.
-- Server: open the cell door for a minute
bridge.doorlock.unlockDoor(doorId)
SetTimeout(60000, function()
bridge.doorlock.lockDoor(doorId)
end)ox_doorlock accepts the id as a string or a number. The bridge never throws: a missing or failing doorlock resource returns false. See Missing or broken providers.
