DirkScripts Documentation
  • 👋Welcome
  • The Basics
    • ⬇️Installing Resources
  • Resources
    • 📚Dirk Lib
      • Getting Started
      • Cache
      • Modules
        • Await
        • Blip
        • Callback
        • Camera
        • File
        • Interact
        • Objects
        • Player
          • Client
          • Server
        • Groups
          • Client
          • Server
        • Print
        • Request
        • Table
        • Target
        • Zones
        • UI
          • Context
          • Untitled
    • 🔧Project Cars
      • Installation
      • Tools
      • Parts
      • Commands
    • 🤼Multicharacter
      • Installation
      • Configuration
      • Exports
      • F.A.Q
      • Commands
    • 💊Drug Labs v2
      • Installation
      • Tebex Integration
      • Creating Labs
  • 🛒Store
  • 🗣️Discord
  • 🖥️GitHub
Powered by GitBook
On this page
  • lib.interact.register
  • lib.interact.get
  • lib.interact.destroy
  • Data Structure
  • Circle
  • Poly
  • Box
  • Marker
  • Text
Export as PDF
  1. Resources
  2. Dirk Lib
  3. Modules

Interact

Used to register and control any player interaction

Client Module - This can only be used on the client

lib.interact.register

Create a new player interaction

lib.interact.register(name, data)
Parameter
Type
Required
Description

name

String

Unique reference for the interaction

data

Object

lib.interact.get

Get information regarding an interaction

local interaction = lib.interact.get(name)
Parameter
Type
Required
Description

name

String

Unique reference for the interaction

lib.interact.destroy

Completely remove an interaction

lib.interact.destroy(name)
Parameter
Type
Required
Description

name

String

Unique reference for the interaction

Data Structure

This is the data structure of an interaction and the valid options

There are multiple different interactions seen below:

Circle

{
    zone_type = "circle",
    pos = vector4(10, 10, 20, 10),
    radius = 10
}

Poly

{
    zone_type = "poly",
    polygon = {
        vector3(0, 0, 0),
        vector3(0, 0, 0),
        vector3(0, 0, 0),
    },
}

Box

{
    zone_type = "box",
    pos = vector4(10, 10, 20, 10),
    size = vector3(1, 1, 1)
}

Marker

{
    zone_type = "marker",
    pos = vector4(10, 10, 20, 10),
    color = vector4(255, 255, 255, 255),            -- RGBA
    scale = vector3(1, 1, 1),
    -- Not Required
    dir = vector3(0, 0, 0),
    rot = vector3(0, 0, 0),
    bob = false,
    face = false,
    txd = false,
    txn = false,
    drawEnts = false
}

Text

This documentation is pending confirmation

{
    zone_type = "text",
    text = "Hello World"
    pos = vector4(10, 10, 20, 10),
    size = vector3(1, 1, 1)
}
PreviousFileNextObjects

Last updated 10 months ago

Options for the interact, refer to

📚
Data Structure