⚙️Configuration

A clear overview of all the available configurations for the Coke Run Heist!

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!


Email Configuration

You will have to add email support with the phone you are using. You can easily do that by following our example and just modifying it to use your phone resource!

function NotifyOtherPlayers(fromGroup)
    local Players = nil
    if Coke.Main.Framework == "esx" then
        Players = Framework.GetPlayers()
    else
        Players = Framework.Functions.GetPlayers()
    end

    for i = 1, #Players do
        local Player = nil
        local shouldNotif = false
        if Coke.Main.Framework == "esx" then
            Player = Framework.GetPlayerFromId(Players[i])
            shouldNotif = Player.getJob().name ~= Coke.Main.PoliceJobName
        else
            Player = Framework.Functions.GetPlayer(Players[i])
            shouldNotif = Player.PlayerData.job.name ~= Coke.Main.PoliceJobName
        end

        if shouldNotif then
            local PlayerGroup = exports['bd-computer']:FindGroupByMember(Players[i])

            PlayerGroup = (PlayerGroup and PlayerGroup or -1)

            if PlayerGroup ~= fromGroup then
                -- local insertId, received = exports['yseries']:SendMail({
                --     title = language.notifications.server.mail_title,
                --     sender = language.notifications.server.mail_sender,
                --     senderDisplayName = language.notifications.server.mail_sender_display_name,
                --     content = language.notifications.server.mail_message,
                --     actions = { -- actions are optional
                --         {
                --             label = language.notifications.server.mail_accept,
                --             data = {
                --                 event = "bd-cokerun:server:steal-coca-accept",
                --                 isServer = true,
                --                 data = { plyId = Players[i], jobData = Jobs[fromGroup], groupId = fromGroup },
                --                 shouldClose = true
                --             }
                --         }
                --     },
                --     attachments = {
                --         { photo = "https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExNW4yaGI5dGJsOGFvYWJlejM0Mjk1ZDN3MWFwejZuY3M0Y3l2NHY4NSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/ohONS2y8GTDoI/giphy.gif" },
                --     }
                -- }, "source", Players[i])
                
                -- FOLLOW OUR EXAMPLE ABOVE TO MAKE IT EASIER FOR YOUR
            end
        end
    end
end

Config File

Coke = {}

Coke.Main = {
    Debug = false,

    Language = "en",

    Framework = 'qb',   -- 'qb', 'esx' or 'standalone'
    Target = "ox",      -- 'ox' or 'qb'
    ProgressBar = "qb", -- 'ox' or 'qb'
    
    -- Used to identify if the player is a policeman and not notify them about the heist
    PoliceJobName = "police",
}

Coke.CopsRequired = 0

Coke.CopsSignal = true      -- Whether to send or not

Coke.CopsSignalChance = 100  -- Percent

Coke.RevealTimeForPublic = 1 -- In minutes

Coke.PackageInfo = {
    name = `v_ind_cf_chckbox2`,
    placement = {
        x = 0.01,
        y = -0.02,
        z = -0.12,
        xrot = 0.0,
        yrot = 0.0,
        zrot = 0.0,
    }
}

Coke.Rewards = {
    [1] = {
        Name = "cocaine_brick",
        MinAmount = 10,
        MaxAmount = 20,
        Chance = 100,
    },
}

