Park Vehicle
parkVehicleByGarageId
parkVehicleByGarageIdDescription:
Parks the currently occupied vehicle into a garage programmatically using its garageId. Useful for scripts or events that need to store vehicles automatically.
Usage:
exports['kartik-garages']:parkVehicleByGarageId(garageId)Parameters:
Parameter
Type
Description
garageId
string
The unique identifier of the garage where the vehicle should be parked.
Return Value:
- None. 
- The vehicle will be marked as stored in the garage and saved to the database. 
Notes:
- The player must be inside the vehicle they want to park. 
- Ensure the - garageIdexists and the player has access to it.
- Useful for automated scripts, job integrations, or custom garage interactions. 
Example:
local garageId = "pdm_main"
exports['kartik-garages']:parkVehicleByGarageId(garageId)
print("Vehicle parked in garage: " .. garageId)Last updated