Skip to main content

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
}
If defined, it will be executed when the player enters the garage zone and press E.

Parameters

  • address: string
  • spawnPoint: {coords: vector3, h: number}
If defined, it will be executed when the player enters the garage zone.

Parameters

  • address: string
  • spawnPoint: {coords: vector3, h: number}
If defined, it will be executed when the player exits the garage zone.

Parameters

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