Coke.Locations = {
    CokeRewardMin = 1,
    CokeRewardMax = 15,
    Public = true,
    ReputationGives = 40, -- Groupwise split
    Locations = {
        [1] = {
            -- Instructions are only for the Intructor; Mixing Coca Leaves is only for the Mixer; Mixing the chemical elements is only for the Chemist; Supplier is the other guy in the group that does nothing :D (protects from intruders)
            Roles = { -- Dont touch
                ["Instructor"] = 0,
                ["Mixer"] = 0,
                ["Chemist"] = 0,
                ["Supplier"] = 0,
            },

            PropsInfo = {
                [1] = {
                    Prop = `xm3_prop_xm3_tent_01a`,
                    Coords = '{"x":1073.0382080078126,"y":2364.22607421875,"z":43.08622360229492,"w":0.0}',
                },
                [2] = {
                    Prop = `bkr_prop_coke_table01a`,
                    Coords = '{"x":1069.966552734375,"y":2365.97802734375,"z":42.95531845092773,"w":0.0}',
                },
                [3] = {
                    Prop = `bkr_prop_coke_table01a`,
                    Coords = '{"x":1069.9669189453126,"y":2362.524658203125,"z":42.9286003112793,"w":185.0}',
                },
                [4] = {
                    Prop = `prop_barrel_pile_01`,
                    Coords = '{"x":1074.9010009765626,"y":2366.0859375,"z":43.19315338134765,"w":0.0}',
                },
            },

            CocaineSupplies = 15,
            CocaineSuppliesAmount = 0,
            CocaineSuppliesLocation = vector3(-94.6302, -2466.6565, 6.2179),

            MixingCocaLeaves = 3,                -- Cocaine Supplies will be split by this number and it will give that amount after successfull mixing (must be dividable)
            MixingCocaLeavesAmount = 0,          -- Dont touch
            CocaLeavesAmount = 0,                -- Dont touch
            CocaLeavesNumber = 0,                -- Dont touch
            CocaLeavesNumberAlreadySeen = false, -- Dont touch
            MixingCocaLeavesLocation = vector3(1074.9010009765626, 2366.0859375, 43.19315338134765),

            MixturesReady = 0, -- Dont touch
            IngredientsLocation = vector3(1069.9669189453126, 2362.524658203125, 42.9286003112793),
            Ingredients = {    -- Dont touch
                ["coca"] = 0,
                ["methanol"] = 0,
                ["sulfuric"] = 0,
                ["acetone"] = 0,
            },
            IngredientsAlreadySeen = false, -- Dont touch
            MixingChemicalsLocation = vector3(1069.966552734375, 2365.97802734375, 42.95531845092773),
        },
        [2] = {
            -- Instructions are only for the Intructor; Mixing Coca Leaves is only for the Mixer; Mixing the chemical elements is only for the Chemist; Supplier is the other guy in the group that does nothing :D (protects from intruders)
            Roles = { -- Dont touch
                ["Instructor"] = 0,
                ["Mixer"] = 0,
                ["Chemist"] = 0,
                ["Supplier"] = 0,
            },

            PropsInfo = {
                [1] = {
                    Prop = `xm3_prop_xm3_tent_01a`,
                    Coords = '{"x":-475.56195068359377,"y":1523.5155029296876,"z":390.1031494140625,"w":0.0}',
                },
                [2] = {
                    Prop = `bkr_prop_coke_table01a`,
                    Coords = '{"x":-478.5262451171875,"y":1525.190673828125,"z":390.1924743652344,"w":0.0}',
                },
                [3] = {
                    Prop = `bkr_prop_coke_table01a`,
                    Coords = '{"x":-478.18267822265627,"y":1522.019287109375,"z":389.899169921875,"w":0.0}',
                },
                [4] = {
                    Prop = `prop_barrel_pile_01`,
                    Coords = '{"x":-473.3979797363281,"y":1525.3385009765626,"z":390.303955078125,"w":0.0}',
                },
            },

            CocaineSupplies = 2,
            CocaineSuppliesAmount = 0,
            CocaineSuppliesLocation = vector3(-94.6302, -2466.6565, 6.2179),

            MixingCocaLeaves = 1,                -- Cocaine Supplies will be split by this number and it will give that amount after successfull mixing (must be dividable)
            MixingCocaLeavesAmount = 0,          -- Dont touch
            CocaLeavesAmount = 0,                -- Dont touch
            CocaLeavesNumber = 0,                -- Dont touch
            CocaLeavesNumberAlreadySeen = false, -- Dont touch
            MixingCocaLeavesLocation = vector3(-473.3979797363281, 1525.3385009765626, 390.303955078125),

            MixturesReady = 0, -- Dont touch
            IngredientsLocation = vector3(-478.18267822265627, 1522.019287109375, 389.899169921875),
            Ingredients = {    -- Dont touch
                ["coca"] = 0,
                ["methanol"] = 0,
                ["sulfuric"] = 0,
                ["acetone"] = 0,
            },
            IngredientsAlreadySeen = false, -- Dont touch
            MixingChemicalsLocation = vector3(-478.5262451171875, 1525.190673828125, 390.1924743652344),
        },
    }
}

Last updated