removeGlobalPlayerById
Removes global player interactions associated with an id
Parameters
id
(number | string
): The unique identifier of the interaction you wish to remove. This ID is returned by the function used to add the interaction initially.
Example
local interactionId = interact.addGlobalPlayer({
id = "uniqueNetworkedEntityId",
options = {
{
label = "Networked Interact Option",
icon = "hand", -- Example simple FA icon name
groups = {['police'] = 1},
items = {['money'] = 100},
onSelect =function(data) print("Global Player action triggered") end,
canInteract = function(entity, distance, coords, id)
return true
end
}
},
renderDistance = 10.0,
activeDistance = 2.0,
cooldown = 1500
})
interact.removeGlobalPlayer(interactionId)
export
exports.sleepless_interact:removeGlobalPlayer(interactionId)