Client

This page describes all the functions available in editable/client.lua for BHD Garage. These functions handle vehicle properties, notifications, key interactions, and more.

πŸ“’ Notifications

Notify

Notify(msg, type, time, title)
  • Description: Displays a notification to the player.

  • Arguments:

    • msg (string) – The message to display.

    • type (string, optional) – The type of notification (default: info).

    • time (number, optional) – Duration in milliseconds (default: 5000ms).

    • title (string, optional) – The title of the notification.


πŸš— Vehicle Properties & Management

Get Vehicle Properties

GetVehicleProperties(vehicle)
  • Description: Retrieves the vehicle’s properties.

  • Arguments:

    • vehicle (entity ID) – The vehicle entity.

Set Vehicle Properties

SetVehicleProperties(vehicle, props, vinNumber, plate, fakePlate)
  • Description: Applies stored properties to a vehicle.

  • Arguments:

    • vehicle (entity ID) – The vehicle entity.

    • props (table) – The properties to apply.

    • vinNumber (string) – The vehicle’s VIN number.

    • plate (string) – The vehicle’s plate number.

    • fakePlate (string, optional) – Fake plate assigned to the vehicle.

Vehicle Spawned

VehicleSpawned(vehicle, plate, job, props, garage, netID)
  • Description: Called when a vehicle is spawned.

  • Arguments:

    • vehicle (entity ID) – The spawned vehicle.

    • plate (string) – The vehicle’s plate.

    • job (string or nil) – The job that has acces to the garage from witch vehicle was taken out.

    • props (json table) – The vehicle’s properties.

    • garage (string) – The garage where the vehicle was stored.

    • netID (number) – The vehicle’s network ID.

Vehicle Stored

VehicleStored(vehicle, plate, job, props, garage)
  • Description: Called when a vehicle is stored.

  • Arguments:

    • vehicle (entity ID) – The stored vehicle.

    • plate (string) – The vehicle’s plate.

    • job (string or nil) – The job associated with the vehicle.

    • props (table) – The vehicle’s properties.

    • garage (string) – The garage where the vehicle was stored.


πŸ”§ Debugging & Utilities

Debug Print

DebugPrint(file, msg)
  • Description: Prints a debug message if debug mode is enabled.

  • Arguments:

    • file (string) – The file name where the debug was triggered.

    • msg (string) – The message to display.

  • Returns: None.

Get Delivery Data

GetDeliveryData(garagePlayerIsIn, garagePlayerHasVehicleParkedIn)
  • Description: Calculates the delivery fee and time for vehicle transport.

  • Arguments:

    • garagePlayerIsIn (string) – The garage the player is currently in.

    • garagePlayerHasVehicleParkedIn (string) – The garage where the vehicle is stored.

  • Returns:

    • deliveryFee (number) – The cost to transport the vehicle.

    • deliveryTime (number) – The time in milliseconds for delivery.


πŸ”‘ Key & Security Functions

Lockpicking Minigame

LockPickingMinigame()
  • Description: Starts a lockpicking minigame for vehicle theft.

  • Returns: Boolean (true if successful, false if failed).

Get Player Key

GetPlayerKey()
  • Description: Checks if the player has the key for a nearby vehicle.

Is Cop

IsCop()
  • Description: Checks if the player is a law enforcement officer.

  • Returns: Boolean (true if player is a cop, otherwise false).


πŸš“ Dispatch & Alerts

Dispatch

Dispatch(vehicle)
  • Description: Sends a dispatch alert related to a vehicle event.

  • Arguments:

    • vehicle (entity ID) – The vehicle triggering the dispatch.

Last updated