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
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
Description: Retrieves the vehicle’s properties.
Arguments:
vehicle
(entity ID) – The vehicle entity.
Set Vehicle Properties
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
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
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
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
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
Description: Starts a lockpicking minigame for vehicle theft.
Returns: Boolean (
true
if successful,false
if failed).
Get Player Key
Description: Checks if the player has the key for a nearby vehicle.
Is Cop
Description: Checks if the player is a law enforcement officer.
Returns: Boolean (
true
if player is a cop, otherwisefalse
).
🚓 Dispatch & Alerts
Dispatch
Description: Sends a dispatch alert related to a vehicle event.
Arguments:
vehicle
(entity ID) – The vehicle triggering the dispatch.
Last updated