Functions

Here you will find functions and example code on how to use our Interactions.

Local Entity

The Interactions can only be invoked on the Client-Side!

Adding Local Entity

exports["is_interaction"]:addInteractionLocalEntity(name, entity, data)
  • name: string

  • entity: object

  • data: table

    • hideSquare: boolean or nil

    • checkVisibility: boolean or nil

    • showInVehicle: boolean or nil

    • distance: number or nil

    • distanceText: number or nil

    • offset: table or nil

      • text: table

        • x: number

        • y: number

        • z: number

      • target: table

        • x: number

        • y: number

        • z: number

    • bone: number or string or nil

    • options: table

      • option: indexed table

        • name: string or nil

        • label: string or nil

        • icon: string or nil

        • key: string or nil

        • duration: number or nil

        • onSelect: function or nil

Example Usage

Removing Local Entity

  • entity: object

  • name: string or nil

  • option: name or nil

Example Usage

Hiding/Showing Local Entity

  • entity: object

  • name: string or nil

Example Usage

Model

The Interactions can only be invoked on the Client-Side!

Adding Model

  • name: string

  • model: hash

  • data: table

    • hideSquare: boolean or nil

    • checkVisibility: boolean or nil

    • showInVehicle: boolean or nil

    • distance: number or nil

    • distanceText: number or nil

    • offset: table or nil

      • text: table

        • x: number

        • y: number

        • z: number

      • target: table

        • x: number

        • y: number

        • z: number

    • bone: number or string or nil

    • options: table

      • option: indexed table

        • name: string or nil

        • label: string or nil

        • icon: string or nil

        • key: string or nil

        • duration: number or nil

        • onSelect: function or nil

Example Usage

Removing Model

  • model: hash

  • name: string or nil

  • option: name or nil

Example Usage

Hiding/Showing Model

  • model: hash

  • name: string or nil

Example Usage

Global Entities

The Interactions can only be invoked on the Client-Side!

Adding Global Entities

  • name: string

  • select: "vehicle" or "ped" or "player"

  • data: table

    • hideSquare: boolean or nil

    • checkVisibility: boolean or nil

    • showInVehicle: boolean or nil

    • distance: number or nil

    • distanceText: number or nil

    • offset: table or nil

      • text: table

        • x: number

        • y: number

        • z: number

      • target: table

        • x: number

        • y: number

        • z: number

    • bone: number or string or nil

    • ignoreModel: indexed table

      • model: hash

    • options: table

      • option: indexed table

        • name: string or nil

        • label: string or nil

        • icon: string or nil

        • key: string or nil

        • duration: number or nil

        • onSelect: function or nil

Example Usage

Removing Global Entities

  • select: "vehicle" or "ped" or "player"

  • name: string or nil

  • option: name or nil

Example Usage

Hiding/Showing Global Entities

  • select: "vehicle" or "ped" or "player"

  • name: string or nil

Example Usage

Coordinates

The Interactions can only be invoked on the Client-Side!

Adding Coordinates

  • name: string

  • coords: vector3

  • data: table

    • hideSquare: boolean or nil

    • checkVisibility: boolean or nil

    • showInVehicle: boolean or nil

    • distance: number or nil

    • distanceText: number or nil

    • offset: table or nil

      • text: table

        • x: number

        • y: number

        • z: number

      • target: table

        • x: number

        • y: number

        • z: number

    • options: table

      • option: indexed table

        • name: string or nil

        • label: string or nil

        • icon: string or nil

        • key: string or nil

        • duration: number or nil

        • onSelect: function or nil

Example Usage

Removing Coordinates

  • coords: vector3

  • name: string or nil

  • option: name or nil

Example Usage

Hiding/Showing Coordinates

  • coords: vector3

  • name: string or nil

Example Usage

Misc

The Interactions can only be invoked on the Client-Side!

Removing Interactions Created By Resource

  • resource: string or nil

Example Usage

Last updated