Furniture Interactions

From this section you can add interactions to furnitures.

In order to use furniture interactions you need to configure interact.

You can add interactions based on furniture models or tags.

Types


Interaction

Field
Type
Description
Required

id

string

Unique id for the interaction

label

string

Interaction label to show

onInteract

function

Function to execute on interact

tags

string[]

Furniture tags

models

number[]

Furniture models

icon

string

Font Awesome icon

accessRequired

boolean

Controls whether the player has access to the house for interact. Default: true

Examples


Config.FurnitureInteractions = {
    {
        id = "stash",
        tags = {"stash"},
        label = "Stash",
        icon = "box",
        onInteract = function(entity, furnitureId, houseId)
            local stash = "housing:furniture:stash:" .. houseId .. ":" .. furnitureId
            -- OPEN STASH
            TriggerEvent("inventory:open", stash)
        end
    },
    {
        id = "clothing",
        tags = {"clothing"},
        label = "Clothes",
        icon = "shirt",
        accessRequired = false,
        onInteract = function(entity, furnitureId, houseId)
            TriggerEvent("clothing:open")
        end
    }
 }

Last updated