Kartik Scripts

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

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

๐Ÿ“ค Returns

TypeDescription
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

On this page