Client Exports
Get Vehicle Plate
exports.bhd_garage:GetVehiclePlate(vehicle)
Description: Retrieves the plate number of a given vehicle.
Arguments:
vehicle
(entity ID) β The entity ID of the vehicle.
Returns: String representing the vehicle's plate number or XXNOTFOUNDXX if plate was not found.
Lock Vehicle
exports.bhd_garage:LockVehicle()
Description: Locks or unlocks the player's current vehicle.
Toggle Engine
exports.bhd_garage:ToggleEngine()
Description: Turns the vehicleβs engine on or off.
Hotwire Vehicle
exports.bhd_garage:HotWire()
Description: Attempts to hotwire a locked vehicle.
Returns: Boolean indicating success or failure.
Lockpick Vehicle
exports.bhd_garage:LockPick()
Description: Tries to break into a locked vehicle using a lockpick.
Returns: Boolean indicating success or failure.
Save Vehicle
exports.bhd_garage:SaveVehicle({
garage = GarageId,
type = 'car',
distance = 2.5,
veh = GetVehiclePedIsIn(PlayerPedId(), false)
})
Description: Saves the vehicleβs current state in the database.
Arguments:
garage
(string) β The ID of the garage where the vehicle is stored.type
(string) β The type of vehicle (e.g.,'car'
,'boat'
,'air'
).distance
(number) β The distance required for the player to store the vehicle.veh
(entity) β The vehicle entity being stored.
Open Garage
exports.bhd_garage:OpenGarage({
type = 'car',
garage = "Garage name",
spawnpos = {vec4(0.0,0.0,0.0,0.0), vec4(1.0,1.0,1.0,1.0)},
impound = 'Impound - City',
SetInToVeh = true,
})
Description: Opens the garage menu for the player and allows interaction with vehicles.
Arguments:
type
(string) β The type of vehicle (e.g.,'car'
,'boat'
,'air'
).garage
(string) β The name of the garage.spawnpos
(table) β A table containing the spawn position (vec4(x, y, z, heading)
).impound
(string) β The name of the impound lot used when retrieving impounded vehicles.SetInToVeh
(boolean) β Iftrue
, places the player into the vehicle upon retrieval.shareGarage
(boolean) β Allows sharing of the garage with others.
Impound Vehicle
exports.bhd_garage:ImpoundVehicle(entity)
Description: Sends the player's vehicle to the impound lot.
Arguments:
entity
(entity) β The vehicle entity.
Get Mileage
exports.bhd_garage:GetMileage(plate)
Description: Retrieves the mileage of a vehicle.
Arguments:
plate
(string) β The license plate of the vehicle.
Returns: Number representing the vehicle's mileage.
Last updated