client
Functions
addGlobalPlayer

addGlobalPlayer

Adds interaction options globally for all players.

Parameters

  • options (Option | Option[]): Single option or array of options

Example

-- Using interact namespace
interact.addGlobalPlayer({
    label = "Trade",
    name = 'player_trade',
    icon = "exchange",
    onSelect = function(data) print("Trading with player") end
})
 
-- Using export
exports.sleepless_interact:addGlobalPlayer({
    label = "Trade",
    name = 'player_trade',
    icon = "exchange",
    onSelect = function(data) print("Trading with player") end
})