Client

addEntity

Usage

bridge.target.addEntity(entity, data)
  • entity: number

  • data: object

    • hideSquare(optional): boolean

      • default: false

    • checkVisibility(optional): boolean

      • default: true

    • showInVehicle(optional): boolean

      • default: false

    • distance: float

    • squareDistance(optional): float

      • default: 3.0

    • offset(optional): object

      • text: object

        • x: float

          • default: 0.0

        • y: float

          • default: 0.0

        • z: float

          • default: 1.0

      • target: object

        • x: float

          • default: 0.0

        • y: float

          • default: 0.0

        • z: float

          • default: 0.0

    • options: array

      • name: string

      • label: string

      • icon: string

      • onSelect: function

      • key(optional): string

      • duration(optional): number

Example

bridge.target.addEntity(entity, {
    distance = 2.0,
    squareDistance = 5.0,
    options = {
        {
            name = "option1",
            label = "Example Option 1",
            icon = "fa-solid fa-hotdog",
            onSelect = function()
                print("Example Function")
            end
        }
    }
})
bridge.target.addEntity(entity, {
    distance = 2.0,
    squareDistance = 5.0,
    hideSquare = false,
    checkVisibility = false,
    showInVehicle = false,
    offset = {
        text = {x = 0.0, y = 0.0, z = 1.0},
        target = {x = 0.0, y = 0.0, z = 0.0},
    },
    options = {
        {
            name = "option1",
            label = "Example Option 1",
            icon = "fa-solid fa-hotdog",
            onSelect = function()
                print("Example Function")
            end
        },
        {
            name = "option2",
            label = "Example Option 2",
            icon = "fa-solid fa-hotdog",
            onSelect = function()
                print("Example Function")
            end
        }
    }
})

removeEntity

Usage

bridge.target.removeEntity(entity, option, invoker)
  • entity: number

  • option(optional): string

  • invoker(optional): string

Example

bridge.target.removeEntity(entity)
bridge.target.removeEntity(entity, "option1")

Last updated