βοΈCustomizations
Learn how to customize NPCs, dialogs, and shop systems in ZF Dialog.
Bridge
Changing Target
Other Framework / Standalone
Configs
check_version
Creating an NPC
{
id = '', -- Optional, will be generated automatically.
model = '',
minusOne = true,
coords = vec4(0.0, 0.0, 30.0, 0.0),
networked = true, -- spawns the ped for everyone and is synced. (for jobs or target, set this to false.)
freeze = true,
invincible = true,
blockevents = true,
anim = {
dict = '',
anim = '',
flag = 49,
},
scenario = 'WORLD_VEHICLE_AMBULANCE',
weapon = {
name = '',
hidden = false,
ammo = 0,
},
target = {
label = 'Talk',
icon = 'fas fa-comment',
onSelect = function()
--
end,
},
dialog = {
messages = {
{
author = 'player',
content = 'a player message.',
},
{
author = 'npc',
content = 'a npc message.',
},
},
buttons = {
{
label = 'Accept',
event = 'exemple:event',
},
{
label = 'Refuse',
onSelect = function()
print('Refuser')
end,
},
},
shop = {
{
name = 'WEAPON_PISTOL',
label = 'Pistol',
price = 2500,
image = 'WEAPON_PISTOL',
metadata = false,
},
},
},
handle = nil,
spawnNow = true,
}Last updated