Documentation
  • Discord Server
  • About Us
  • Free Resources
    • Death Screen
      • PS-Dispatch Integration
    • Battlepass
      • Guides
      • Commands
        • Player Commands
        • Admin Commands
      • API
        • Server
    • Garages
      • Guides
        • Creating Interior
        • Creating Garage
        • How to find entity sets (customizations) for interior
  • Paid Resources
    • Elevator Creator V2
      • Installation
      • Accessible code
    • Radar System V2
      • Installation
      • Accessible code
    • Hotels Creator
      • Accessible code
    • Vehicle Shop Creator
      • Accessible code
    • Stocks Market
      • Accessible code
      • [DEV] - Usable Functions
    • Discord Voice Attendance
      • Installation
    • Deathmatch System
      • Installation
        • esx_ambulancejob
        • qb-ambulancejob
        • wasabi_ambulance
        • qbx_medical
        • codem-inventory
        • core_inventory
      • Accessible code
    • Object Creator
      • Dependencies
      • Accessible code
    • Cocaine Labs
      • Dependencies
      • Accessible code
    • Ownable Crafting Tables
      • Dependencies
      • Accessible code
      • Common Problems
    • Evidence System
      • Dependencies
      • Accessible code
      • Installation
      • API
    • Marketplace V2
      • Accessible code
      • Installation
      • Migration from V1
    • EMS Dispatch
      • Sending Dispatch
      • Accessing the Menu
      • Config File
    • Weed Planting
      • Accessible code
      • How to add new strain?
      • How to install
    • Advanced DarkNet System
      • Config
    • Advanced Taxi Job
      • Accessible code
      • Changelog
    • Advanced Gang Creator
      • Accessible code
      • Installation
        • QB Core
        • QBOX Core
      • API
      • FAQ
    • Advanced Private Cameras
      • ESX
        • Items
      • QBCore
        • Items
      • Accessible code
    • Advanced Elevator Creator
      • Accessible code
    • Advanced Ownable Rent Creator
      • SQL
      • ESX
      • QBCore
      • Config File
    • Advanced Job Creator
      • Installation
        • QB CORE
      • Accessible code
    • Advanced Ownable Shops
      • Installation
      • Accessible code
      • SQL
    • Advanced Ped Creator
      • SQL
      • Config File
    • Advanced Promocode Creator
      • Accessible code
      • SQL File
      • Common problems
    • Advanced Safe Zone Creator
      • Config File
    • Turf Wars
      • Ox Inventory
      • Accessible code
      • API
    • Advanced Gas Station Creator
      • Accessible code
    • Advanced Advertisements System
      • SQL File
      • Accessible code
    • Player Manager
      • Installation
      • Accessible code
    • Mechanic Job
      • Installation
      • Accessible code
      • SQL
    • Advanced Radar System
      • Accessible code
      • SQL
    • Crypto Mining
      • Installation
      • Accessible code
      • Items
      • SQL
    • Racing System
      • Accessible code
    • Car Theft
      • Accessible code
    • Advanced Solar Panels
      • Accessible Code
      • SQL
      • ESX
        • Items
      • QBCore
        • Items
    • Pilot Job
      • Accessible Code
      • ESX
        • SQL
      • QBCore
        • Metadata
        • qb-smallresources
      • QBOX
        • Metadata
    • Advanced Ownable Banks
      • Accessible Code
    • Post Office
      • Accessible Code
      • ESX
        • SQL
      • QBCore
        • SQL
      • Exports
    • Weather Sync
      • API
    • Billing System
      • Accessible code
      • SQL
      • Common problems
Powered by GitBook
On this page
  1. Paid Resources
  2. Pilot Job

Accessible Code

