inside-scripts
Store
  • INFORMATION
    • inside-scripts
  • PAID SCRIPTS
    • 🔑 Vehicle Keys
      • Functions
      • Config
    • 🚗 Garage
      • Functions
      • Script Functionality Overview
      • Config
    • 🥦 Weed Laboratory
      • Config
    • 💊 Sell Drugs
      • Script Functionality Overview
      • Config
    • 🗯️ Dialog V1
      • Functions
      • Config
    • 🗯️ Dialog V2
      • Functions
      • Config
    • 📰 Interaction
      • Functions
      • Config
    • 🪧Notifications and Progress
      • Functions
      • Config
    • 🪛 Lock Picking
      • Config
  • FREE SCRIPTS
    • 🖥️ Bridge & Library
      • Compatibility
      • Usage & Installation
      • Functions
        • Bridge
          • Framework
            • Client
            • Server
          • Inventory
            • Server
          • Fuel
            • Client
          • Keys
            • Client
            • Server
          • Notification
            • Client
            • Server
          • Progress Bar
            • Client
          • Target
            • Client
        • Library
          • Callback
            • Client
            • Server
          • Entity
            • Client
            • Server
          • Blip
            • Client
          • Identifier
            • Server
          • Timezone
            • Server
          • Webhook
            • Server
          • Utility
            • Shared
