Server Exports
Documentation for public server exports available in kartik-garages.
🔍 Vehicle Query Exports
GetVehicleByPlate
Returns the database row object for a vehicle by license plate (supports clean plate matching).
local vehicleData = exports['kartik-garages']:GetVehicleByPlate("85ETZ139")GetVehicleGarage
Returns the current garage name assigned to a vehicle plate.
local garageName = exports['kartik-garages']:GetVehicleGarage("85ETZ139")GetVehicleStatus
Returns string status (Stored, Out, Impounded, Parked).
local status = exports['kartik-garages']:GetVehicleStatus("85ETZ139")IsVehicleImpounded
Returns true if the vehicle is currently impounded.
local isImpounded = exports['kartik-garages']:IsVehicleImpounded("85ETZ139")IsVehicleStored
Returns true if the vehicle is currently stored in a garage.
local isStored = exports['kartik-garages']:IsVehicleStored("85ETZ139")GetVehicleOwner
Returns the Citizen ID / Identifier of the vehicle owner.
local citizenId = exports['kartik-garages']:GetVehicleOwner("85ETZ139")🛠️ Storage & Action Exports
StoreVehicleInGarage
Forces a vehicle into a specific garage without requiring player presence.
local success, err = exports['kartik-garages']:StoreVehicleInGarage("85ETZ139", "publicgarage")GetPlayerVehicles
Returns a table array of all vehicles owned by a Citizen ID.
local vehicles = exports['kartik-garages']:GetPlayerVehicles("Y54I22I2")
for _, v in ipairs(vehicles) do
print(v.plate, v.model, v.garage, v.status, v.mileage)
endReturnVehicleToGarage
Returns an out or street-parked vehicle back to storage.
local success, msg = exports['kartik-garages']:ReturnVehicleToGarage("85ETZ139", requesterCitizenId, isAdmin)🏢 Garage Cache Exports
GetGarage
Returns detailed configuration data for a specific garage ID.
local garage = exports['kartik-garages']:GetGarage("legion_square")GetGarages
Returns a table of all registered garage locations.
local garages = exports['kartik-garages']:GetGarages()GetGaragesByType
Returns all garages matching a specific type (public, private, job, gang).
local publicGarages = exports['kartik-garages']:GetGaragesByType("public")🚨 Impound Exports
ImpoundVehicle
Impounds or seizes a vehicle into an impound lot. A seized vehicle can only be released by police.
The export also takes the car out of the world: it drops any street parking record for the plate (or fake plate) and removes every copy of the car that is still out, so Qbox vehicle persistence can't bring it back. You don't need to delete the vehicle yourself, but it's safe if you do. Returns true on success, or false, message when the plate isn't an owned vehicle.
-- (plate, impoundLot, reason, fee, isSeized, officerName)
local ok, err = exports['kartik-garages']:ImpoundVehicle(plate, 'impound', 'Evading arrest', 2500, false, 'Officer Smith')UpdateFrameworkImpoundState / UpdateFrameworkReleaseState
Mark a vehicle impounded or released, for police scripts that handle the vehicle entity themselves.
exports['kartik-garages']:UpdateFrameworkImpoundState(plate, isSeized, fee, reason)
exports['kartik-garages']:UpdateFrameworkReleaseState(plate)🚗 Street Parking Exports
GetParkedVehicle / IsVehicleStreetParked
Read what is street-parked. GetParkedVehicle returns the parking record, or nil.
local record = exports['kartik-garages']:GetParkedVehicle(plate)
local parked = exports['kartik-garages']:IsVehicleStreetParked(plate)GetParkedVehicleRemaining
Seconds left before a parked vehicle's countdown puts it away. nil when no countdown runs, negative when overdue.
local record = exports['kartik-garages']:GetParkedVehicle(plate)
local seconds = record and exports['kartik-garages']:GetParkedVehicleRemaining(record)GetParkingLocationOccupancy
How many vehicles are parked at a parking location.
local count = exports['kartik-garages']:GetParkingLocationOccupancy('legion_lot')ReleaseParkedVehicle
Stops tracking a parked vehicle and marks it as out. Pass true as the second argument to leave the vehicle standing where it is.
local ok, record = exports['kartik-garages']:ReleaseParkedVehicle(vehicleId, keepEntity)ReturnParkedVehicleToGarage
Sends a parked vehicle to a garage, or to impound when the third argument is true.
local ok, record = exports['kartik-garages']:ReturnParkedVehicleToGarage(vehicleId, 'publicgarage', false)ForgetParkedVehicle
Stops tracking a parked vehicle and removes it from the street without changing its state. Only for scripts that set the state themselves.
exports['kartik-garages']:ForgetParkedVehicle(plate)💼 Job Vehicle Exports
See Job Owned Vehicles for how job ownership works. Unless noted, these return ok, plateOrError.
PurchaseJobVehicle
Files a vehicle bought from a dealership to a job. Call it after taking payment.
local ok, plate = exports['kartik-garages']:PurchaseJobVehicle({ job = 'police', model = 'police3', buyer = citizenId })AddJobVehicle
Creates a new vehicle owned by a job and stores it in a garage.
-- (jobName, model, plate, keeperCitizenId, garageName, props)
local ok, plate = exports['kartik-garages']:AddJobVehicle('police', 'police3', nil, citizenId, 'mrpd', props)SetVehicleJobOwner / ClearVehicleJobOwner
Hand an existing vehicle to a job, or give a job vehicle back to a person. SetVehicleJobOwner takes an optional third argument, a garage name, to move the vehicle into that garage at the same time. Both return ok, plate or false, errorMessage.
exports['kartik-garages']:SetVehicleJobOwner(plate, 'police')
exports['kartik-garages']:SetVehicleJobOwner(plate, 'police', 'mrpd_garage')
exports['kartik-garages']:ClearVehicleJobOwner(plate, citizenId)RemoveJobVehicle
Deletes a job-owned vehicle. Personally owned vehicles are refused.
local ok, plate = exports['kartik-garages']:RemoveJobVehicle(plate)GetJobVehicles
Returns every vehicle a job owns, with plate, model, garage, status and mileage.
local vehicles = exports['kartik-garages']:GetJobVehicles('police')GetVehicleJobOwner / GetJobKeeperCitizenId
The job that owns a plate (nil when personally owned), and the registered keeper citizen id.
local job = exports['kartik-garages']:GetVehicleJobOwner(plate)
local keeper = exports['kartik-garages']:GetJobKeeperCitizenId()