CanUsePropertyGarage
exports['kartik-properties']:CanUsePropertyGarage(cid, garageId)🔹 Description
Checks whether a citizen may open a property garage: they must own the property personally or hold a live key for it. Call it before your garage script lists or releases vehicles.
🔧 Parameters
| Name | Type | Required | Description |
|---|---|---|---|
cid | string | number | ✅ | The citizen id. |
garageId | string | ✅ | A property garage id, e.g. kp_prop_12. |
📤 Returns
| Type | Description |
|---|---|
boolean | true if allowed. false for unknown ids, properties with no garage, or no access. |
🧠 Example Usage
if not exports['kartik-properties']:CanUsePropertyGarage(cid, garageId) then
return lib.notify(source, { description = 'You have no access to this garage', type = 'error' })
end