FPV Drone

36€

Turn into an FPV pilot with this script !
You can pilot a drone using the keyboard and mouse as well as a controller !
You can configure the dynamics of the drone to adjust it to your liking !


✅ Realistic drone physics
✅ Keyboard and mouse controls
✅ Controller controls
✅ Three flight models provided : an aggressive, a regular and a relaxed FPV drone
✅ Animation when placing the drone on the floor and when controlling the drone
✅ Customizable physics parameters (mass, linear drag, angular drag, propeller force, 3D mode)
✅ Customizable camera position (translation and rotation)
✅ Customizable camera effects
✅ As many drone as you want
✅ Customizable battery duration (can be infinite)
✅ Customizable health to drones (destroyed if shot, can be invincible)
✅ Notifications (configurable)
✅ Customizable maximum range (can be infinite)
✅ HUD with battery state, range, altitude, speed
✅ Customizable keybind (quit drone view and hide hud)
✅ Customizable input script (roll, pitch, yaw, throttle)
✅ Client export to check if player controls of the drone
✅ Fully standalone
✅ Compatible with any framework
✅ Option to enable the use of ESX items
✅ Drone make sounds and pitch changes relative to propeller speed (customizable, deactivable)
✅ Whitelisted controls (Comes preconfigured for identifiers, ESX, QB-Core and ACE)
⚠️ Requires OneSync (Not working with OneSync Legacy)
⚠️ Uses FiveM Asset Escrow system

1.3.5

✅ Update whitelist to latest ESX


1.3.4

✅ Add pickup interaction (pressing E close to the drone)


1.3.3

✅ Add whitelisting
✅ Bugfix GetNetworkObject


1.3.2

✅ Drone make sounds and pitch changes relative to propeller speed
✅ Deactivable drone sound on each drone
✅ Customizable sound on each drone
✅ Fine tune pitch of each drone


1.3.1

✅ Option to enable the use of ESX items


1.3.0

✅ Inputs can be customized


1.2.0

✅ Add maximum range
✅ Add HUD with battery state, range, altitude, speed
✅ Customizable keybind (quit drone view and hide hud)
✅ Client export to check if player controls of the drone


1.1.0

