Fivecore
  • Fivecore - FiveM Scripts
  • Discord
  • General
    • Common issues
  • RESOURCES
    • Zombies
      • Installation
      • Usage
      • Functions
        • Server Functions
      • Events
        • Server Events
    • Looting
      • Installation
      • Setup
      • Events
        • Server Events
      • Functions
        • Client Functions
        • Server Functions
      • Loot editor
    • NPC Dialogs
      • Installation
      • Usage
      • Extras
    • Dynamic Guides
      • Installation
      • Usage
    • Interact
      • Installation
      • Usage
      • InteractOptions
      • Functions
        • Client
Powered by GitBook
On this page
  • Exports
  • Events
  1. RESOURCES
  2. NPC Dialogs

Extras

Extra and useful things that may be needed by you

Exports

Only works with client-side file.

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

Events

-- 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)
PreviousUsageNextDynamic Guides

Last updated 1 year ago