Exports
Exports - Client
addPoint
- Creates a static 3D interactable prompt.
exports.lunar_bridge:addPoint({
coords = coords, -- vector3
distance = 1.0, -- the distance at which the becomes interactable
options = {
{
label = 'Open door',
icon = 'door-open',
onSelect = function(data)
print('opened door')
print('args: ' .. data)
end,
args = 6 -- you can define extra args
},
{
label = 'Go into garage',
icon = 'warehouse',
onSelect = function()
print('went into garage')
end,
canInteract = function()
return true -- You can add your own condition here
end
},
}
})
addLocalEntity
- Attaches a 3D interactable prompt to a local entity.
exports.lunar_bridge:addLocalEntity({
entity = entity, -- number
distance = 1.0, -- the distance at which the becomes interactable
offset = vector3(0.0, 0.0, 0.0),
options = {
{
label = 'Open door',
icon = 'door-open',
onSelect = function(data)
print('opened door')
print('args: ' .. data)
end,
args = 6 -- you can define extra args
},
{
label = 'Go into garage',
icon = 'warehouse',
onSelect = function()
print('went into garage')
end,
canInteract = function()
return true -- You can add your own condition here
end
},
}
})
Last updated