⚙️Configuration

A clear overview of all the available configurations for the Interactions!

Here you will find everything that you need to configure in order for the heist to run perfectly. Read through the comments in file carefully to fully understand what you need to change and what not to!


Config File

Config = {}

-- Locale
Config.SetLocale = "en"
Config.Locale = {
    ["en"] = {
        ["LockedVehicle"] = "Vehicle is locked",
        ["TrunkClose"] = "You closed trunk",
        ["TrunkOpen"] = "You opened trunk",
        ["HoodClose"] = "You closed hood",
        ["HoodOpen"] = "You opened hood",
        ["DoorClose"] = "You closed door",
        ["DoorOpen"] = "You opened door",
        ["NotHaveItem"] = "You not have required item",
        ["NotHaveItems"] = "You not have required items",
        ["NotAccess"] = "You not have access to this action",
        ["NotDuty"] = "You are not on duty"
    }
}

-- Disable Options
Config.DisableOptions = {
    ["CheckInVehicle"] = true, -- This disable players use interactions from vehicles
    ["OnNuiFocus"] = true, -- This disable players use interactions on opened UI scripts
    ["OnDeath"] = true, -- This disable players use interactions on death !!!(You can configurate from bd-interact/wrapper/client/cl_main.lua for your framework)
    ["OnCuffed"] = true -- This disable players use interactions on have cuffs !!!(You can configurate from bd-interact/wrapper/client/cl_main.lua for your framework)
}

-- Press Timeout
Config.PressTimeout = 1000 -- Timeout for keypress

-- Default Distances
Config.DefaultDistance = 5.0
Config.DefaultInteractDistance = 1.0

-- Nearby Vehicles
Config.NearbyVehiclesDistance = 4.0
Config.NearbyVehiclesUpdateInterval = 2500

-- Nearby Objects
Config.NearbyObjectsDistance = 4.0
Config.NearbyObjectsUpdateInterval = 2500

-- Nearby Players
Config.NearbyPlayersDistance = 4.0
Config.NearbyPlayersUpdateInterval = 2500

-- Default Vehicle Bones
Config.EnableDefaultVehicleBones = true
Config.DefaultVehicleBones = {
    ["boot"] = {
        distance = 3.0,
        interactDst = 1.7,
        options = {
            {
                label = "Open Trunk",
                event = "bd-interact:openTrunk"
            }
        }
    },
    ["bonnet"] = {
        distance = 3.0,
        interactDst = 1.7,
        options = {
            {
                label = "Open Hood",
                event = "bd-interact:openHood"
            }
        }
    }
}

Examples

-- Options format
{
    label = "BD Interact",
    canInteract = function(entity, options)
        return true
    end,
    action = function(entity, options)
        print(entity, json.encode(options))
    end,
    isServer = false,
    event = "bd-interact:clientEvent",
    apple = 93, -- You can add custom params
    peach = 12,
}

RegisterNetEvent('bd-interact:clientEvent', function(options)
    print("Apple number: "..options.apple)
    print("Peach number: "..options.peach)
end)

Last updated