I welcome you CFX community!
Today I present to you a system of dialogues, thanks to which you can diversify the gameplay on your server! Iโm sure you and your players will love it!
This system includes a nice user interface, the ability to build dialogues with NPCs, the ability to configure interaction with NPCs only for games with a certain job, you can configure the inclusion of blips on the map, and you can also adjust the length of the options for questions and answers at will!
Demonstration of the system:
Screenshots:
Example of a configuration file:
Configuration files
-- /*
-- โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-- โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-- โโโโโโโฆโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-- โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-- โโโโโโโฆโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-- โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ*/
Config = {}
-- Are you using ESX?
Config.UseESX = true
-- Enable this if ESX throws an error: Used the getSharedObject Event, this event no longer exists!
Config.UseESX_lib = false
-- Are you using QBCore?
Config.UseQB = false
-- Are you using Standalone?
Config.UseStandalone = false
--Distance for interaction.
Config.distInteraction = 2.0
--Button for interaction.
Config.interactionButton = 38
--Text for interaction.
Config.interactionButtonText = "Press ~INPUT_CONTEXT~ to interact"
--The ability to embed your own exports to hide the hud
Config.useHudOffOnEvents = true
function hudOnEvent()
DisplayRadar(true)
--exports.Burevestnik_hud:Burevestnik_hud_on()
end
function hudOffEvent()
DisplayRadar(false)
--exports.Burevestnik_hud:Burevestnik_hud_off()
end
--It is better to leave false because if true, the player will stop disappearing for the duration of the interaction and, as a result, the menu will be displayed incorrectly.
Config.disappearingDuringInteraction = false
--This is the module responsible for the ability to play custom audio tracks. You must have purchased Sound DLC: https://burevestnik.tebex.io/package/5996112
Config.UseBurevestnikSoundDLC = false
Config.peds = {
{
model = GetHashKey("ig_jimmyboston"), --Ped model
location = vector4(295.0616, 2565.0742, 43.5656, 80.0), --Coordinates of ped and blip. x,y,z,h
anim = 'WORLD_HUMAN_GUARD_STAND', --Ped animation.
startMenu = 1, --The number of the dialog that opens first when interacting with the ped. startMenu = menu.
reqJob = '', --Necessary job to start a dialogue. If you do not enter anything, the interaction will be available to everyone.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 280, --Blip ID.
blipScale = 0.9, --Blip scale.
blipColor = 25, --Blip color.
blipText = "Dialogue" --Blip text.
},
{
model = GetHashKey("g_m_y_azteca_01"),
location = vector4(289.2764, 2561.5784, 43.9857, 0.0),
anim = 'WORLD_HUMAN_GUARD_STAND',
startMenu = 4,
useBlip = true,
blipID = 280,
blipScale = 0.9,
blipColor = 25,
blipText = "Dialogue"
}
}
Config.dialogs = {
{
menu = 1, --The menu number must be unique.
name = "John", --The ability to enter the name of the person with whom the dialogue is being conducted.
text = "Do you want to talk?", --Question text.
btn1 = "Yes", --The text of the answer option 1
btn2 = "No", --The text of the answer option 2
btn1Mod = {
2, -- 1) element in the array is responsible for the menu that the player will go to when clicked.
nil, -- 2) element in the array is responsible for the event that should be called.
nil, -- 3) element in the array is responsible for the type of event that is called from 2 elements (server/client).
nil, -- 4) 1 argument for the event. (If you don't have an argument in the event, leave nil).
nil, -- 5) 2 argument for the event. (If you don't have an argument in the event, leave nil).
nil -- 6) 3 argument for the event. (If you don't have an argument in the event, leave nil).
},
btn2Mod = { --If you leave a similar array construction, the dialog will simply close when you click on this selection item.
nil, -- 1) element in the array is responsible for the menu that the player will go to when clicked.
"bur_exit_dialog", -- 2) element in the array is responsible for the event that should be called.
nil, -- 3) element in the array is responsible for the type of event that is called from 2 elements (server/client).
nil, -- 4) 1 argument for the event. (If you don't have an argument in the event, leave nil).
nil, -- 5) 2 argument for the event. (If you don't have an argument in the event, leave nil).
nil -- 6) 3 argument for the event. (If you don't have an argument in the event, leave nil).
},
},
{
menu = 2,
name = "John",
text = "If you don't like someone, I can help you with that. Just tell me his name",
btn1 = "Thanks, i'm on my own", --The text of the answer option 1
btn2 = "Wow", --The text of the answer option 2
btn3 = "How's that?", --The text of the answer option 3
btn4 = "Yeah come on", --The text of the answer option 4
btn1Mod = {
3, -- 1) element in the array is responsible for the menu that the player will go to when clicked.
nil, -- 2) element in the array is responsible for the event that should be called.
nil, -- 3) element in the array is responsible for the type of event that is called from 2 elements (server/client).
nil, -- 4) 1 argument for the event. (If you don't have an argument in the event, leave nil).
nil, -- 5) 2 argument for the event. (If you don't have an argument in the event, leave nil).
nil -- 6) 3 argument for the event. (If you don't have an argument in the event, leave nil).
},
btn2Mod = {
3, -- 1) element in the array is responsible for the menu that the player will go to when clicked.
nil, -- 2) element in the array is responsible for the event that should be called.
nil, -- 3) element in the array is responsible for the type of event that is called from 2 elements (server/client).
nil, -- 4) 1 argument for the event. (If you don't have an argument in the event, leave nil).
nil, -- 5) 2 argument for the event. (If you don't have an argument in the event, leave nil).
nil -- 6) 3 argument for the event. (If you don't have an argument in the event, leave nil).
},
btn3Mod = {
3, -- 1) element in the array is responsible for the menu that the player will go to when clicked.
nil, -- 2) element in the array is responsible for the event that should be called.
nil, -- 3) element in the array is responsible for the type of event that is called from 2 elements (server/client).
nil, -- 4) 1 argument for the event. (If you don't have an argument in the event, leave nil).
nil, -- 5) 2 argument for the event. (If you don't have an argument in the event, leave nil).
nil -- 6) 3 argument for the event. (If you don't have an argument in the event, leave nil).
},
btn4Mod = {
3, -- 1) element in the array is responsible for the menu that the player will go to when clicked.
nil,
nil, -- 3) element in the array is responsible for the type of event that is called from 2 elements (server/client).
nil, -- 4) 1 argument for the event. (If you don't have an argument in the event, leave nil).
nil, -- 5) 2 argument for the event. (If you don't have an argument in the event, leave nil).
nil -- 6) 3 argument for the event. (If you don't have an argument in the event, leave nil).
},
},
{
menu = 3,
name = "John",
text = "I hope you're not a cop, in short, you can order a murder on this person, just shh...",
btn1 = "LoL",
btn2 = "Clearly",
btn3 = "Bye!",
btn1Mod = {
1, -- 1) element in the array is responsible for the menu that the player will go to when clicked.
nil, -- 2) element in the array is responsible for the event that should be called.
nil, -- 3) element in the array is responsible for the type of event that is called from 2 elements (server/client).
nil, -- 4) 1 argument for the event. (If you don't have an argument in the event, leave nil).
nil, -- 5) 2 argument for the event. (If you don't have an argument in the event, leave nil).
nil -- 6) 3 argument for the event. (If you don't have an argument in the event, leave nil).
},
btn2Mod = {
2, -- 1) element in the array is responsible for the menu that the player will go to when clicked.
nil, -- 2) element in the array is responsible for the event that should be called.
nil, -- 3) element in the array is responsible for the type of event that is called from 2 elements (server/client).
nil, -- 4) 1 argument for the event. (If you don't have an argument in the event, leave nil).
nil, -- 5) 2 argument for the event. (If you don't have an argument in the event, leave nil).
nil -- 6) 3 argument for the event. (If you don't have an argument in the event, leave nil).
},
btn3Mod = {
nil,
"bur_exit_dialog", -- 2) element in the array is responsible for the event that should be called.
nil, -- 3) element in the array is responsible for the type of event that is called from 2 elements (server/client).
nil, -- 4) 1 argument for the event. (If you don't have an argument in the event, leave nil).
nil, -- 5) 2 argument for the event. (If you don't have an argument in the event, leave nil).
nil -- 6) 3 argument for the event. (If you don't have an argument in the event, leave nil).
},
},
{
menu = 4,
name = "Benito",
text = "What is the purpose of the null keyword in Java?",
btn1 = "To define a variable without a value",
btn2 = "To define a constant value",
btn3 = "To call a method",
btn4 = "To handle exceptions",
btn1Mod = {
nil, -- 1) element in the array is responsible for the menu that the player will go to when clicked.
"win", -- 2) element in the array is responsible for the event that should be called.
"client", -- 3) element in the array is responsible for the type of event that is called from 2 elements (server/client).
nil, -- 4) 1 argument for the event. (If you don't have an argument in the event, leave nil).
nil, -- 5) 2 argument for the event. (If you don't have an argument in the event, leave nil).
nil -- 6) 3 argument for the event. (If you don't have an argument in the event, leave nil).
},
btn2Mod = {
nil, -- 1) element in the array is responsible for the menu that the player will go to when clicked.
"bur_exit_dialog", -- 2) element in the array is responsible for the event that should be called.
nil, -- 3) element in the array is responsible for the type of event that is called from 2 elements (server/client).
nil, -- 4) 1 argument for the event. (If you don't have an argument in the event, leave nil).
nil, -- 5) 2 argument for the event. (If you don't have an argument in the event, leave nil).
nil -- 6) 3 argument for the event. (If you don't have an argument in the event, leave nil).
},
btn3Mod = {
nil, -- 1) element in the array is responsible for the menu that the player will go to when clicked.
"bur_exit_dialog", -- 2) element in the array is responsible for the event that should be called.
nil, -- 3) element in the array is responsible for the type of event that is called from 2 elements (server/client).
nil, -- 4) 1 argument for the event. (If you don't have an argument in the event, leave nil).
nil, -- 5) 2 argument for the event. (If you don't have an argument in the event, leave nil).
nil -- 6) 3 argument for the event. (If you don't have an argument in the event, leave nil).
},
btn4Mod = {
nil, -- 1) element in the array is responsible for the menu that the player will go to when clicked.
"bur_exit_dialog", -- 2) element in the array is responsible for the event that should be called.
nil, -- 3) element in the array is responsible for the type of event that is called from 2 elements (server/client).
nil, -- 4) 1 argument for the event. (If you don't have an argument in the event, leave nil).
nil, -- 5) 2 argument for the event. (If you don't have an argument in the event, leave nil).
nil -- 6) 3 argument for the event. (If you don't have an argument in the event, leave nil).
},
}
}
Optimization (The script consumes):
0.00 ms in a quiet state.
0.01 ms in an active state.
What does this system include:
- This system works on all versions of ESX, QBCore, as well as STANDALONE!
- Beautiful user interface!
- The ability to enable blips on the map!
- The possibility of infinite question-answer settings!
- The ability to talk to an NPC only for certain jobs!
- Support of our Sound system DLC!
- The ability to mix dialogues between NPCs!
- You can completely change the user interface at will!
- Detailed configuration file!
- Of course support, Iโm ready to help you!
TOP SALES
You may also be interested in my other resources:
Code is accessible | Open source: Yes \ Escrow: No - Available only: config, ui |
Subscription-based | No |
Lines (approximately) | ~800 |
Requirements | Standalone/ESX/QBCore |
Support | Yes |