Configuring the resource

Configuring the Directional Spike resource is simple!

Load Distance

This is the range from which the directional spikes will load on the client. We advise that there is no need to change this distance.

loadDistance = 200.0,

Max Distance To Remove

This is the range from which the directional spikes can be removed when using the /spike remove command.

maxDistanceToRemove = 5.0,

Translations

This section allows you to customise the messages of the resource into another language. Simply edit the values between the quotation marks with the relevant translations and this will be reflected in game.

translations = {
        commandName = "spike",
        create = "create",
        remove = "remove",
        suggestion = "Create and remove directional spikes",
        suggestionHelp = "Create or remove",
        placingSpike = "Prese ENTER to finish Spike placement",
        grabObject = "Grab Object",
        rotateObject = "Rotate Object",
        changePermanence = "Change Permanence",
        permanent = "Permanent",
        temporary = "Temporary",
        cancelPlacement = "Cancel Placement",
        finishPlacement = "Place Object",
        permanenceStatus = "Directional spike is now ",
        enteringPlacementMode = "You are now in placement mode. Adjust the placement of the spike, and press ENTER to complete.",
        temporarySpikeCreated = "~g~Success: ~w~You have created a temporary directional spike.",
        permanentSpikeCreated = "~g~Success: ~w~You have created a permanent directional spike.",
        temporarySpikeRemoved = "~g~Success: ~w~You have removed your nearest temporary directional spike.",
        permanentSpikeRemoved = "~g~Success: ~w~You have removed your nearest permanent directional spike.",
        noSpikeNearby = "~r~Error: ~w~There is no spike nearby to remove.",
        noPermission = "~r~Error: ~w~You do not have permission to use this command.",
        incorrectUsage = "~r~Error: ~w~Incorrect usage. Use /spike create or /spike remove.",
        tooFarToRemove = "~r~Error: ~w~You are not in range of a directional spike.",
},

Controls

This section of the config allows you to change controls for the placement utility. The numbers are those from the relevant control, as can be found on the official FiveM documentation at https://docs.fivem.net/docs/game-references/controls/.

controls = {
        grabObject = 223,
        rotateObject = 250,
        changePermanence = 19,
        cancelPlacement = 177,
        finishPlacement = 191,
        showInstructions = 24
},

Permissions

We've added support for ESX, vRP, QBCore, QBX straight out of the box. To enable permissions for any of these, navigate to the CheckJob = { section of the permission and enable your relevant framework. You are also able to specify job names, for example:

permissions = {
    EnablePermissions = false,
    AcePermissions = {
        Enabled = true,
        Permissions = {"directionalspikes.use"}
        -- This enables ace permissions on the starchaser
    },
    -- We've added ESX integration. All you need to do is enable it below and configure which jobs can use the command
    ESX = {
        Enabled = false,
        CheckJob = {
            Enabled = false, -- Enable this to use ESX job check
            Jobs = {"police"} -- A user can have any of the following jobs, allowing you to add multiple
        }
    },
    -- We've added vRP integration. All you need to do is enable it below. Then, configure if you wish to check for groups or permissions, or even both
    vRP = {
        Enabled = false,
        CheckGroup = {
            Enabled = false, -- Enable this to use vRP group check
            Groups = {"police"}, -- A user can have any of the following groups, meaning you can add different jobs
        },
        CheckPermission = {
            Enabled = false, -- Enable this to use vRP permission check
            Permissions = {"police"} -- A user can have any of the following permissions, allowing you to add multiple
        },
    },
    -- We've added QBCore integration. All you need to do is enable it below. Then, configure if you wish to check for jobs or permissions, or even both
    QBCore = {
        Enabled = false,
        CheckJob = {
            Enabled = false, -- Enable this to use QBCore job check
            Jobs = {"police"}, -- A user can have any of the following jobs, meaning you can add different jobs
        },
        CheckPermission = {
            Enabled = false, -- Enable this to use QBCore permission check
            Permissions = {"police"}, -- A user can have any of the following permissions, allowing you to add multiple
        },
    },
    QBX = {
        Enabled = false,
        CheckJob = {
            Enabled = false, -- Enable this to use QBX job check
            Jobs = {"police"}, -- A user can have any of the following jobs, meaning you can add different jobs
        }
    },
}

Last updated

Was this helpful?