⚙️Configuration

A clear overview of all the available configurations for the Interactions!

Here you will find everything that you need to configure in order for the heist to run perfectly. Read through the comments in file carefully to fully understand what you need to change and what not to!


Config File

SHTalk = {}

-- Locale
SHTalk.SetLocale = 'en'
SHTalk.Locale = {
    ['en'] = {
        -- Notify
        ['NotHaveMoney'] = "You not enough money",
        ['PurchasedItems'] = "You purchase items for: $",
        ['NotInventorySpace'] = "You not have space in your inventory",
        ['NotInventorySpaceAndPurchased'] = "You not have space in your inventory for all items and purchase items for: ",

        -- UI
        ['MenuTotalPrice'] = "Total price: $",
        ['MenuRep'] = "REP",
        ['MenuExit'] = "EXIT",
        ['MenuEsc'] = "ESC",
    },
}

SHTalk.EnableTarget = false -- If this is a true you using qb-target/ox_target/other target, if this is false you use interaction! Check bd-talk/wrapper/client/cl_main.lua
SHTalk.InventoryImageLink = "https://cfx-nui-ox_inventory/web/images/" -- Your inventory image directory directory link
SHTalk.CloseShopOnSuccessPurchase = true -- This close talk shop on buy items and you have successfully purchase items

SHTalk.Talkings = {
    {
        Model = "ig_benny", -- Ped model
        EnablePed = true, -- Enable/Disable ped
        Coords = vector4(148.08, -610.06, 47.08, 344.76), -- Conversation coords
        TargetLabel = "Open Talking", -- Target label
        TargetIcon = "fa-solid fa-message", -- Target icon
        TalkInfo = {
            FirstName = 'Bobby', -- Npc first name
            LastName = "Boo", -- Npc last name
            Rep = "druglern", -- This is metadata name
            JobType = "Drug Lern", -- You job type
            Type = "Talk", -- Talk type is Talk !!!
            Description = "Nice to see you drug man, can i help you?", -- First npc message if you open talk
            Buttons = {
                {
                    Text = "How to plant weed", -- Button label
                    Args = { -- Button args
                        PlayerRespond = "I need to lern how to plant weed field.", -- Player respond if you click on button
                        NpcRespond = "For this, you need to follow this actions.", -- Npc respond if you click on button
                        Buttons = { -- Buttons, this change button values, you can make infinity conversations
                            {
                                Text = "Weed Shop",
                                Event = "bd-talk:[Client]:AddWeedShopWaypoint",
                                Args = {
                                    PlayerRespond = "Where is a weed shop?",
                                    NpcRespond = "Weed shop is located in Sandy Shores.",
                                    Close = false
                                },
                            },
                            {
                                Text = "Weed Seeds",
                                Event = "bd-talk:[Client]:AddWeedSeedsWaypoint",
                                Args = {
                                    PlayerRespond = "Can i get weed seeds?",
                                    NpcRespond = "Go to old weed fiels to get weed seeds.",
                                    Close = false
                                }
                            }
                        }
                    }
                },
                {
                    Text = "How to sell weed",
                    Args = {
                        PlayerRespond = "Can i sell weed to civilians?",
                        NpcRespond = "You need to locate where is drug dealer boss.",
                        Buttons = {
                            {
                                Text = "Where is?",
                                Event = "bd-talk:[Client]:AddDrugDealerBossBlips",
                                Args = {
                                    PlayerRespond = "Can i find this man?",
                                    NpcRespond = "I give to you all drug dealer boss location, your mission is to find drug dealer boss",
                                    Close = false
                                },
                            }
                        }
                    }
                }
            }
        },
    },
    {
        Model = "ig_benny",
        EnablePed = true,
        Coords = vector4(130.53, -606.15, 45.75, 9.78),
        TargetLabel = "Open Talking",
        TalkInfo = {
            FirstName = "Jony",
            LastName = "Marash",
            Rep = "drugsales", -- This is metadata name
            Type = "Shop",  -- Talk type is Shop !!!
            Shop = {
                {
                    Name = "weed_water", -- Item name
                    Label = "Weed Water", -- Item label
                    Price = 500, -- Item price
                    Image = "weed_water.png" -- Item image name in your inventory folder
                },
                {
                    Name = "weed_fertilizer",
                    Label = "Fertilizer",
                    Price = 650,
                    Image = "weed_fertilizer.png"
                },
                {
                    Name = "weed_antipest",
                    Label = "Anti pest",
                    Price = 1200,
                    Image = "weed_antipest.png"
                },
            },
            PayButtons = {
                {
                    Label = "Pay Via Cash", -- Pay option label
                    Account = "cash" -- Pay option account
                },
                {
                    Label = "Pay Via Bank",
                    Account = "bank"
                },
            }
        },
    },
}

Examples

-- Options format
{
    label = "BD Interact",
    canInteract = function(entity, options)
        return true
    end,
    action = function(entity, options)
        print(entity, json.encode(options))
    end,
    isServer = false,
    event = "bd-interact:clientEvent",
    apple = 93, -- You can add custom params
    peach = 12,
}

RegisterNetEvent('bd-interact:clientEvent', function(options)
    print("Apple number: "..options.apple)
    print("Peach number: "..options.peach)
end)

Last updated