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 !
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_control | Control the placed drone |
/drone_destroy | Destroy the placed drone |
Z / S | Collective |
Q / D | Yaw |
Mouse | Pitch / Roll |
H | Hide HUD |
E | Pickup the drone |
Backspace | Stop controlling the drone |
14/4/2022
Like : Its so fucking Cool xD one of the best scripts i invested in xD
Dislike : No Why?