> For the complete documentation index, see [llms.txt](https://docs.bhdscripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bhdscripts.com/scripts/bhd-garage/developer-options/exports/server-exports.md).

# Server Exports

## Remove Friend from Garage

```lua
exports.bhd_garage:RemoveFriendFromGarage(plate, targetIdentifier)
```

* **Description:** Removes a specific friend’s access to a vehicle.
* **Arguments:**
  * `plate` *(string)* – The plate number of the vehicle.
  * `targetIdentifier` *(string)* – The identifier of the player being removed.

## Remove All Friends from Garage

```lua
exports.bhd_garage:RemoveFriendsFromGarage(plate)
```

* **Description:** Removes all friends from a specific vehicle.
* **Arguments:**
  * `plate` *(string)* – The plate number of the vehicle.

## Save All Vehicles

```lua
exports.bhd_garage:SaveAllVehicles()
```

* **Description:** Saves all currently active vehicles to the database.

## Get Vehicle Plate

```lua
exports.bhd_garage:GetVehiclePlate(vehicleID)
```

* **Description:** Retrieves the plate number of a given vehicle.
* **Arguments:**
  * `vehicleID` *(entity ID)* – The entity ID of the vehicle.
* **Returns:** String representing the vehicle's plate number or XXNOTFOUNDXX if plate was not found.

## Add VIN to Vehicle

```lua
exports.bhd_garage:AddVIN(vehiclePlate, vinNumber)
```

* **Description:** Assigns a VIN number to a vehicle.
* **Arguments:**
  * `vehiclePlate` *(string)* – The plate number of the vehicle.
  * `vinNumber` *(string)* – The new VIN to be assigned.

## Get Vehicle Data

```lua
exports.bhd_garage:GetVehicle(vehiclePlate)
```

* **Description:** Retrieves vehicle data from the database.
* **Arguments:**
  * `vehiclePlate` *(string)* – The plate number of the vehicle.
* **Returns:** Object with vehicle functions and data. You can see details about object [here](/scripts/bhd-garage/developer-options/exports/server-exports/vehicle-object.md).
