Client Exports
Documentation for public client exports available in kartik-garages.
๐ Proximity & Zone Exports
GetNearbyGarage
Returns the closest active garage ID and distance to the player within maxDistance.
local garageId, distance = exports['kartik-garages']:GetNearbyGarage(15.0)
if garageId then
print("Closest garage:", garageId, "Distance:", distance)
endIsInsideGarage
Checks whether the player is currently inside any active garage zone.
local isInside, garageId = exports['kartik-garages']:IsInsideGarage()
if isInside then
print("Player is inside garage zone:", garageId)
end๐ Garage Access Exports
openGarageByGarageId
Opens the garage window for any garage id, including property garages that have no zone. spawnCoords is where retrieved vehicles are placed.
exports['kartik-garages']:openGarageByGarageId('kp_prop_12', { x = -14.1, y = -1441.2, z = 31.1, w = 180.0 })parkVehicleByGarageId
Parks the vehicle the player is driving into a garage by id. A hitched trailer is stored with it.
exports['kartik-garages']:parkVehicleByGarageId('kp_prop_12')RaidGarageById
Opens the police raid panel for a garage by id. Use it for property garages, which have no garage zone. The officer must be within 20 m of the property's garage door. See Police Garage Raids.
exports['kartik-garages']:RaidGarageById('kp_prop_12', 'Grove Street House')OpenCustomizationMenu
Opens the Livery & Extras menu for the vehicle the player is driving. See Livery & Extras Menu.
exports['kartik-garages']:OpenCustomizationMenu()usePlate
Opens the plate change dialog, for use from a plate item.
exports['kartik-garages']:usePlate()๐ Street Parking Exports
StreetParkVehicle
Street-parks the vehicle the player is driving, with the same checks as /park.
exports['kartik-garages']:StreetParkVehicle()OpenParkedList
Opens the Parked Vehicles panel.
exports['kartik-garages']:OpenParkedList()RefreshParkedBlips
Re-fetches the player's parked vehicles and redraws their map blips.
exports['kartik-garages']:RefreshParkedBlips()๐ท๏ธ Vehicle Name Exports
getVehicleDisplayName
Turns a spawn name or model hash into the name players should see.
local name = exports['kartik-garages']:getVehicleDisplayName('sultanrs') -- "Sultan RS"resolveVehicleModel
Recovers the spawn name for a model hash. Returns the spawn name (or nil if nothing knows the hash) and the hash.
local spawnName, hash = exports['kartik-garages']:resolveVehicleModel(GetEntityModel(vehicle))๐ก Client Net Events
Vehicle Transfer Confirmation
Triggered when receiving a vehicle transfer request.
-- Triggered automatically on buyer client when seller proposes a transfer
TriggerEvent("kartik-garages:client:confirmTransfer", transferData)Add Current Vehicle to Job Fleet
Adds the vehicle currently driven by the player to a job fleet.
TriggerEvent("kartik-garages:client:addCurrentJobVehicle", "police")Add Current Vehicle to Citizen
Assigns the vehicle currently driven by the player to a target player's Citizen ID.
TriggerEvent("kartik-garages:client:addCurrentVehicle", "Y54I22I2")