IsPropertyGarage
exports['kartik-properties']:IsPropertyGarage(garageId)🔹 Description
Tells a garage resource whether a garage id belongs to kartik-properties.
Vehicles parked in a property garage are saved with garage = 'kp_prop_<propertyId>' and state = 'garage'. Stock garage scripts don't recognise that id, so the car looks lost. Call this first, and if it returns true, use the other garage API exports to resolve it.
🔧 Parameters
| Name | Type | Required | Description |
|---|---|---|---|
garageId | string | ✅ | The garage value from a vehicle row. |
📤 Returns
| Type | Description |
|---|---|
boolean | true when the id is kp_prop_<id> and that property has a garage built. |
🧠 Example Usage
local function garageLabel(garageId)
if exports['kartik-properties']:IsPropertyGarage(garageId) then
return exports['kartik-properties']:GetPropertyGarage(garageId).label
end
return Config.Garages[garageId] and Config.Garages[garageId].label or garageId
end