Powered by GitBook
On this page
  • Local Entity
  • Adding Local Entity
  • Removing Local Entity
  • Hiding/Showing Local Entity
  • Model
  • Adding Model
  • Removing Model
  • Hiding/Showing Model
  • Global Entities
  • Adding Global Entities
  • Removing Global Entities
  • Hiding/Showing Global Entities
  • Coordinates
  • Adding Coordinates
  • Removing Coordinates
  • Hiding/Showing Coordinates
  • Misc
  • Removing Interactions Created By Resource
  1. PAID SCRIPTS
  2. 📰 Interaction

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)
exports["is_interaction"]:addTextLocalEntity(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

-- Example 1: Using Interaction

exports["is_interaction"]:addInteractionLocalEntity("testInteraction", entity, {
    hideSquare = false,
    checkVisibility = true,
    showInVehicle = false,
    distance = 5.0,
    distanceText = 1.0,
    offset = {
        text = {x = 0.0, y = 0.0, z = 1.0},
        target = {x = 0.0, y = 0.0, z = 0.0}
    },
    bone = nil,
    options = {
        {
            name = "option1",
            label = "Example Text",
            icon = nil,
            key = "E",
            duration = 500,
            onSelect = function()
                print("option1 working")
            end
        },
    }
})

-- Example 2: Using Text

exports["is_interaction"]:addTextLocalEntity("testText", entity, {
    hideSquare = false,
    checkVisibility = true,
    showInVehicle = false,
    distance = 5.0,
    distanceText = 1.0,
    offset = {
        text = {x = 0.0, y = 0.0, z = 1.0},
        target = {x = 0.0, y = 0.0, z = 0.0}
    },
    bone = nil,
    options = {
        {
            name = "option1",
            label = "Example Text",
            icon = nil,
        },
    }
})

Removing Local Entity

exports["is_interaction"]:removeLocalEntity(entity, name, option)
  • entity: object

  • name: string or nil

  • option: name or nil

Example Usage

-- Example 1: Removing All Interactions

exports["is_interaction"]:removeLocalEntity(entity)

-- Example 2: Removing provided Interaction

exports["is_interaction"]:removeLocalEntity(entity, "testText")

-- Example 3: Removing provided Interaction Option

exports["is_interaction"]:removeLocalEntity(entity, "testText", "option1")

Hiding/Showing Local Entity

exports["is_interaction"]:hideLocalEntity(entity, name)
exports["is_interaction"]:showLocalEntity(entity, name)
  • entity: object

  • name: string or nil

Example Usage

-- Example 1: Hiding All Interactions for specified Local Entity

exports["is_interaction"]:hideLocalEntity(entity)

-- Example 2: Hiding Interaction for specified Local Entity

exports["is_interaction"]:hideLocalEntity(entity, "testText")

-- Example 3: Showing All Interactions for specified Local Entity

exports["is_interaction"]:showLocalEntity(entity)

-- Example 4: Showing Interaction for specified Local Entity

exports["is_interaction"]:showLocalEntity(entity, "testText")

Model

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

Adding Model

exports["is_interaction"]:addInteractionModel(name, model, data)
exports["is_interaction"]:addTextModel(name, model, data)
  • 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

-- Example 1: Using Interaction

exports["is_interaction"]:addInteractionModel("testInteraction", model, {
    hideSquare = false,
    checkVisibility = true,
    showInVehicle = false,
    distance = 5.0,
    distanceText = 1.0,
    offset = {
        text = {x = 0.0, y = 0.0, z = 1.0},
        target = {x = 0.0, y = 0.0, z = 0.0}
    },
    bone = nil,
    options = {
        {
            name = "option1",
            label = "Example Text",
            icon = nil,
            key = "E",
            duration = 500,
            onSelect = function(entity)
                print("found "..entity)
            end
        },
    }
})

-- Example 2: Using Text

exports["is_interaction"]:addTextModel("testText", model, {
    hideSquare = false,
    checkVisibility = true,
    showInVehicle = false,
    distance = 5.0,
    distanceText = 1.0,
    offset = {
        text = {x = 0.0, y = 0.0, z = 1.0},
        target = {x = 0.0, y = 0.0, z = 0.0}
    },
    bone = nil,
    options = {
        {
            name = "option1",
            label = "Example Text",
            icon = nil,
        },
    }
})

Removing Model

exports["is_interaction"]:removeModel(model, name, option)
  • model: hash

  • name: string or nil

  • option: name or nil

Example Usage

-- Example 1: Removing All Interactions

exports["is_interaction"]:removeModel(model)

-- Example 2: Removing provided Interaction

exports["is_interaction"]:removeModel(model, "testText")

-- Example 3: Removing provided Interaction Option

exports["is_interaction"]:removeModel(model, "testText", "option1")

Hiding/Showing Model

exports["is_interaction"]:hideModel(model, name)
exports["is_interaction"]:showModel(model, name)
  • model: hash

  • name: string or nil

Example Usage

-- Example 1: Hiding All Interactions for specified Model

exports["is_interaction"]:hideModel(model)

-- Example 2: Hiding Interaction for specified Model

exports["is_interaction"]:hideModel(model, "testText")

-- Example 3: Showing All Interactions for specified Model

exports["is_interaction"]:showModel(model)

-- Example 4: Showing Interaction for specified Model

exports["is_interaction"]:showModel(model, "testText")

Global Entities

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

Adding Global Entities

exports["is_interaction"]:addInteractionGlobal(name, select, data)
exports["is_interaction"]:addTextGlobal(name, select, data)
  • 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

-- Example 1: Using Interaction

exports["is_interaction"]:addInteractionGlobal("testInteraction", "vehicle", {
    hideSquare = false,
    checkVisibility = true,
    showInVehicle = false,
    distance = 5.0,
    distanceText = 1.0,
    offset = {
        text = {x = 0.0, y = 0.0, z = 1.0},
        target = {x = 0.0, y = 0.0, z = 0.0}
    },
    bone = nil,
    ignoreModel = {-295689028},
    options = {
        {
            name = "option1",
            label = "Example Text",
            icon = nil,
            key = "E",
            duration = 500,
            onSelect = function(entity)
                print("found "..entity)
            end
        },
    }
})

-- Example 2: Using Text

exports["is_interaction"]:addTextGlobal("testText", "vehicle", {
    hideSquare = false,
    checkVisibility = true,
    showInVehicle = false,
    distance = 5.0,
    distanceText = 1.0,
    offset = {
        text = {x = 0.0, y = 0.0, z = 1.0},
        target = {x = 0.0, y = 0.0, z = 0.0}
    },
    bone = nil,
    ignoreModel = {-295689028},
    options = {
        {
            name = "option1",
            label = "Example Text",
            icon = nil,
        },
    }
})

Removing Global Entities

exports["is_interaction"]:removeGlobal(select, name, option)
  • select: "vehicle" or "ped" or "player"

  • name: string or nil

  • option: name or nil

Example Usage

-- Example 1: Removing All Interactions

exports["is_interaction"]:removeGlobal(select)

-- Example 2: Removing provided Interaction

exports["is_interaction"]:removeGlobal(select, "testText")

-- Example 3: Removing provided Interaction Option

exports["is_interaction"]:removeGlobal(select, "testText", "option1")

Hiding/Showing Global Entities

exports["is_interaction"]:hideGlobal(select, name)
exports["is_interaction"]:showGlobal(select, name)
  • select: "vehicle" or "ped" or "player"

  • name: string or nil

Example Usage

-- Example 1: Hiding All Interactions for specified Global Entities

exports["is_interaction"]:hideGlobal(select)

-- Example 2: Hiding Interaction for specified Global Entities

exports["is_interaction"]:hideGlobal(select, "testText")

-- Example 3: Showing All Interactions for specified Global Entities

exports["is_interaction"]:showGlobal(select)

-- Example 4: Showing Interaction for specified Global Entities

exports["is_interaction"]:showGlobal(select, "testText")

Coordinates

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

Adding Coordinates

exports["is_interaction"]:addInteractionCoords(name, coords, data)
exports["is_interaction"]:addTextCoords(name, coords, data)
  • 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

-- Example 1: Using Interaction

exports["is_interaction"]:addInteractionCoords("testInteraction", coords, {
    hideSquare = false,
    checkVisibility = true,
    showInVehicle = false,
    distance = 5.0,
    distanceText = 1.0,
    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 Text",
            icon = nil,
            key = "E",
            duration = 500,
            onSelect = function()
                print("option1 working")
            end
        },
    }
})

