Kartik Scripts

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

NameTypeRequiredDescription
cidstring | number✅The citizen id.
garageIdstring✅A property garage id, e.g. kp_prop_12.

📤 Returns

TypeDescription
booleantrue 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

On this page