Events / Exports

All events and exports are for client

Client

OpenGarage

exports["tgiann-realparking"]:OpenGarage(garageKey, slotIndex, isCustom)
Name
Type
Description

garageKey

string

Uniq garage name

slotIndex

number

Slot number

isCustom

boolean

Is custom garage

Example

exports["tgiann-realparking"]:OpenGarage("pd_normal_1", 2, false)
-- Example for housing garage
exports["tgiann-realparking"]:OpenGarage("my_house", 1, true)

ParkGarage

exports["tgiann-realparking"]:ParkGarage(garageKey, slotIndex, isCustom)
Name
Type
Description

garageKey

string

Uniq garage name

slotIndex

number

Slot number

isCustom

boolean

Is custom garage

Example

exports["tgiann-realparking"]:ParkGarage("pd_normal_1", 2, false)
-- Example for housing garage
exports["tgiann-realparking"]:ParkGarage("my_house", 1, true)

Server

ChangedVehiclePlate

You can use this export to update the garage data when the license plate of the vehicle changes.

exports["tgiann-realparking"]:ChangedVehiclePlate(oldplate, newPlate)
Name
Type
Description

oldplate

string

Old plate

newPlate

string

New plate

Example

exports["tgiann-realparking"]:ChangedVehiclePlate("ABC123A", "BCA213B")

GetInsurance

returns the vehicle's insurance data.

exports["tgiann-realparking"]:GetInsurance(plate)
Name
Type
Description

plate

string

Plate

Example

local insuranceDays, towAmount = exports["tgiann-realparking"]:GetInsurance("ABC123A")

IsVehicleParkedAnyGarage

returns the vehicle's insurance data.

exports["tgiann-realparking"]:IsVehicleParkedAnyGarage(plate)
Name
Type
Description

plate

string

Plate

Example

local success = exports["tgiann-realparking"]:IsVehicleParkedAnyGarage("ABC123A")

Last updated