client
Functions
addModel

addModel

Adds interaction options for specific entity models.

Parameters

  • arr (number | string | (number | string)[]): Model hash/name or array of models
  • options (Option | Option[]): Single option or array of options

Example

-- Using interact namespace
interact.addModel("prop_boxpile_01a", {
    label = "Interact with Box",
    name = 'box_interact',
    onSelect = function(data) print("Box interaction") end
})
 
-- Using export
exports.sleepless_interact:addModel("prop_boxpile_01a", {
    label = "Interact with Box",
    name = 'box_interact',
    onSelect = function(data) print("Box interaction") end
})