ToggleLockdown
lua
During a lockdown, the actions in Config.PoliceLockdown are blocked for everyone except police, such as entering, the stash, the garage and key management. Turning it on also locks the entrance and every door of the property. Turning it off does not unlock them.
Parameters
- playerId:
number | false | 0The player who starts the lockdown. Passfalseor0for a server call, which skips all checks. - propertyId:
numberThe property ID - toggle?:
booleantrueto turn it on,falseto turn it off. Leave it out to switch the current state.
Return Value
booleanWhether the lockdown was changed.falseif the property doesn't exist, or a player call fails its checks.
Behavior
- The player must be online.
- The player needs the police raid permission (
Config.PoliceRaid.Jobs).
- No checks are done.