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, otherwisefalse
).
π 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