Server
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.

AddEventHandler('ox_doorlock:stateChanged', function(source, doorId, state, usedItem) end)
  • source: number or nil
  • doorId: number
  • state: 0 or 1
  • usedItem: string or false