ToggleDoorLock
Toggles the lock state of a specific door by its ID.
Syntax:
Bridge.Doorlock.ToggleDoorLock(doorID, toggle)
Parameters:
doorID
(string) - Unique identifier of the door to toggletoggle
(boolean) - True to lock the door, false to unlock
Example:
local Bridge = exports['community_bridge']:Bridge()
-- Lock a door
local success = Bridge.Doorlock.ToggleDoorLock("police_station_main", true)
if success then
print("Police station main door locked")
end
-- Unlock a door
Bridge.Doorlock.ToggleDoorLock("hospital_entrance", false)
print("Hospital entrance unlocked")
Last updated