> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nonefivem.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Garage

## Examples

***

```lua theme={null}
Config.Garage = {
    Open = function(address, spawnPoint)
        TriggerEvent("garage:open", address, spawnPoint.coords, spawnPoint.h)
    end,
    OnEnter = function(address, spawnPoint)
        TriggerEvent("garage:setCurrent", {
            name = address,
            spawnpoints = {spawnPoint}
        })
    end,
    OnExit = function(address, spawnPoint)
        TriggerEvent("garage:setCurrent", nil)
    end
}
```

<Accordion title="Open">
  If defined, it will be executed when the player enters the garage zone and press E.

  ### Parameters

  * address: string
  * spawnPoint: `{coords: vector3, h: number}`
</Accordion>

<Accordion title="OnEnter">
  If defined, it will be executed when the player enters the garage zone.

  ### Parameters

  * address: string
  * spawnPoint: `{coords: vector3, h: number}`
</Accordion>

<Accordion title="OnExit">
  If defined, it will be executed when the player exits the garage zone.

  ### Parameters

  * address: string
  * spawnPoint: `{coords: vector3, h: number}`
</Accordion>
