# Configs

{% tabs %}
{% tab title="config.lua" %}

```lua
Config = {}

Config.Framework = "QBCore" -- "QBCore" or "ESX"
Config.Core = "qb-core" -- Your qb-core folder name
Config.Target = "qb" -- "qb" or "ox"
Config.FuelSystem = "LegacyFuel" -- "LegacyFuel" or "okokFuel" or "ox_fuel" or "ti_fuel" or "qs-fuel" ( open code on config_functions.lua )
Config.Notify = "ox_lib" -- "standalone", "qb", "ox", "okok", codem ( open code on config_functions.lua )
Config.Vehiclekeys = "qb" -- "qb", "qs", "renewed", "jaksam" ( open code on config_functions.lua )
Config.Inventory = "newqb" -- "oldqb" or "newqb" or "ox" or "qs" or "tgiann" or "codem" ( open code on s_utils.lua )
Config.AutoDatabase = true -- If true the script will create the database automatic

-- Settings
Config.AirplaneLocations = {
    [1] = {
        zoneName = "Sandy Shores Airfield", -- Name of the zone
        jobNeed = "police", -- Job needed to access the zone
        blipSettings = { 
            enable = true, -- Enable or disable the blip
            blipCoords = vector3(2121.03, 4783.31, 40.97), -- Coordinates of the blip
            blipSprite = 307, -- Blip sprite (https://docs.fivem.net/docs/game-references/blips/)
            blipColor = 3, -- Blip color (https://docs.fivem.net/docs/game-references/blips/)
            blipScale = 0.8, -- Scale of the blip
            blipName = "Sandy Shores Airfield", -- Name of the blip
        },
        licenses = { -- List of licenses can be given to the player
            ["commercial"] = true,
            ["private"] = true,
        },
        pedSettings = {
            pedSpawn = vector4(2121.03, 4783.31, 40.97, 300.5), -- Ped spawn location ( Only people with job can access it )
            pedModel = "s_m_m_pilot_02", -- Ped model ( https://docs.fivem.net/docs/game-references/ped-models/)
            pedAnimation = "WORLD_HUMAN_CLIPBOARD", -- Ped animation ( https://wiki.rage.mp/wiki/Scenarios )
        },
        strashSettings = {
            name = "Sandy_Airplane_Stash", -- Name of the stash
            weight = 10000, -- Max weight of the stash
            slots = 25, -- Max slots of the stash
        },
        airplaneSpawn = { -- List of possible spawn points
            vector4(2124.32, 4807.34, 41.2, 116.37)
        },
        airplaneReturn = vector3(2124.32, 4807.34, 41.2), -- Return point of the airplane
        airplanesAvailable = { -- List of available airplanes
            [1] = {
                model = "besra", -- Model of the airplane ( https://wiki.rage.mp/wiki/Vehicles )
                label = "Besra", -- Label of the airplane
                type = "commercial", -- Type of the airplane (commercial or private)
            },
            [2] = {
                model = "mammatus",
                label = "Mammatus",
                type = "private",
            },
            [3] = {
                model = "dodo",
                label = "Dodo",
                type = "private",
            },
            [4] = {
                model = "duster",
                label = "Duster",
                type = "private",
            },
            [5] = {
                model = "stunt",
                label = "Stunt",
                type = "private",
            },
        },
        missionsEnable = true, -- Enable or disable the missions
        missionsLocations = {
            [1] = {
                locationName = "Travel to Los Santos Airport", -- Name of the location
                location = vector3(-1064.5, -2929.47, 13.95), -- Location where player go interact to leave the passengers in Los Santos
                locationReward = { min = 1000, max = 2000 }, -- Reward for the mission
                locationPlane = "dodo", -- Model of the airplane
            },
            [2] = {
                locationName = "Travel to Paleto Bay", -- Name of the location
                location = vector3(-476.44, 5989.1, 31.34), -- Location where player go interact to leave the passengers in Sandy Shores
                locationReward = { min = 1000, max = 2000 }, -- Reward for the mission
                locationPlane = "supervolito", -- Model of the airplane ( We recommend helicopter becuase dont have any air strip in Paleto Bay )
            },
        }
    }
}
```

{% endtab %}

{% tab title="config\_functions.lua" %}

