Client
GetGarages
Returns a list of all registered garages and their basic settings.
local garages = exports['ak47_garage']:GetGarages()Return Values
table
Array of garage summary objects:
Each item in the array contains:
name(string): Unique garage identifier / name.fee(number): Vehicle transfer fee for this garage.type(string): Garage category (car,boat,heli,plane).isImpound(boolean): Whether the garage acts as an impound lot.realParking(boolean): Whether physical parking dummies are enabled.maxVehicle(number): Maximum parking capacity if parking limits are active.parkingFee(number): Hourly parking fee rate.maxParkingFee(number): Maximum parking fee cap (-1 for unlimited).
Example
local garages = exports['ak47_garage']:GetGarages()
for _, g in ipairs(garages) do
print(string.format("Garage: %s | Type: %s | Transfer Fee: $%d", g.name, g.type, g.fee))
endGetCurrentGarage
Gets information about the garage zone the player is currently standing inside.
Return Values
name
string|boolean
Current garage ID/name, or false if not inside a garage.
garage
table|nil
Full garage configuration object, or nil if outside.
anyGarage
boolean
Value of Config.AnyGarage.
Example
IsInsideGarage
Checks if the player is currently standing inside any garage polyzone.
Return Values
boolean
true if the local player is inside a garage boundary, false otherwise.
Example
GetInsideGarageId
Retrieves the ID (name) of the garage zone the player is currently occupying.
Return Values
string|nil
Garage identifier if inside a zone, or nil.
GetGarageData
Retrieves the complete internal data object for a specific garage ID.
Parameters
gid
string
Yes
The unique garage identifier.
Return Values
table|nil
Full garage object containing polyzone, spawns, setting, realparked, reposition, trailerpos, or nil if not found.
OpenGarage
Programmatically opens the 3D Showroom and NUI Garage Menu for the specified garage (or current zone).
Parameters
gid
string
No
Optional garage ID to open. If omitted, uses current zone.
Return Values
boolean
true if successfully opened, false if target garage could not be determined.
Example
CloseGarage
Programmatically closes the garage menu UI, fades the screen in, and destroys the preview showroom camera and vehicle.
Return Values
boolean
true if garage was open and closed, false otherwise.
IsGarageOpenUI
Checks if the garage NUI menu and showroom camera are currently open.
Return Values
boolean
true if UI is open, false otherwise.
SpawnVehicle
Spawns a vehicle from the garage by its license plate.
Parameters
plate
string
Yes
License plate of the vehicle to spawn.
targetGid
string
No
Optional garage ID. Defaults to current zone.
Example
ParkCurrentVehicle
Parks the vehicle the local player is currently seated in into the garage zone.
Parameters
gid
string
No
Optional garage ID. Defaults to current zone.
Return Values
boolean
true if parking procedure was initiated, false if player is not in a vehicle or garage is invalid.
StartTabletAnim
Plays the tablet animation and attaches the prop_cs_tablet entity to the player's ped.
StopTabletAnim
Stops the tablet animation and deletes the attached tablet prop from the player's ped.
PayRealFee
Executes payment for real parking fee if parking fees are enabled for the specified garage.
Parameters
gid
string
Yes
Garage identifier.
plate
string
Yes
Vehicle license plate.
Return Values
boolean
true if payment succeeded or not required, false if player lacked funds.
TakeVehiclePhoto
Spawns the vehicle silently in the photo studio room, positions the camera using dimension/class presets, captures an image using screenshot-basic, and uploads it to FiveManage.
Parameters
plate
string
Yes
License plate of the vehicle to photograph.
Example
GetPhotoPreset
Calculates and returns the camera positioning preset configuration for a given vehicle model based on dimensions or vehicle class.
Parameters
modelHash
number|string
Yes
Vehicle model hash or model name string.
Return Values
presetName
string
Preset key (e.g., small, compact, medium, large, xlarge, xxlarge, boat_small, aircraft_medium, etc.).
presetConfig
table
Preset details containing CamCoords, CamRotation, and Fov.
GetVehicleType
Resolves the garage vehicle classification category for a vehicle model.
Parameters
model
number|string
Yes
Vehicle model hash or model name string.
Return Values
string
Category: "automobile", "bike", "boat", "heli", "plane", "submarine", or "trailer".
IsVehicleCompatible
Checks if a given vehicle model is allowed to be parked in the specified garage type category.
Parameters
model
number|string
Yes
Vehicle model hash or string name.
garageType
string
Yes
Target garage type ("car", "boat", "heli", "plane").
Return Values
boolean
true if compatible, false otherwise.
GetVehicleRealStats
Calculates live performance metrics, handling physics, power, weight, and rarity for a vehicle model.
Parameters
modelHash
number|string
Yes
Vehicle model hash or name.
vehicleEntity
number
No
Optional active vehicle entity handle for live handling calculations.
Return Values
topSpeed
number
Estimated top speed in km/h.
acceleration
string
0-100 km/h acceleration rating in seconds.
handling
number
Handling score (0 - 100).
braking
number
Braking score (0 - 100).
driveType
string
Drive layout ("AWD", "RWD", "FWD").
power
string
Calculated horsepower (e.g., "450 HP").
weight
string
Mass (e.g., "1650 KG").
rarity
string
Tier: "COMMON", "UNCOMMON", "RARE", or "EPIC".
GetVehicleRarity
Calculates the rarity tier based on performance factors and weights configured in Config.Rarity.
Parameters
maxSpeed
number
Yes
Top speed in km/h.
accel
number
Yes
Acceleration stat.
handling
number
Yes
Handling score (0 - 100).
braking
number
Yes
Braking score (0 - 100).
Return Values
string
"COMMON", "UNCOMMON", "RARE", or "EPIC".
Last updated