-- Example 2: Using Text

exports["is_interaction"]:addTextCoords("testText", coords, {
    hideSquare = false,
    checkVisibility = true,
    showInVehicle = false,
    distance = 5.0,
    distanceText = 1.0,
    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 Text",
            icon = nil,
        },
    }
})

Removing Coordinates

exports["is_interaction"]:removeCoords(coords, name, option)
  • coords: vector3

  • name: string or nil

  • option: name or nil

Example Usage

-- Example 1: Removing All Interactions

exports["is_interaction"]:removeCoords(coords)

-- Example 2: Removing provided Interaction

exports["is_interaction"]:removeCoords(coords, "testText")

-- Example 3: Removing provided Interaction Option

exports["is_interaction"]:removeCoords(coords, "testText", "option1")

Hiding/Showing Coordinates

exports["is_interaction"]:hideCoords(coords, name)
exports["is_interaction"]:showCoords(coords, name)
  • coords: vector3

  • name: string or nil

Example Usage

-- Example 1: Hiding All Interactions at specified Coordinates

exports["is_interaction"]:hideCoords(coords)

-- Example 2: Hiding Interaction at specified Coordinates

exports["is_interaction"]:hideCoords(coords, "testText")

-- Example 3: Showing All Interactions at specified Coordinates

exports["is_interaction"]:showCoords(coords)

-- Example 4: Showing Interaction at specified Coordinates

exports["is_interaction"]:showCoords(coords, "testText")

Misc

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

Removing Interactions Created By Resource

exports["is_interaction"]:removeResource(resource)
  • resource: string or nil

Example Usage

-- Example 1: Removing Interactions in specified resource

exports["is_interaction"]:removeResource("qb-shops")

-- Example 2: Removing Interactions in current resource

exports["is_interaction"]:removeResource()

Last updated 9 months ago