Skip to content

Housing Integration for Developers

This page explains how housing developers can make their property garages work with cd_garage.

There are two ways to integrate a housing garage.

Method 1: Housing Script Handles the Interaction

Use this method if your housing script already has its own garage interaction points.

With this method, the housing script handles the interaction, but cd_garage still handles the garage data, vehicle list, vehicle spawning, and vehicle storing.

How it works

  • The player uses the garage interaction from the housing script.
  • The housing script triggers the cd_garage open property garage event.
  • cd_garage checks if there is already a property garage near the player.
  • If a property garage exists, it opens that garage.
  • If no property garage exists, cd_garage creates one using the player’s current location.
  • When storing a vehicle, the housing script triggers the store vehicle event.
  • cd_garage stores the vehicle into the nearby property garage.

Recommended

  • When opening the garage, send the vehicle spawn coords in the first event argument.
  • This allows cd_garage to use the correct vehicle spawn location.
  • If no spawn coords are sent, the player’s current coords and heading will be used.

👉 View Open Property Garage Event →

👉 View Store Vehicle in Property Garage Event →

Method 2: cd_garage Handles the Garage

Use this method if you want cd_garage to fully handle the property garage.

With this method, the housing script only needs to create the garage when a player purchases or creates a property.

How it works

  • A player purchases or creates a property.
  • The housing script triggers the create property garage event.
  • The property garage is saved to the cd_garage database.
  • cd_garage handles the interaction point, garage UI, vehicle spawning, and vehicle storing.
  • The garage can also be managed through the cd_garage system.

This is the recommended method for new integrations.

👉 View Create Property Garage Event →

Hello!