βš™οΈCustomizations

Learn how to customize NPCs, dialogs, and shop systems in ZF Dialog.

Bridge

Changing Target

To change the target export, go to data/functions.lua around lines: 32 - 34 and integrate your own logic.

Other Framework / Standalone

To integrate your own framework or to make a standalone version, you can fully edit the bridge to accommodate to your needs.

Configs

check_version

To remove the version and dependencies checks, you can do it by changing this value to false

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