Lib.addInteractionEntity

It is used to add interactions to a given entity

Lib.addInteractionEntity(entity, {
    distance = 2.0,
    options = {
        {
            name = "",
            icon = '',
            label = "",
            onSelect = function()
            end
        }
    }
})
  • entity: number

  • data: table

    • distance: number

    • squareDistance: number or nil (optional for is_interaction)

    • hideSquare: boolean or nil (optional for is_interaction)

    • checkVisibility: boolean or nil (optional for is_interaction)

    • showInVehicle: boolean or nil (optional for is_interaction)

    • offset: table or nil (optional for is_interaction)

      • text: table

      • target: table

    • options: table

      • option: indexed table

        • name: string

        • icon: string

        • label: string

        • key: string or nil (optional for is_interaction)

        • duration: number or nil (optional for is_interaction)

        • onSelect: function

Last updated