Client-side exports for ak47_garage.
Returns a list of all registered garages and their configuration settings.
local garages = exports['ak47_garage']:GetGarages()| Parameter | Type | Required | Description |
|---|---|---|---|
| None | N/A | No | Takes no parameters |
table - Array of garage objects with settings, fees, and types.Returns information about the garage zone the player is currently inside.
local current = exports['ak47_garage']:GetCurrentGarage()| Parameter | Type | Required | Description |
|---|---|---|---|
| None | N/A | No | Takes no parameters |
table - Table containing name, garage, and anyGarage.Checks if the player is currently standing inside any garage polyzone.
local isInside = exports['ak47_garage']:IsInsideGarage()| Parameter | Type | Required | Description |
|---|---|---|---|
| None | N/A | No | Takes no parameters |
boolean - true if inside a garage boundary, false otherwise.Retrieves the identifier of the garage zone the player is inside.
local gid = exports['ak47_garage']:GetInsideGarageId()| Parameter | Type | Required | Description |
|---|---|---|---|
| None | N/A | No | Takes no parameters |
string \| nil - Garage identifier if inside a zone, nil otherwise.Retrieves the internal configuration data for a specific garage ID.
local data = exports['ak47_garage']:GetGarageData(gid)| Parameter | Type | Required | Description |
|---|---|---|---|
gid |
string | Yes | Unique garage identifier |
table \| nil - Garage object or nil if not found.Opens the 3D showroom and NUI garage menu for a garage.
local success = exports['ak47_garage']:OpenGarage(gid)| Parameter | Type | Required | Description |
|---|---|---|---|
gid |
string | No | Optional garage ID. Defaults to current zone. |
boolean - true if opened successfully, false otherwise.Closes the garage menu UI and destroys preview showroom camera and vehicle.
local closed = exports['ak47_garage']:CloseGarage()| Parameter | Type | Required | Description |
|---|---|---|---|
| None | N/A | No | Takes no parameters |
boolean - true if closed, false otherwise.Checks if the garage NUI menu and showroom camera are currently open.
local isOpen = exports['ak47_garage']:IsGarageOpenUI()| Parameter | Type | Required | Description |
|---|---|---|---|
| None | N/A | No | Takes no parameters |
boolean - true if UI is open, false otherwise.Spawns a vehicle from the garage by license plate.
exports['ak47_garage']:SpawnVehicle(plate, targetGid)| Parameter | Type | Required | Description |
|---|---|---|---|
plate |
string | Yes | Vehicle license plate |
targetGid |
string | No | Optional garage ID. Defaults to current zone. |
voidParks the vehicle the player is currently driving into the garage.
local success = exports['ak47_garage']:ParkCurrentVehicle(gid)| Parameter | Type | Required | Description |
|---|---|---|---|
gid |
string | No | Optional garage ID. Defaults to current zone. |
boolean - true if initiated, false otherwise.Plays the tablet animation and attaches tablet prop to player ped.
exports['ak47_garage']:StartTabletAnim()| Parameter | Type | Required | Description |
|---|---|---|---|
| None | N/A | No | Takes no parameters |
voidStops tablet animation and removes attached tablet prop from player ped.
exports['ak47_garage']:StopTabletAnim()| Parameter | Type | Required | Description |
|---|---|---|---|
| None | N/A | No | Takes no parameters |
voidDeducts real parking fee if parking charges are enabled for garage.
local paid = exports['ak47_garage']:PayRealFee(gid, plate)| Parameter | Type | Required | Description |
|---|---|---|---|
gid |
string | Yes | Garage identifier |
plate |
string | Yes | Vehicle license plate |
boolean - true if paid or free, false if insufficient funds.Spawns vehicle in photo studio, captures screenshot, and uploads to FiveManage.
exports['ak47_garage']:TakeVehiclePhoto(plate)| Parameter | Type | Required | Description |
|---|---|---|---|
plate |
string | Yes | Vehicle license plate |
voidReturns camera preset configuration for a vehicle model based on dimensions.
local presetName, presetConfig = exports['ak47_garage']:GetPhotoPreset(modelHash)| Parameter | Type | Required | Description |
|---|---|---|---|
modelHash |
number | string | Yes | Vehicle model hash or name |
string, table - Preset name and camera config table (CamCoords, CamRotation, Fov).Resolves the garage classification category for a vehicle model.
local vType = exports['ak47_garage']:GetVehicleType(model)| Parameter | Type | Required | Description |
|---|---|---|---|
model |
number | string | Yes | Vehicle model hash or name |
string - Vehicle category (automobile, bike, boat, heli, plane, submarine, trailer).Checks if a vehicle model is allowed in a specific garage category.
local isCompatible = exports['ak47_garage']:IsVehicleCompatible(model, garageType)| Parameter | Type | Required | Description |
|---|---|---|---|
model |
number | string | Yes | Vehicle model hash or name |
garageType |
string | Yes | Target garage type (car, boat, heli, plane) |
boolean - true if compatible, false otherwise.Calculates performance metrics, handling physics, and rarity for a vehicle model.
local stats = exports['ak47_garage']:GetVehicleRealStats(modelHash, vehicleEntity)| Parameter | Type | Required | Description |
|---|---|---|---|
modelHash |
number | string | Yes | Vehicle model hash or name |
vehicleEntity |
number | No | Optional active vehicle entity handle |
table - Statistics object (topSpeed, acceleration, handling, braking, driveType, power, weight, rarity).Calculates vehicle rarity tier based on performance factors.
local tier = exports['ak47_garage']:GetVehicleRarity(maxSpeed, accel, handling, braking)| Parameter | Type | Required | Description |
|---|---|---|---|
maxSpeed |
number | Yes | Top speed in km/h |
accel |
number | Yes | Acceleration value |
handling |
number | Yes | Handling rating (0-100) |
braking |
number | Yes | Braking rating (0-100) |
string - Rarity tier (COMMON, UNCOMMON, RARE, EPIC).