Shared = {
    Locale = 'en',

    Notify = {
        duration = 5000, -- miliseconds
        position = 'top-right' -- 'top' or 'top-right' or 'top-left' or 'bottom' or 'bottom-right' or 'bottom-left' or 'center-right' or 'center-left'
    },
    
    TextUI = {
        position = 'right-center' -- 'right-center' or 'left-center' or 'top-center' or 'bottom-center'
    },

    Logs = {
        enabled = true,
        webhook = '',
        servername = 'Uniq Scripts',
        color = 6579450,
        icon_url = 'https://dunb17ur4ymx4.cloudfront.net/webstore/logos/046c8efd198a2806b6ae46490f6aa780a225125e.png'
    },

    Ped = {
        model = 's_m_m_pilot_01', -- https://docs.fivem.net/docs/game-references/ped-models/
        coords = vector4(-941.3702, -2954.7119, 13.9451, 150.4045)
    },

    PlaneSpawn = {coords = vector3(-972.8835, -2999.367, 14.53625), heading = 62.36221}, -- where the plane will be spawned

    Level1Reward = 5000, -- amount of cash that will level 1 players receive after route completed, you can do math.random for random reward
    Level2Reward = 10000, -- amount of money that will level 2 players receive after route completed, you can do math.random(1000, 5000), player will receive between 1000$ and 5000$

    LegalRoute = {
        VehicleModel = "Shamal", -- plane model
        CheckPoint = vector3(1735.767, 3294.646, 40.76562) -- checkpoint for boarding passengers
    },

    IllegalRoute = {
        VehicleModel = "Vestra", -- plane model
        CheckPoint = vector3(2135.486, 4780.932, 40.14209) -- checkpoint for loading illegal goods
    },

    PoliceJobs = { -- of PoliceNotify is true then this is required
        ['police'] = true
    },
    PoliceNotify = true, -- notify police about illegal routes

    Blips = { -- https://docs.fivem.net/docs/game-references/blips/
        MainBlip = {
            Label = "Pilot Job",
            ID = 16,
            Scale = 0.9,
            Colour = 3
        },
        LegalCheckPoint = {
            Label = "Passengers",
            ID = 366,
            Scale = 0.7,
            Colour = 0
        },
        LegalCheckPoint2 = {
            Label = "Los Santos Airport",
            ID = 307,
            Scale = 0.7,
            Colour = 0
        },
        IllegalCheckPoint = {
            Label = "Illegal Goods",
            ID = 501,
            Scale = 0.7,
            Colour = 0
        }
    }
}

-- Framework
-- Pre-setuped for your framework
function sendNotify(title, description, type)
    lib.notify({
        title = title,
        description = description,
        duration = Shared.Notify.duration,
        type = type,
        position = Shared.Notify.position
    })
end

RegisterNetEvent('uniq-pilot:notify', sendNotify)

-- Text UI
function textUI(description, icon)
    lib.showTextUI(description, {
        position = Shared.TextUI.position,
        icon = icon
    })
end

function hideTextUI()
    lib.hideTextUI()
end

-- Target
exports["qtarget"]:AddTargetModel(Shared.Ped.model, {
    options = targetOptions, -- unreachable with escrow version, join our Discord Server & get open source version to access full code
    distance = 2
})
-- Discord Logs
local webhook = Shared.Logs.webhook

function logger(message)
    if Shared.Logs.enabled then
        if webhook ~= '' then
            PerformHttpRequest(webhook, function(status) end, 'POST', json.encode({
                username = cache.resource,
                embeds = {{
                    color = Shared.Logs.color,
                    title = Shared.Logs.servername,
                    description = message,
                    footer = {
                        text = os.date(),
                        icon_url = Shared.Logs.icon_url
                    }
                }}
            }), { ['Content-Type'] = 'application/json' })
        end
    end
end
Locales['en'] = {
    target = 'Start Working',
    notify = {
        transport_back = 'Transport passengers to Los Santos Airport',
        legal_finished = 'You\'ve completed the legal route, the payment has been completed',
        deliver_illegal = 'Transport illicit goods back to Los Santos Airport, exercise caution for law enforcement presence',
        illegal_finished = 'You have completed the delivery of illicit merchandise',
        board_passengers = 'Head to the GPS-marked location labeled "Passengers" and await the boarding of passengers',
        load_illegal = 'Head to Sandy Shores and load illicit merchandise',
        not_level_2 = 'You need to reach level 2 to access this route',
        spawnpoint_unavailable = 'The SpawnPoint location is currently unavailable',
        police_notify = 'Illegal goods have been loaded; you can wait for the individual responsible and apprehend them at Los Santos Airport',
    },
    text_ui = {
        board_passengers = 'Press [E] to allow passengers to board',
        unload_passengers = 'Press [E] to unload passengers',
        load_illegal = 'Press [E] to load illicit merchandise',
        offload_illegal = 'Press [E] to offload illicit merchandise',
    },
    ui = {
        level = 'Level',
        wait_illegal = 'Wait until the illegal goods have been loaded',
        wait_illegal_unload = 'Wait until the illegal goods have been unloaded',
    },
    logs = {
        finished_flight = '**%s** has just finished a flight.\n- Number of flights finished: **%s**',
        level_up = '**%s** has just leveled up as a pilot.\n- New Level: **%s**',
        money_earned = '**%s** has just finished pilot route and earned **$%s**',
    }
}
PreviousPilot JobNextESX

Last updated 1 year ago