Configuration

This page explains all available configuration options for the resource, allowing you to customize its behavior, features, and framework compatibility.

config.lua
Config = {
    Framework = "auto",
    Inventory = "auto",
    Hud = "auto",
    VoiceChat = "auto",

    NotifyType = "ox_lib",
    Notify = function(message, type, serverSource)
        type = type or "info"

        if IsDuplicityVersion() then
            if Config.NotifyType == "framework" then
                Framework.Notify(serverSource, message, type)
            elseif Config.NotifyType == "ox_lib" then
                TriggerClientEvent('ox_lib:notify', serverSource, { id = "future_drone:notification", description = message, type = type, duration = 5000, position = "top" })
            elseif Config.NotifyType == "chat" then
                TriggerClientEvent('chat:addMessage', serverSource, { args = { "[Drone]", message } })
            elseif Config.NotifyType == "standalone" then
                -- Add your own function
            end
        else
            if Config.NotifyType == "framework" then
                Framework.Notify(message, type)
            elseif Config.NotifyType == "ox_lib" then
                TriggerEvent('ox_lib:notify', { id = "future_drone:notification", description = message, type = type, duration = 5000, position = "top" })
            elseif Config.NotifyType == "chat" then
                TriggerEvent('chat:addMessage', { args = { "[Drone]", message } })
            elseif Config.NotifyType == "standalone" then
                SetNotificationTextEntry("STRING")
                AddTextComponentString(message)
                DrawNotification(false, true)
            end
        end
    end,

    Drones = {
        ['normal_drone'] = {
            Name = "drone",
            Model = "future_drone_prop",
            Fov = 50.0,
            MaxSpeed = 12.0,
            Acceleration = 0.6,
            Deceleration = 0.5,
            CameraSensitivity = 7.5,
            VisionModes = {
                NightVision = true,
                ThermalVision = false, 
            },
            StatusModes = {
                FollowSuspect = false,
                SuspectMode = false,
                BoostDrone = {RechargeTime = 10000, Duration = 5000, SpeedMultiplier = 1.5},
                SpeakerDrone = {Proximity = 15.0},
            },
            Abilities = {
                TaserMode = false,
                DroneBomb = false,
                AutoReturn = {RelativeMaxHeight = 50.0},
                MissileMode = false,
            },
            MaxHits = 3,
            BatteryConsumption = 10.0,
            Range = 250.0,
            JobCheck = false,
            AllowedJobs = {},
        },
    },

    Operator = {
        PlacementAnimation = {
            Dict = 'anim@mp_fireworks', 
            Name = 'place_firework_box2'
        },
        IdleAnimation = {
            Dict = "amb@code_human_in_bus_passenger_idles@female@tablet@idle_a",
            Name = "idle_a",
        },
        CanDeployUnderRoofs = false,
    },

    Camera = {
        DefaultDistortion = 0.1,
    },

    Utilities = {
        BlackListedMasksDrawables = { 
        --[[
            [mask_drawable_id] = true,
            [mask_drawable_id] = true,
        ]]
        },
    },

    Use = {
        Type = 'item',
    },

    Lang = {
        -- ...
    },
}
  • Framework - The framework your server uses.

  • Inventory - The inventory system your server uses.

  • Hud - The hud system your server uses.

  • VoiceChat - The voice chat system your server uses.

  • NotifyType - The type of notification the script will use.

  • Notify - Declaration of the shared notify function (use to add your own notify type).

  • Drones - Declaration of the various drone types and their properties.

    • Index - String to identify the drone (must be unique and is used internally by the script).

    • Name - Used for the drone's item name or command.

    • Model - The model name of the drone object.

    • Fov - Default field of view for the drone camera.

    • MaxSpeed - Maximum velocity of the drone object.

    • Acceleration - Acceleration rate of the drone object.

    • Deceleration - Deceleration rate of the drone object.

    • CameraSensitivity - Responsivity of the drone camera to mouse movements.

    • VisionModes - Available vision modes of the drone camera.

      • NightVision - Toggle the night vision option.

      • ThermalVision - Toggle the Thermal vision option.

    • StatusModes - Available status modes of the drone.

      • FollowSuspect - Toggle the follow suspect option.

      • SuspectMode - Toggle the suspect mode option.

      • BoostDrone - Toggle the boost option.

        • RechargeTime - The time it takes for the boost effect option to recharge in milliseconds.

        • Duration - The duration of the boost effect.

        • SpeedMultiplier - The multiplier of top speed that the effect applies to the drone object.

      • SpeakerDrone - Toggle the speaker option.

        • Proximity - The maximum distance that the operator would be heard at.

    • Abilities - Available abilities of the drone.

      • TaserMode - Toggle the taser option.

        • RechargeTime - The time it takes for the taser to recharge in milliseconds.

      • DroneBomb - Toggle the bomb option.

      • AutoReturn - Toggle the auto return option

        • RelativeMaxHeight - The maximum height at which the auto return will stop climbing up to find a clear line of sight to the operator.

      • MissileMode - Toggle the misslie option.

        • MaxRange - The maximum range of the missiles.

        • MaxMissiles - The amount of missiles the drone is equipped with.

        • RechargeTime - The time it takes for the missile launcher to reload in milliseconds.

    • MaxHits - The maximum number of hits the drone is capable of taking before being destroyed.

    • BatteryConsumption - The amount of battery the drone uses every minute.

    • Range - The maximum range the drone can fly away to.

    • JobCheck - Weather the drone can only be used by players with specified jobs.

    • AllowedJobs - List of job names that can use the drone if JobCheck is toggled on.

  • Operator - Settings related to the drone operator.

    • PlacementAnimation - The animation played upon placing the drone.

      • Dict - The dictionary name of the animation.

      • Name - The name of the animation.

    • IdleAnimation - The animation played when using the drone.

      • Dict - The dictionary name of the animation.

      • Name - The name of the animation.

    • CanDeployUnderRoofs -

  • Camera - Settings related to the camera.

    • DefaultDistortion - The base distortion effect of the drone camera.

  • Utilities - General settings.

    • BlackLIstedMasksDrawables - List of mask drawables that do not hide the identity of the player detected by suspect mode.

  • Use - Settings related to the use of the drone.

    • Type - The deployment type of the drone.

  • Lang - A list of strings that can be translated.

Last updated