Kartik Scripts

GetPropertyGarage

exports['kartik-properties']:GetPropertyGarage(garageId)

🔹 Description

Returns the full record for one property garage: its label, location, slot count and owner. Read-only.


🔧 Parameters

NameTypeRequiredDescription
garageIdstring✅A property garage id, e.g. kp_prop_12.

📤 Returns

table|nil: nil if the id isn't a property garage or the property has no garage built. Otherwise a garage record:

FieldTypeDescription
garageIdstringkp_prop_<propertyId>.
propertyIdnumberThe property id.
labelstringProperty display name.
coordstable{ x, y, z, w }: the garage point (where cars are put down).
slotsnumberVehicle capacity on the deed.
garageTypestring'ui' (menu at the door) or 'ipl' (walk-in garage interior).
ownerTypestring'citizen', 'company' or 'state'.
ownerIdstringCitizen id / company id / account of the owner.
blockIdnumberOwning block (Block mode), may be nil.
buildingIdnumberBuilding the unit belongs to, may be nil.

🧠 Example Usage

local g = exports['kartik-properties']:GetPropertyGarage('kp_prop_12')
if g then
    print(('%s has %d slots at %.1f, %.1f'):format(g.label, g.slots, g.coords.x, g.coords.y))
end

On this page