✅ Add battery duration (drone can't be controlled after that)
✅ Battery can be infinite
✅ Add damage to drones (destroyed if shot)
✅ Drones can be invincible
✅ Add notifications (can be configured)


1.0.0

✅ Realistic drone physics
✅ Keyboard and mouse controls
✅ Controller controls
✅ Three flight models provided : an aggressive, a regular and a relaxed FPV drone
✅ Command to spawn, control and destroy the drone
✅ Animation when placing the drone on the floor
✅ Animation when controlling the drone
✅ Customizable physics parameters (mass, linear drag, angular drag, propeller force, 3D mode)
✅ Customizable camera position (translation and rotation)
✅ Customizable camera effects
✅ Add as many drone as you want
✅ Fully standalone
✅ Compatible with any framework


Nabla.LogLevel = Nabla.LogLevels.WARN -- Log levels are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (default is WARN)

Config = {

  -- Please check our FAQ if you have any question : https://fivem.nabla.sh/faq

  -- List of players who have access to the actions, set WhiteListEnabled = true/false to enable/disable the whitelist
  WhiteListEnabled = false,
  WhiteList = {
    'ip:192.168.168.35',
    'steam:12345',
    'mechanic',
    'mechanic:5',
    'nabla.drone', -- To use with ACE, add this to your server.cfg : add_ace identifier.YOURIDENTIFIER nabla.drone allow
  },

  -- Keybinds, you can choose from here : https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/
  DefaultControls = function()
    RegisterKeyMapping('+drone_leave', 'Drone - Quit', 'KEYBOARD',   'BACK') -- Leave drone view
    RegisterKeyMapping('+drone_hud',   'Drone - HUD',  'KEYBOARD',      'H') -- Hide HUD
  end,

  -- If you want to force the use of items through ESX set this to true
  -- Don't forget to also add the items in the database (see esx.sql)
  ESX_Items = false,

  -- Range under which a notification will be displayed to picup the drone (set to 0.0 to disable)
  PickupRange = 1.5,

  Strings = {
    ['already']    = "You already placed a drone",
    ['no_drone']   = "You didn't placed a drone",
    ['no_battery'] = "Your drone doesn't have any battery left",
    ['destroyed']  = "Your drone was destroyed",
    ['wait_destroyed']  = "Your drone was destroyed, wait a little before deploying a new one",
    ['too_far']         = "Your drone is too far for you to control it",
    ['e_pickup']        = "Press ~INPUT_CONTEXT~ to pickup the drone",
    ['hud1'] = " Battery~%s~ %d %%~w~\n",
    ['hud2'] = "Range ~%s~%d m~w~\n",
    ['hud3'] = "Altitude ~g~%d m~w~\n",
    ['hud4'] = " Speed ~g~%.1f m/s~w~\n",
  },

  LowBattery = 20, -- In percentage
  RangeWarning = 80, -- Range turns red when at 80% of max distance, static increases

  Drones = {
    ["fpv1"] = {
      hash = GetHashKey("ba_prop_battle_drone_quad"), -- Drone model
      camera = {
        fov = 100.0, -- Field of view of camera
        t = vector3(0.0, 0.0, 0.0), -- Translation from center of drone to camera
        r = vector3(20.0, 0.0, 0.0), -- Rotation from center of drone to camera
        effect = { -- Effect on the camera, can be removed by deleting it (https://wiki.rage.mp/index.php?title=Timecycle_Modifiers)
          name = "scanline_cam",
          min  = 1.0,
          max  = 4.0,
        },
      },
      physics = { -- Physics parameters
        f = 100.0, -- Force of the up/down motion
        reverse = true, -- Can the propellers go in the reverse direction (ie make the drone go down)
        r  = vector3(1.0, 1.0, 1.0), -- Rotation sensitivity
        Dl = vector3(0.01, 0.01, 0.01), -- Coefficient of linear drag
        Dw = vector3(0.5, 0.5, 0.5), -- Coefficient of angular drag
        mass = 1.0 -- Mass of the drone
      },
      battery = -1, -- Battery time (in minutes), set to -1 for infinite
      invicible = false, -- Is the drone invicible to damage ?
      range = 200.0, -- Range of control of the drone, set to -1 for infinite
      sound = {
        enable = true,        -- Enable or disable sound
        file   = 'drone.ogg', -- File used for the sound (in NUI/sounds/)
        volume = 0.25,        -- Max volume when closest
        range  = 30.0,        -- Max range for hearing sound
        rate = {              -- Control sound rate
          min = 0.75,         -- Min rate of sound (low  pitch)
          max = 2.0,          -- Max rate of sound (high pitch)
        },
      },
    },

    ["fpv2"] = {
      hash = GetHashKey("ba_prop_battle_drone_quad"),
      camera = {
        fov = 100.0,
        t = vector3(0.0, 0.0, 0.0),
        r = vector3(20.0, 0.0, 0.0),
        effect = {
          name = "scanline_cam",
          min  = 1.0,
          max  = 4.0,
        },
      },
      physics = {
        f = 80.0,
        reverse = true,
        r  = vector3(0.5, 0.5, 0.25),
        Dl = vector3(0.01, 0.01, 0.01),
        Dw = vector3(0.5, 0.5, 0.5),
        mass = 1.0
      },
      battery = 20,
      invicible = false,
      range = 200.0,
      sound = {
        enable = true,
        file   = 'drone.ogg',
        volume = 0.25,
        range  = 30.0,
        rate = {
          min = 0.75,
          max = 2.0,
        },
      },
    },

    ["hornet"] = {
      hash = GetHashKey("ba_prop_battle_drone_hornet"),
      camera = {
        fov = 75.0,
        t = vector3(0.0, 0.0, 0.0),
        r = vector3(20.0, 0.0, 0.0),
        effect = {
          name = "scanline_cam",
          min  = 1.0,
          max  = 4.0,
        },
      },
      physics = {
        f = 75.0,
        reverse = false,
        r  = vector3(0.1,  0.1, 0.1),
        Dl = vector3(0.1, 0.01, 0.01),
        Dw = vector3(1.0, 0.5, 0.5),
        mass = 1.0
      },
      battery = 20,
      invicible = false,
      range = 200.0,
      sound = {
        enable = true,
        file   = 'drone.ogg',
        volume = 0.25,
        range  = 30.0,
        rate = {
          min = 2.0,
          max = 2.0,
        },
      },
    },
  },
}

local prev = nil
function ShowNotification(message)
  if prev ~= nil then
    RemoveNotification(prev)
  end
  AddTextEntry(GetCurrentResourceName().."Notif", Config.Strings[message])
  BeginTextCommandThefeedPost(GetCurrentResourceName().."Notif")
  prev = EndTextCommandThefeedPostTicker(false, false)
end

function DisplayHelpText(lineOne, lineTwo, lineThree)
  BeginTextCommandDisplayHelp("THREESTRINGS")
  AddTextComponentSubstringPlayerName(lineOne)
  AddTextComponentSubstringPlayerName(lineTwo or "")
  AddTextComponentSubstringPlayerName(lineThree or "")
  EndTextCommandDisplayHelp(0, 0, 0, -1)
end
Keybind / Command Action
/drone_place *model*Place a drone
/drone_controlControl the placed drone
/drone_destroyDestroy the placed drone
Z / SCollective
Q / DYaw
MousePitch / Roll
HHide HUD
EPickup the drone
BackspaceStop controlling the drone
5
  • 1
  • 0
  • 0
  • 0
  • 0
  • Jasonleepascal

    14/4/2022

    Like : Its so fucking Cool xD one of the best scripts i invested in xD
    Dislike : No Why?