Interact

Library
Updated a month ago · v1.3.7
i

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

code
[object Object]
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)
}
Was this page helpful?
This page was last updated on 12 March 2026
DIRKSCRIPTS
All you need for your FiveM server.10% off your first order

Unsubscribe any time.

Copyright © 2026 DirkScripts. Not affiliated with or endorsed by Rockstar North or Take-Two Interactive.