> For the complete documentation index, see [llms.txt](https://fivecore.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fivecore.gitbook.io/home/resources/npc-dialogs/extras.md).

# Extras

Extra and useful things that may be needed by you

## Exports

{% hint style="info" %}
Only works with client-side file.
{% endhint %}

```lua
exports['npc_dialog']:addPed({
    -- ADD NPC DATA HERE
})
```

## Events

```lua
-- Called when the player presses to interact with the npc.
AddEventHandler('npcdialog:client:startedInteraction', function(ped)
    print('Interaction started with ' .. ped.name)
end)

-- Called when the player leaves the interaction with the npc
AddEventHandler('npcdialog:client:endedInteraction', function(ped)
    print('Interaction ended with ' .. ped.name)
end)

-- Called when the player enters the range defined with interactDistance
AddEventHandler('npcdialog:client:enteredPedRange', function (ped)
    print('Entered ' .. ped.name .. ' range')
end)

-- Called when the player leaves the range defined with interactDistance
AddEventHandler('npcdialog:client:leftPedRange', function (ped)
    print('Left from ' .. ped.name .. ' range')
end)
```
