GetPropertyGarageVehicles
exports['kartik-properties']:GetPropertyGarageVehicles(garageId, cid)๐น Description
Returns the vehicles a citizen currently has parked in a property garage. A vehicle counts only if its garage equals the garage id and its state is 'garage', so a car that was taken out but still carries the tag isn't listed.
๐ง Parameters
| Name | Type | Required | Description |
|---|---|---|---|
garageId | string | โ | A property garage id, e.g. kp_prop_12. |
cid | string | number | โ | The citizen id. |
๐ค Returns
| Type | Description |
|---|---|
table[] | Vehicle rows in the shape your framework bridge returns (plate, model, mods, โฆ). Empty if the citizen has no access. |
๐ง Example Usage
local cars = exports['kartik-properties']:GetPropertyGarageVehicles('kp_prop_12', cid)
for _, v in ipairs(cars) do
print(v.plate)
end๐ Notes
- Runs the same access check as
CanUsePropertyGarage. Without access it returns an empty table.