Skip to main content

Garage

Examples


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
}
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}
OnEnter

If defined, it will be executed when the player enters the garage zone.

Parameters

  • address: string
  • spawnPoint: {coords: vector3, h: number}
OnExit

If defined, it will be executed when the player exits the garage zone.

Parameters

  • address: string
  • spawnPoint: {coords: vector3, h: number}