![Advanced NPC Dialogs [Standalone] [PAID] main image](https://forum-cfx-re.akamaized.net/optimized/4X/9/f/8/9f824ad24cf7a0c7fb3f6d8cbeacb1ffcd5dea80_2_690x388.jpeg)
Price
$10.00A script by fivecore
Price
$10.00This script is a powerful tool that allows to create dynamic and engaging conversations between players and NPCs. With this script, you can easily design interactive dialogue with customizable buttons and multiple options.
Video Showcase: [Standalone] Advanced NPC Dialogs | FiveM Script
Documentation: NPC Dialog Docs
Config = {} -- <- Don't touch this
Config.Key = 38 -- (E) Key to interact with the ped. You can see all the keys here: https://docs.fivem.net/docs/game-references/controls/
Config.MinusOneZ = true -- Create peds with -1 Z axis
Config.ShowName = false -- Show the ped's name above his head
Config.ShowCircle = false -- Show a circle around the ped
Config.ShowInteractUI = true -- Show the UI to interact when you are close to the ped
Config.CreateVector4Command = true -- Create command /vector4 to copy your actual position in vector4 to clipboard
Config.AlertAvailableUpdate = true -- Show an alert in console if a new version of npc dialog is available
Config.Default = { -- Default values to use if not defined in the ped
model = 'ig_lestercrest',
interactDistance = 2.0,
name = 'John',
title = 'Hello!',
description = 'Welcome, what do you want?',
}
Config.NPCs = {
--[[ This is the template to create new NPCs, check all options available here: https://fivecore.gitbook.io/home/scripts/npc-dialog/usage
[''] = {
name = '',
title = '',
description = '',
model = '',
coords = vector4(0.0, 0.0, 0.0),
buttons = {
{
text = '',
event = '',
type = '',
},
{
text = 'Goodbye!',
}
}
},
--]]
-- example NPC with all available options
['lester-ls'] = { -- unique name
name = 'Lester', -- ped name
title = 'Hey!', -- interface title
description = 'I need a service, are you available?', -- interface description
model = 'ig_lestercrest', -- ped model ( optional, You can see all of the here: https://docs.fivem.net/docs/game-references/ped-models/
coords = vector4(440.99, -982.74, 30.69, 204.69), -- ped coords ( required )
interactDistance = 2.0, -- the max distance to interact with ped ( optional, if not defined will use the default )
blip = { -- create a blip for the ped ( optional )
name = "Lester Missions", -- blip name to show on map
sprite = 458, -- blip icon, you can see all of them here: https://docs.fivem.net/docs/game-references/blips/
color = 44, -- blip color, you can see the colors in the same website of sprites.
},
-- anim = { -- You can use anim or scenario, not both ( optional )
-- dict = 'amb@world_human_bum_slumped@male@laying_on_right_side@idle_b', -- anim dict
-- name = 'idle_d', -- anim name
-- flag = 46 -- anim flag
-- },
-- scenario = 'WORLD_HUMAN_GUARD_STAND_FACILITY', -- You can use anim or scenario, not both ( optional )
buttons = {
{
text = 'I love misterous things, I will do it!', -- ( required )
event = 'example:server:acceptMission', -- event name if you want to trigger a event ( optional )
type = 'server', -- client, server or command ( optional )
args = {'lester-ls'}, -- event args if needed
confirm = 'Are you sure? You need to pay $10,000 for this!', -- shows a confirm dialog after click ( optional )
},
{
text = 'It is not dangerous?', -- text of the button ( required )
action = function () -- this is a function, you can do anything here ( client side )
print('You clicked on the button')
end,
canInteract = function() -- with this function you can check if the button will appear or not by returning true or false
-- You can check if the player has a weapon for example
return true
end
},
{
text = 'What do you need?', -- text of the button ( required )
open = { -- create a secondary dialogue ( optional )
title = 'Its a secret!', -- new interface title
description = 'You will receive a good amount of money for this!', -- new interface description
buttons = {
{
text = 'I will do it!', -- text of the button ( required )
event = 'questsmenu lester', -- event name if you want to trigger a event or a command ( optional )
type = 'command', -- client, server or command ( optional )
},
{
text = 'Let me think about it...', -- text of the button ( required )
open = 'back' -- back to main interface
}
}
}
},
{
text = 'Goodbye!', -- do nothing, only for close interaction
}
}
},
}
Buy now at Fivecore Tebex Store for $10,00
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | 800 |
Requirements | N/A |
Support | Yes |
No approved reviews found for this script yet.