SetPropertyLocked
exports['kartik-properties']:SetPropertyLocked(propertyId, locked)🔹 Description
Sets the front door lock status of a property. Immediately synchronizes state via GlobalState (kpp:<id>) and persists the updated lock state in the database.
🔧 Parameters
| Name | Type | Required | Description |
|---|---|---|---|
propertyId | number | string | ✅ | Property ID to update. |
locked | boolean | ✅ | true to lock the property, false to unlock. |
📤 Returns
| Type | Description |
|---|---|
table | Result table { success = true/false }. |
🧠 Example Usage
-- Lock property #12
local res = exports['kartik-properties']:SetPropertyLocked(12, true)
-- Unlock property #12
local res = exports['kartik-properties']:SetPropertyLocked(12, false)