diff --git a/resources/[tools]/nordi_talk_to_npc/client/client.lua b/resources/[tools]/nordi_talk_to_npc/client/client.lua index 5a2f786ce..6cc2eba2b 100644 --- a/resources/[tools]/nordi_talk_to_npc/client/client.lua +++ b/resources/[tools]/nordi_talk_to_npc/client/client.lua @@ -87,10 +87,17 @@ local function CreateDialogOptions(options, npcId, parentId) end }) + -- Erste Option ist immer die NPC-Antwort (nur Text) + table.insert(responseOptions, 1, { + title = "💬 " .. option.response.title, + description = option.response.description, + icon = 'comment', + disabled = true -- Macht die Option nicht klickbar, zeigt aber den Text + }) + lib.registerContext({ id = contextId, title = option.response.title, - menu = 'npc_dialog_' .. npcId, -- Zurück-Link zum Hauptmenü options = responseOptions }) @@ -112,9 +119,17 @@ RegisterNetEvent('npc-dialog:client:openDialog', function(data) local options = CreateDialogOptions(npcData.dialog.options, npcId) + -- Erste Option ist die NPC-Begrüßung (nur Text) + table.insert(options, 1, { + title = "💬 " .. npcData.dialog.title, + description = npcData.dialog.description, + icon = 'comment', + disabled = true -- Zeigt nur den Text, nicht klickbar + }) + -- Verlassen Option hinzufügen table.insert(options, { - title = "Verlassen", + title = "🚪 Verlassen", description = "Dialog beenden", icon = 'times', onSelect = function() @@ -124,8 +139,7 @@ RegisterNetEvent('npc-dialog:client:openDialog', function(data) lib.registerContext({ id = 'npc_dialog_' .. npcId, - title = npcData.dialog.title, - description = npcData.dialog.description, -- Hier wird die Beschreibung hinzugefügt + title = npcData.name, options = options }) @@ -141,4 +155,4 @@ AddEventHandler('onResourceStop', function(resourceName) DeleteEntity(npc) end end - end) +end)