Agents can also search and read this documentation through its MCP server.
Config
Config.UpdateCheck
Checks for a new version when the resource starts and prints the result to the server console.
Config.UpdateCheck = true
Config.ThemeColor
Customize the interface to any color you want with Config.ThemeColor.
Config.ThemeColor = "#00FF88"
Config.InteractDistance
Distance at which the interaction text appears and the player can start talking to an NPC.
Config.InteractDistance = 2.0
Config.Keybind
Key used to start talking to an NPC. The value is a FiveM control ID.
Config.Keybind = 38 -- E
Config.NPCs
List of every NPC created by the script. Each block is one NPC on the map.
Config.NPCs = {
{
id = "market_store",
model = "mp_m_shopkeep_01",
coords = vector4(151.66, -1000.08, 29.36, 14.65),
drawText = "~g~[E]~w~ - Market",
title = "24/7",
name = "Supermarket",
dialogue = "Everything you need is right here, buddy. What were you looking for?",
npcAnimDict = "missheistdockssetup1ig_5@base",
npcAnimName = "workers_talking_base_m1",
options = {
-- options go here
}
}
}
NPC Settings
| Option | Description |
|---|---|
id |
Unique name of the NPC. |
model |
Ped model of the NPC. |
coords |
Position and heading of the NPC (vector4(x, y, z, heading)). |
drawText |
Text shown above the NPC when the player is in range. |
title |
Title shown in the dialogue interface. |
name |
Name of the NPC shown in the dialogue interface. |
dialogue |
First sentence the NPC says when the conversation starts. |
npcAnimDict |
Animation dictionary played by the NPC. Optional. |
npcAnimName |
Animation name played by the NPC. Optional. |
options |
List of answers the player can choose. |
Note: NPCs are frozen, invincible and ignore the events around them. All NPCs are automatically deleted when the resource is stopped.
Options
Every entry in options is one answer the player can choose. There are two kinds of options.
Dialogue Option
Shows a response from the NPC. The interface stays open.
{
label = "Is this neighborhood safe?",
type = "dialogue",
response = "It's not very safe at night, so you'd better be careful."
}
Event Option
Triggers a client or server event, ideal for shops, quests and similar systems.
{
label = "Open the Market menu.",
icon = "fa-solid fa-basket-shopping",
event = "qb-shops:server:openShop",
type = "server",
args = { { shop = "247supermarket" } },
close = true
}
Option Settings
| Option | Description |
|---|---|
label |
Text of the answer shown to the player. |
icon |
Font Awesome icon shown next to the answer. Optional. |
type |
dialogue, client or server. |
response |
Sentence the NPC answers with. Used by the dialogue type. |
event |
Name of the event to trigger. Used by the client and server types. |
args |
List of arguments sent to the event. Each entry is passed as a separate argument. |
close |
When true, the interface closes before the event is triggered. |
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending
.mdto page URLs; this page is available as Markdown.