INSTALLATION

Read very well and follow all the steps below. If you find any error or have any doubt open a ticket.

1. DOWNLOAD

The first step is to download the product we have just purchased. To do this we will go to our KEYMASTER account and search for "Buty-Garbage".

2. DEPENDENCIES AND INSTALLATION

To install it add the resource to your scripts folder and put the following in your SERVER.CFG:

ensure Buty-Progress -- Or the Progress Bar of your choice.
ensure Buty-Garbage

The only dependency is the Progress Bar. Either ours (Buty-Progress) or one of your choice that you will have to set the export in the progress.lua and you will have to ensure it before the script.

You will also need to install the SQL in your database before starting the script, in order to save the experience of each player.

3. CONFIG

The following will explain all the settings, one of the most important things that I recommend you spend a few minutes to understand in order to offer your users the best possible experience.

To make it easier for you to configure, this script comes with several configuration files, each one for one thing. You can see it explained below:

Here you will only have to configure your framework, your database and some extra settings.

In UseKeys, UseFuel, UseDeleteVehicle you activate it in case you have filled some of the integrations in functions.

Buty = {}
Table2 = {}

Configuration = {

    framework = 'esx',  -- framework "esx" or "qbcore"

    QBtrigger = 'qb-core',

    Mysql = 'oxmysql',  -- oxmysql, mysql-async or ghmattisql

    Payment_type = 'cash', -- cash or bank

    UseKeys = false,

    UseFuel = false,

    UseDeleteVehicle = false,

    NeedJob = false, JobName = "garbage",

    GiveItem = false, Quantity = 1, NamesItems = {"bread", "water"}
}

Level = {
    ["cityalone"] = {
        [1] = {money = 1000, exp = 100},
        [2] = {money = 1500, exp = 100},
        [3] = {money = 2000, exp = 100},
        [4] = {money = 2500, exp = 100},
        [5] = {money = 3000, exp = 100},
        [6] = {money = 3500, exp = 100},
        [7] = {money = 4500, exp = 100},
        [8] = {money = 5000, exp = 100},
        [9] = {money = 5500, exp = 100},
        [10] = {money = 6000, exp = 100},
    },

    ["recycledalone"] = {
        [1] = {money = 1000, exp = 100},
        [2] = {money = 1500, exp = 100},
        [3] = {money = 2000, exp = 100},
        [4] = {money = 2500, exp = 100},
        [5] = {money = 3000, exp = 100},
        [6] = {money = 3500, exp = 100},
        [7] = {money = 4500, exp = 100},
        [8] = {money = 5000, exp = 100},
        [9] = {money = 5500, exp = 100},
        [10] = {money = 6000, exp = 100},
    },

    ["citynpc"] = {
        [1] = {money = 100, exp = 100},
        [2] = {money = 150, exp = 100},
        [3] = {money = 200, exp = 100},
        [4] = {money = 250, exp = 100},
        [5] = {money = 300, exp = 100},
        [6] = {money = 350, exp = 100},
        [7] = {money = 450, exp = 100},
        [8] = {money = 500, exp = 100},
        [9] = {money = 550, exp = 100},
        [10] = {money = 600, exp = 100},
    },
    ["recyclednpc"] = {
        [1] = {money = 100, exp = 100},
        [2] = {money = 150, exp = 100},
        [3] = {money = 200, exp = 100},
        [4] = {money = 250, exp = 100},
        [5] = {money = 300, exp = 100},
        [6] = {money = 350, exp = 100},
        [7] = {money = 450, exp = 100},
        [8] = {money = 500, exp = 100},
        [9] = {money = 550, exp = 100},
        [10] = {money = 600, exp = 100},
    },

}

Coords = {
    startjob = {{x = -349.24, y = -1569.36, z = 25.24, h = 306.2}},
    spawnvehicle = {x = -365.36, y = -1523.4, z = 27.44, h = 178.64},
    vehicleGoTo =  {x = -362.2, y = -1562.8, z = 24.84},
    npcGoTo =  {x = -346.08, y = -1560.88, z = 25.24},
}

Jobs = {
    City = {
        vehicle="trash2",
        pedmodel="s_m_m_gardener_01",
    },

    Recycled = {
        vehicle="13080",
        pedmodel="s_m_m_gardener_01",
    }
}

Target = {
    UseTarget = false,
    Export = "qtarget",

    ["Home"] = {
        Text = 'START JOB', 
        Icon = 'fa fa-briefcase',  
        Coords = vector3(-349.24,-1569.36,25.24)      
    },

    ["TAKE_SCRAP"] = {
        Text = 'TAKE SCRAP', 
        Icon = 'fa fa-hand-paper-o'        
    },

    ["TAKE_TRASH"] = {
        Text = 'TAKE TRASH', 
        Icon = 'fa fa-trash'        
    },

}

-- Client notifications
function SendClientNotification(type, text, time)
    -- time = 10000
    -- if type == 'success' then
    --     exports["Venice-Notification"]:Notify(text, time, "check", options)
    -- elseif type == 'error' then
    --     exports["Venice-Notification"]:Notify(text, time, "error", options)
    -- elseif type == 'info' then
    --     exports["Venice-Notification"]:Notify(text, time, "info", options)
    -- end
    if Configuration.framework == 'esx' then 

     ESX.ShowNotification(text)

    elseif Configuration.framework == 'qbcore' then

     QBCore.Functions.Notify(text)

    end
end

-- Server side notifications
function SendServerNotification(source, type, text, time)
    -- time = 10000
    -- if type == 'success' then
    --     TriggerClientEvent('codem-notification', source, text, time, 'check', options)
    -- elseif type == 'error' then
    --     TriggerClientEvent('codem-notification', source, text, time, 'error', options)
    -- elseif type == 'info' then
    --     TriggerClientEvent('codem-notification', source, text, time, 'info', options)
    -- end

    if Configuration.framework == 'esx' then

        TriggerClientEvent('esx:showNotification', source, text)

    elseif Configuration.framework == 'qbcore' then

        TriggerClientEvent('QBCore:Notify', source, text)

    end
end

Last updated