Exports

A list of available exports for integrating with cd_garage.

Chat CommandsEventsExportsKeysItems

Note

These exports are entirely optional and can be used as needed within your own scripts or integrations.


Client

Get Garage Type

Returns the garage type of the specified vehicle (e.g., car, boat, air).

@parameters
--- @param vehicle number | entity The vehicle entity to check.
--- @return string garageType The garage type assigned to the vehicle.
--- @example
--- local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
--- local garageType = exports['cd_garage']:GetGarageType(vehicle)
---
--- print("This vehicle belongs to the " .. garageType .. " garage type.")


Get Vehicle Mileage

Retrieves the mileage for a vehicle mileage using the vehicle’s plate.


Get Keys Data

Retrieves all stored key data for the player, including owned and temporary vehicle keys.


Does Player Have Keys

Checks whether the player currently has keys for a specific vehicle based on its plate.


Get Plate

Returns the license plate text of the specified vehicle.


Get Correct Plate Format

Returns the vehicle’s license plate text formatted according to the cd_garage config settings (supports trimmed, with_spaces, or mixed formats).


Get Config


Get Vehicles Data

Retrieves vehicle data such as name, category, price, model hash and spawn name for all vehicles the garage has cached.

Server

Get Garage Limit

Returns the maximum number of vehicles a player can store in their garage.


Get Garage Count

Returns how many vehicles the player currently has stored in a specific garage type.



Get Config

Retrieves the full configuration table (config.lua) for cd_garage.


Get Vehicles Data

Retrieves vehicle data such as name, category, price, model hash and spawn name for all vehicles the garage has cached.


Is Vehicle Impounded

Checks whether a specified vehicle (by plate) is currently impounded.


Get Vehicle Impound Data

Retrieves impound information for a specific vehicle based on its plate.


Get Correct Plate Format

Returns the vehicle’s license plate text formatted according to the cd_garage config settings (supports trimmed, with_spaces, or mixed formats).

Last updated

Was this helpful?