client
removeGlobalPed

removeGlobalPedById

Removes global ped 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.addGlobalPed({
    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 ped action triggered") end,
            canInteract = function(entity, distance, coords, id)
                return true
            end
        }
    },
    renderDistance = 10.0,
    activeDistance = 2.0,
    cooldown = 1500
})
 
interact.removeGlobalPed(interactionId)
 

export

    exports.sleepless_interact:removeGlobalPed(interactionId)