DirkScripts Logo

Login With FiveM

Login

📚 Dirk Lib
â€ē
Modules
â€ē

interact

Interact

â„šī¸ Client Module - This can only be used on the client

lib.interact.register

Create a new player interaction

lua
lib.interact.register(name, data)
Parameter TypeRequiredDescription
nameStringtrueUnique reference for the interaction
dataObjecttrueOptions for the interact, refer to Data Structure

lib.interact.get

Get information regarding an interaction

local interaction = lib.interact.get(name)
Parameter TypeRequiredDescription
nameStringtrueUnique reference for the interaction

lib.interact.destroy

Completely remove an interaction by name

lua
lib.interact.destroy(name)
ParameterTypeRequiredDescription
namestringyesUnique reference for the interaction

lib.interact.entity

Add an interaction to a specific entity

lua
lib.interact.entity(entity, data)
ParameterTypeRequiredDescription
entitynumberyesEntity handle
datatableyesInteraction options

lib.interact.addModels

Add interactions to one or more models globally

lua
lib.interact.addModels(data)

lib.interact.addGlobalVehicle

Add interactions to all vehicles

lua
lib.interact.addGlobalVehicle(data)

lib.interact.addCoords

Add an interaction at specific world coordinates

lua
lib.interact.addCoords(data)

lib.interact.addGlobalPlayer

Add interactions to all players

lua
lib.interact.addGlobalPlayer(data)

lib.interact.addGlobalPed

Add interactions to all peds

lua
lib.interact.addGlobalPed(data)

lib.interact.removeById

Remove an interaction by its ID

lua
lib.interact.removeById(id)

lib.interact.removeEntity

Remove all interactions from an entity

lua
lib.interact.removeEntity(entity)

lib.interact.removeGlobalModel

Remove global model interactions

lua
lib.interact.removeGlobalModel(model)

lib.interact.removeGlobalPlayer

Remove global player interactions

lua
lib.interact.removeGlobalPlayer(id)

Data Structure

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

There are multiple different interactions seen below:

Circle

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

Poly

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

Box

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

Marker

lua
{
    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

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

Copyright Š 2026 DirkScripts.

Not affiliated with or endorsed by Rockstar North, Take-Two Interactive, or any other rights holders. FiveM is a copyright and registered trademark of Take-Two Interactive Software, Inc.
Our checkout system is provided by Tebex Limited, who manage payment processing, product delivery, and billing support. Prices shown in currencies other than GBP are approximate conversions updated daily. All purchases are processed in GBP, so the final amount charged may vary depending on your bank or payment provider’s exchange rate.