Config

Config

To find out more about configuration please check descriptions below

Config = {
    rcs = {
        drone = {
            name = "drone",
            model = `xs_prop_arena_drone_02`,
            camOffset = { -0.125, -0.135 },
            maxDistance = 320.0,
            battery = 45 -- minutes
        },
        rc_car = {
            name = "rc_car",
            model = `rcbandito`,
            camOffset = { 0.115, 0.35 },
            maxDistance = 320.0,
            battery = 45, -- minutes
            isVehicle = true,
        }
    },
    items = {
        controller = "rc_controller",
        batteries = "rc_batteries",
        repair_kit = "rc_repair_kit"
    },
    controls = {
        vehicle = {
            { 194, "actions_exit" }
        },
        drone = {
            { 21,  "actions_increase_speed" },
            { 32,  "actions_forward" },
            { 33,  "actions_backward" },
            { 34,  "actions_left" },
            { 35,  "actions_right" },
            { 38,  "actions_up" },
            { 44,  "actions_down" },
            { 194, "actions_exit" },
        }
    }
}

New RC

Since script is dynamic, you can add new remote control vehicles at any time.

fd_rc config

First of all, add rc to config shared/config.lua, please refer to example down below. It will be named newdrone

Config =  {
    ...,
    rcs = {
        ...,
        newdrone = {
            name = "newdrone",
            model = `some_model`,
            camOffset = { -0.125, -0.135 }, -- camera offsets
            maxDistance = 320.0, -- max distance after which signal will be lost
            battery = 45 -- how much battery will drone / car have in minutes
        },
    }
}

Inventory item

Add items to ox_inventory/data/items.lua;

    ['newdrone'] = {
        label = 'New Awesome Drone',
        weight = 100,
        stack = true,
        description = "",
        server = {
            export = 'fd_rc.usedItem'
        }
    },