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
| Name | Type | Required | Description |
|---|---|---|---|
garageId | string | ✅ | 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:
| Field | Type | Description |
|---|---|---|
garageId | string | kp_prop_<propertyId>. |
propertyId | number | The property id. |
label | string | Property display name. |
coords | table | { x, y, z, w }: the garage point (where cars are put down). |
slots | number | Vehicle capacity on the deed. |
garageType | string | 'ui' (menu at the door) or 'ipl' (walk-in garage interior). |
ownerType | string | 'citizen', 'company' or 'state'. |
ownerId | string | Citizen id / company id / account of the owner. |
blockId | number | Owning block (Block mode), may be nil. |
buildingId | number | Building 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