Kartik Scripts

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

NameTypeRequiredDescription
propertyIdnumber | string✅Property ID to update.
lockedboolean✅true to lock the property, false to unlock.

📤 Returns

TypeDescription
tableResult 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)

On this page