RE:Sync
HexscriptsClassicAirdrop

Configurations

Here you will get all configurations & open source files that are included within this script.

Config Files

Config = {}

Config.Debug = false --Read the NOTE at the Bottom of this File!

Config.FrameWork = {
    name = 'ESX', --ESX or QB

    loadFunc = function() --Your Framework Load Function
        return exports['es_extended']:getSharedObject()
    end,

    addWeapon = function(player, weapon)
        if Config.FrameWork.name == 'ESX' then
            local xPlayer = ESX.GetPlayerFromId(source)

            xPlayer.addWeapon(weapon, 1)
        elseif Config.FrameWork.name == 'QB' then
            exports['qb-inventory']:AddItem(source, itemName, 1)
        end
    end,

    canAutoDrop = function() --Server Side Function
        return true
    end
}

--[[
    Config.FrameWork.loadFunc Examples:

    local retObj = nil
    TriggerEvent('esx:getSharedObject', function(obj)
        retObj = obj
    end)
    return retObj

    return exports['es_extended']:getSharedObject()

    IMPORTANT INFO FOR QB-CORE SERVERS!!!

    return exports['qb-core']:GetCoreObject()
    
    Add this Code at Bottom of your [qb-core/shared/items.lua]:
    local function GetItems()
        return QBShared.Items
    end
    exports('GetAllItems', GetItems)
]]

Config.Command = 'hexdrop'
--[[
    Commands Examples:
    -> You want to Spawn a Airdrop at your Position?
        Type: /hexdrop spawn
    -> You want to Despawn the Airdrop?
        Type: /hexdrop despawn
    -> To insert Loot into the closest Airdrop use the Following Command:
        Type: /hexdrop addLoot phone 5
            -> This will add 5 Phones to the Airdrop.
        Type: /hexdrop addLoot WEAPON_PISTOL 1
            -> This will add a Pistol with 1 Bullet.
    -> What does the Airdrop Contain?
        Type: /hexdrop getLoot
            -> This will print the Loot of the Closest Drop to your F8 Console.
    -> You want to Remove a Item/Weapon from the Airdrop?
        Type: /hexdrop removeLoot WEAPON_PISTOL
            -> This will Remove the Pistol from the Airdrop. You can also use Item Names like /hexdrop removeLoot phone
]]

Config.Admins = { --People that are Allowed to use the /Config.Command
    'steam:12345',
    'steam:1234',
    'steam:123',
    'steam:12',
    'steam:1',
}

Config.DropHack = {
    speed = 1, --1 = Very Slow 3 = Fast
    maxRange = 7.5, --Max Range of the Hack Zone
    allowVeh = false, --Allow Players to Stay in Vehicles
    color = { r = 100, g = 0, b = 0, a = 0.175 } --Max Range Zone Color
}

Config.AutoDrops = {
    enabled = false, --If enabled The Server will Spawn Each Interval Seconds amount Drops at Random Position from spots!
    interval = 3600, --Each Hour
    amount = 3, --3 Drops
    spots = { --Random Spots where the 3 Drops will Spawn
        vector3(-106.4571, 911.3854, 236.1454),
        vector3(-477.1682, 1531.6722, 391.5696),
        vector3(-2359.0679, 1328.9720, 335.3317),
        vector3(-2143.1848, 3021.7249, 32.8266),
        vector3(-1148.1393, 4924.8457, 221.1727),
        vector3(-1157.2871, -3147.8662, 13.9444),
    },
    loot = { --Random Loot Inside of the Auto Drops
        ['WEAPON_PISTOL'] = 1, --For Weapons the Number = Ammo
        ['phone'] = 5 --For Items the Number = Amount
    }
}

Config.Blip = { --Blip Settings
    enabled = true,
    sprite = 94, --https://wiki.rage.mp/index.php?title=Blips#Blip_model
    color = 1, --https://wiki.rage.mp/index.php?title=Blips#Blip_colors
    scale = 1.25, --Blip Size
    short = false, --Short Range
    text = 'HEX Airdrop', --Text
}

Config.Locales = {
    ['dropSpawned'] = 'Ein Airdrop wurde Registriert!',
    ['dropAlreadyHere'] = 'Hier ist bereits ein Airdrop!',
    ['dropNotFound'] = 'Airdrop nicht gefunden!',
    ['dropInvalidParamter'] = 'Ungültiger Paramter!',
    ['dropInvaldLootInput'] = 'Ungültiges Item/Waffe!',
    ['dropLootInserted'] = 'Erfolgreich hinzugefügt!',
    ['dropLootRemoved'] = 'Erfolgreich Entfernt!',
    ['dropLooted'] = 'Drop Erfolgreich Looted!',
    ['dropInvalid'] = 'Drop Existiert nicht!',
    ['dropHack'] = 'Drücke E um den Airdrop zu Hacken!',

    ['dropHacking'] = 'Hacking Drop:'
}

if IsDuplicityVersion() then --Notify Function for Server&Client
    Config.Notify = function(id, title, message) --Server Notify Function
        TriggerClientEvent('hex_hud:notify', id, title, message, 'info')
    end
else
    Config.Notify = function(title, message) --Client Notify Function
        TriggerEvent('hex_hud:notify', title, message, 'info')
    end
end

--[[
    NOTE:
    Support for the Scripts is only available on our Discord.
    Open a Ticket and describe your Problem there.
    Please work with the Config.Debug to make sure our Team can work as fast as possible with your problem.
    [Enabling the Debug means printing out Data to the Console. This Data is needed for Support in our Discord.
    You dont need to have the Debug turned on if the Script works Perfect for you, just gives you/your Developer Information
    about what the Script currently does!]
]]

On this page