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) – If true, 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