Skip to main content

Client

GetGaragesData

KeyTypeDescription
count?booleanOnly return count
  exports.mGarage:GetGaragesData(count)

OpenGarage

Function to open a garage with specified parameters.

The data table should contain the following keys:

KeyTypeDescription
namestringThe name of the garage
garagetypestringThe type of the garage (e.g., 'garage')
intocarbooleanWhether to automatically enter the car upon spawn
carTypetableA list of car types allowed in the garage (e.g., 'automobile', 'bike')
spawnpostableA list of spawn positions in vec4 format (coordinates with heading)
  exports.mGarage:OpenGarage(data)

SaveCar

Store Vehicle by entity

The data table should contain the following keys:

KeyTypeDescription
namestringThe name of the garage
garagetypestringThe type of the garage (e.g., 'garage')
entitybooleanWhether to automatically enter the car upon spawn
carTypetableA list of car types allowed in the garage (e.g., 'automobile', 'bike')
  exports.mGarage:SaveCar(data)

Impound

Function to impound a vehicle

The data table should contain the following keys:

KeyTypeDescription
entity
impoundName
  exports.mGarage:ImpoundVehicle(data)

CopyCoords

Function to copy single/multiple coords.

ParameterTypeDescription
actionstringThe action type, either 'single' or 'multi'.
entityTypestringThe entity type, either 'ped', 'car', 'prop', or 'none'.
callBackfunctionCallback function to execute with the copied coordinates.
datatable{textui:boolean , switch:boolean , carModel:string, propModel:string}
exports.mGarage:CopyCoords(action, entityType, callBack, options)

CreateZone

Function to create a zone using ox_lib.

ParameterTypeDescription
polyzoneNamestringThe name of the polyzone.
textuibooleanWhether to show text UI.
CallbackfunctionCallback function to execute with the created zone.
  exports.mGarage:CreateZone(polyzoneName, texui, callBack)