```lua
if Config.Framework == "QBCore" then
    QBCore = exports[Config.Core]:GetCoreObject()
elseif Config.Framework == "ESX" then
    ESX = exports.es_extended:getSharedObject()
end

function Notify(message, type, duration)
    if Config.Notify == "standalone" then
        BeginTextCommandThefeedPost("STRING")
        AddTextComponentSubstringPlayerName(message)
        EndTextCommandThefeedPostTicker(true, true)
    elseif Config.Notify == "qb" then
        QBCore.Functions.Notify(message, type, duration)
    elseif Config.Notify == "okok" then
        exports['okokNotify']:Alert('Notification', message, duration, type, true)
    elseif Config.Notify == "ox_lib" then
        if type == "primary" then type = "info" end
        lib.notify({
            type = type,
            description = message
        })
    elseif Config.Notify == "codem" then
        TriggerEvent('codem-notification:Create', message, type, 'Notification', duration)
    end
end

-- Vehiclekeys Function
function GiveVehicleKeys(plate, model)
    if Config.Vehiclekeys == "qb" then
        TriggerEvent("vehiclekeys:client:SetOwner", plate)
    elseif Config.Vehiclekeys == "qs" then
        exports['qs-vehiclekeys']:GiveKeys(plate, model)
    elseif Config.Vehiclekeys == "renewed" then
        exports['Renewed-Vehiclekeys']:addKey(plate)
    elseif Config.Vehiclekeys == "jaksam" then
        TriggerServerEvent("vehicles_keys:selfGiveVehicleKeys", plate)
    end
end

-- Fuel Function
function SetFuel(veh)
    if Config.FuelSystem == "LegacyFuel" then
        exports["LegacyFuel"]:SetFuel(veh, 100.0)
    elseif Config.FuelSystem == "okokFuel" then
        exports['okokGasStation']:SetFuel(veh, 100.0)
    elseif Config.FuelSystem == "ox_fuel" then
        SetVehicleFuelLevel(veh, 100.0)
    elseif Config.FuelSystem == "ti_fuel" then
        exports["ti_fuel"]:setFuel(veh, 100.0, "RON91")
    elseif Config.FuelSystem == "qs-fuel" then
        exports['qs-fuelstations']:SetFuel(veh, 100.0)
    end
end

-- Open stash
function OpenStash(location)
    if Config.Inventory == "oldqb" then
        TriggerEvent("inventory:client:SetCurrentStash", location.strashSettings.name)
        TriggerServerEvent("inventory:server:OpenInventory", "stash", location.strashSettings.name, {
            maxweight = location.strashSettings.weight,
            slots = location.strashSettings.slots,
        })
    elseif Config.Inventory == "newqb" or Config.Inventory == "qs" then
        TriggerServerEvent("m-AirplaneJob:Server:OpenStash", location.strashSettings.weight, location.strashSettings.slots, location.strashSettings.name)
    elseif Config.Inventory == "ox" then
       exports.ox_inventory:openInventory('stash', location.strashSettings.name)
    end
end
```

{% endtab %}

{% tab title="config\_language.lua" %}

```lua
Language = {}

Language = {
    openAviatorMenu = "Open Aviator Menu",
    noLicenseFound = "No license found",
    noAirplanesForThisLincese = "No airplanes available for this license",
    fillInput = "Please fill the input",
    airplaneModel = "Airplane Model",
    selectAirplane = "Select the airplane model you want to spawn",
    deleteAirplane = "[E] - Delete Airplane",
    airplaneDeleted = "Airplane deleted successfully!",
    missionDescription = "Travel to the location to complete the mission\nPossible Rewards: $$minReward - $$maxReward",
    missionStart = "Mission started, go to: $location",
    deliverPassegers = "[E] - Deliver the passengers",
    missionCompleted = "Mission completed, you earned: $$reward, Go back to the air field!",
    selectMission = "Select Mission",
    invalidLicense = "Invalid license type selected",
    playerHaveLicense = "Player already has this license",
    licenseUpdated = "License updated successfully",
    failedUpdate = "Failed to update license",
    licenseCreated = "License issued successfully",
    failedCreate = "Failed to issue license",
    license = "License:",
    licenseDeleted = "License deleted successfully",
    failedDelete = "Failed to delete",
    licenseNotFoundOrDeleted = "License type not found or already deleted",
    licenseNotFound = "Player licenses not found",
    allLicensesDeleted = "All licenses deleted successfully",
    failedDeleteAllLicenses = "Failed to delete all licenses."
}
```

{% endtab %}
{% endtabs %}
