m-Scripts
  • m-Scripts Documentation
  • QBCore
    • Jobs
      • 🚗[QB] TunerJob
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • 🍞[QB] BeanMachine
        • 🛠️Installation
        • 🗒️Config
      • 🍔[QB] Burgershot
        • 🛠️Installation
        • 🗒️Config
      • 🍈[QB] CoolBeans
        • 🛠️Installation
        • 🗒️Config
      • 🚚[QB] Deliveries
        • 🛠️Installation
        • 📃Config
          • 📃config_functions
      • 🍎[QB] Farming
        • 🛠️Installation
        • 🗒️Config
      • 🐟[QB] Fishing
        • 🛠️Installation
        • 🗒️Config
          • 📄config_diving
          • 📄config_fishingnet
          • 📄config_fishingrod
          • 📄config_functions
          • 📄config_language
          • 📄config_seashells
          • 📄config_tournament
          • 📄config_upgrades
      • 🚛[QB] Garbage
        • 🛠️Installation
        • 🗒️Config
      • 🗝️[QB] GoldRush
        • 🛠️Installation
        • 🗒️Config
      • ⛰️[QB] Hunting
        • 🛠️Installation
        • 🗒️Config
      • 🪵[QB] Lumberjack
        • 🛠️Installation
        • 🗒️Config
      • ⛏️[QB] Mining
        • 🛠️Installation
        • 🗒️Config
      • 🛢️[QB] Oil Factory
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • ☕[QB] Pond Coffee
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • 🚚[QB] Trucker
        • 🛠️Installation
        • 🗒️Config
          • 📄Functions
          • 📄Language
      • 🥃[QB] Vanilla
        • 🛠️Installation
        • 🗒️Config
      • 🛻[QB] Mechanic Run
        • 🛠️Installation
        • 🗒️Config
      • 🥃[QB] Bahamas
        • 🛠️Installation
        • 📄Config
      • 🔫[QB] Ammunation
        • 🛠️Installation
        • 📄Config
      • 🐟[QB] Pearls
        • 🛠️Installation
        • 📄Config
      • 🔓[QB] Impound
        • 🛠️Installation
        • 📄Config
        • ✅Garages
      • 🚘[QB] Vehicleshop
        • 🛠️Installation
        • 📄Config
          • Functions
          • Job
          • Language
        • ❓Common Questions
    • General
      • 🏕️[QB] Camping
        • 🛠️Installation
        • 🗒️Config
          • Consumables
          • Language
      • 🎄[QB] Christmas
        • 🛠️Installation
        • 🗒️Config
      • 🎃[QB] Halloween
        • 🛠️Installation
        • 🗒️Config
      • 📔[QB] Insurance
        • 🛠️Installation
        • 🖥️Compatibilities
        • 🗒️Config
        • 🔁Server-Exports
      • 🏘️[QB] Vespucci
        • 🛠️Installation
        • 🗒️Config
          • Brewery
          • Digital Den
          • Masquerade
          • Pro Bikes
      • 🏖️[QB] Beach Activities
        • 🛠️Installation
        • 🗒️Config
      • 🚘[QB] Car Rental
        • 🛠️Installation
        • 📄Config
        • 🖥️Compatibilities
      • ✈️[QB] Sky Racing
        • 🛠️Installation
        • 📄Config
      • 🚘[QB] Car Wash
        • 🛠️Installation
        • 📄Config
      • 🪨[QB] Grinder
        • 🛠️Installation
        • 📄Config
      • 📹[QB] SpyCams & CCTV's
        • 🛠️Installation
        • 📄Config
      • 🏠[QB] Motel
        • 🛠️Installation
        • 📄Config
        • 🖥️Compatibilities
      • 🏚️[QB] Job Center
        • 📄Config
      • 🛠️[QB] Crafting
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
    • Illegal
      • 🔫[QB] Gangs
        • 🛠️Installation
        • 🗒️Config
      • 🔔[QB] Drug Selling
        • 🗒️Config
      • 🌱[QB] Drugs
        • 🛠️Installation
        • 🗒️Config
      • 🍯[QB] Craft Potion
        • 🛠️Installation
        • 🗒️Config
      • 🅱️[QB] Blackmarket
        • 🛠️Installation
        • 🗒️Config
          • config_functions
          • config_language
      • 🚗[QB] Car Thief
        • 🗒️Config
      • 🏠[QB] House Robbery
        • 🛠️Installation
        • 🗒️Config
      • 💎[QB] Jewelry
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • ®️[QB] Mini Robberys
        • 🛠️Installation
        • 🗒️Config
      • 💰[QB] MoneyWash
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🔫[QB] Rob NPC
        • 🛠️Installation
        • 🗒️Config
      • 🏃‍♂️[QB] Runs
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • ⛽[QB] Steal Fuel
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🏬[QB] Store Robbery
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🪛[QB] Scrapyard
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 👾[QB] Territories
        • 🛠️Installation
        • 📄Config
          • Functions
      • 🏨[QB] GoPostal
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • S_utils
  • ESX
    • Jobs
      • 🚗[ESX] Tunerjob
        • ❗Dependencies
        • 🛠️Installation
          • ℹ️OX-Inventory
          • ℹ️QS-Inventory
        • 🗒️Config
          • BlacklistVehicles
          • Craft
          • Functions
          • Language
          • Targets
          • Wraps
          • Events
        • ❓Common Questions
      • 🚚[ESX] Trucker
        • 🛠️Installation
        • 🗒️Config
          • 📄Functions
          • 📄Language
      • 🪵[ESX] Lumberjack
        • 🛠️Installation
        • 🗒️Config
      • 🛻[ESX] Mechanic Run
        • 🛠️Installation
        • 🗒️Config
      • ⛏️[ESX] Mining
        • 🛠️Installation
        • 🗒️Config
      • 🎣[ESX] Fishing
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • Diving
          • Fishingnet
          • Fishingrod
          • Seashells
          • Tournament
          • Upgrades
    • General
      • 🚘[ESX] Car Rental
        • 🛠️Installation
        • 🗒️Config
      • 📃[ESX] Insurance
        • 🛠️Installation
        • 🖥️Compatibilities
        • 📄Config
        • 🔁 Server-Exports
      • 🚘[ESX] Car Wash
        • 🛠️Installation
        • 📄Config
      • 📹[ESX] SpyCams & CCTV's
        • 🛠️Installation
        • 📄Config
        • 🏠[ESX] Motel
          • 🛠️Installation
          • 📄Config
          • 🖥️Compatibilities
      • 🛠️[ESX] Crafting
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
      • 🎄[ESX] Christmas
        • 🛠️Installation
        • 📄Configs
    • Illegal
      • 🔫[ESX] Gangs
        • 🛠️Installation
        • 📄Config
        • ❓Common Questions
      • 🅱️[ESX] Blackmarket
        • 🛠️Installation
        • 🗒️Config
          • config_functions
          • config_language
      • 🏨[ESX] GoPostal
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • S_utils
  • Both Framework
    • Scripts
      • 🚗Car Rebuild
        • 🛠️Installation
        • 🗒️Config
      • 🗺️City Guide
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
      • 🛒Shops
        • 📄Config
        • 🛠️Installation
      • 🔁Reputation
        • 📄Config
        • 🛠️Installation
        • ⁉️Exports & Commands
          • Server Exports
          • Commands
      • 💤AFK System
        • 📄Configs
        • 🛠️Installation
      • 🚗Garages
        • 🛠️Installation
        • 📑User Guide
          • Create Garages
          • Create Private Garage
          • Impound & Auctions
          • Add vehicle to gang/job
          • Commands
        • 🔁Compatibilities
      • ✈️Airplane Job
        • 🛠️Installation
        • 📃Configs
        • ℹ️Exports
      • 📋Scoreboard
        • 📃Config
      • 📦StorageUnits
        • 🛠️Installation
        • 📃Config
Powered by GitBook
On this page
  1. Both Framework
  2. Scripts
  3. Airplane Job

Configs

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 )
            },
        }
    }
}
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
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."
}
PreviousInstallationNextExports

Last updated 2 months ago

✈️
📃