Registering Garages
Add garages from housing or other resources
Register a garage
Call registerGarage from your resource's server code when it starts, after jg-advancedgarages:
local garageId, err = exports["jg-advancedgarages"]:registerGarage({
id = "house-42",
name = "House 42 Garage",
coords = vector3(215.9, -810.1, 30.7),
spawnPoints = {vector4(229.7, -810.0, 30.6, 157.5)},
access = false
})This allows anyone to use the garage. Set access to a list of character identifiers or a server callback for ownership and key checks. Garage access doesn't grant access to other players' vehicles.
By default, JG creates the open and store interactions. Registrations last until either resource stops and aren't saved to the database. Register them again after a restart using the same resource name and id.
Use your own prompts
Set manageInteractions = false when registering. Pass the returned garageId to your client code and call these exports from your open and park actions:
-- Open action
exports["jg-advancedgarages"]:openGarage(garageId)
-- Park action
exports["jg-advancedgarages"]:storeVehicle(garageId)See the Client API for details. Server access and location checks still apply.
Use updateGarage to change the garage or its access list. After callback-based ownership or keys change, call refreshGarageAccess to refresh the prompts. Use unregisterGarage to remove it.
Last updated 18 September 2026