Misc Configuration Values

We've got some misc configuration values which can be changed if needed. To take a look, open the config.lua file and navigate to the main = { section.

main = {
    frameRotation = 115,
    percentageChance = 60, -- % This is the percentage chance of the spike being effective on another vehicle. 100% means it will work every time when deployed correctly. Minimum of 1%
    radiusToAttachToVehicle = 2.0, -- Set this higher if issues with bursting tyres
}

frameRotation - This determines the rotation of the Mobile Spike when it is deployed and ready to be used on a vehicle. If you're finding that it is too highly rotated and not able to properly hook under a car onto the tyres, you may wish to decrease/increase this number to change this. This will require trial and error to find out what works best for your server.

percentageChance - This is the percentage chance of the spike being effective and bursting the tyre of a target vehicle when used. This number must be set between 0 and 100. 100 will mean that the Mobile Spike will be effective every time when used correctly, by default this is set to 60%.

radiusToAttachToVehicle - This setting determines how close your Mobile Spike needs to be to the tyre in order to burst it. This can be changed to take into account de-sync and anything causing lag on your server, so you may want to extend this if you're struggling to use the spikes effectively.

Discord Logging

We've integrated Discord Logging straight out of the box. You'll be able to receive logs straight into a channel for everything that happens in relation to the Mobile Spike, including installation, deployment, being used on a vehicle and then being removed.

To begin, navigate to your Discord Server and make a new channel or choose an existing one where the logs should be sent to.

Next, follow this tutorial by Discord to create a Webhook Integration.

Now you have created a webhook, copy this and open the sv_utils.lua file. At the top, you should see:

logging.webhook = "https://discord.com/api/webhooks/"

Paste your webhook within the speech marks and you can now move on to configuring the contents and appearance of the webhooks.

To do this, navigate back to the config.lua file and find the section titled logging = {.

logging = {
        enabled = true,
        displayName = "Mobile Spike",
        colour = 31487,
        title = "**New Log**",
        icon = "https://i.imgur.com/n3n7JNW.png",
        footerIcon = "https://i.imgur.com/n3n7JNW.png",
        dateFormat = "%d-%m-%Y %H:%M:%S", -- Day-Month-Year Hour-Minute-Second
},

If you want to enable logging, make sure this is enabled as such in the config under the logging section.

The displayName property determines the name that the webhook will use when logging events from the resource into your selected channel.

The colour property sets the colour of the embedded messages. This uses a decimal colour system, you can select a colour here. This is different to hexadecimal so ensure you have copied the right value after selecting a colour.

The title simply sets the title of the logs.

The icon and footerIcon properties decide the images that are displayed, one of which is in the footer and one larger, next to the logged data. By default, we've configured this to the London Studios logo.

The dateFormat property allows you to decide how the date and time is formatted in the timestamp part of the log, showing you the exact time of the action. You can configure this to just show the date for example, removing hours, minutes and seconds if you wish to do so.

Animation & Sound

We've added an animation for setting up/removing the Mobile Spike and also a sound for when it is deployed inside the vehicle. This can be configured below. Firstly, open the config.lua file.

Animation

Navigate to the animation = { section.

animation = {
    enabled = true,
    dict = "mini@repair",
    name = "fixing_a_ped"
}

Setting enabled to false will allow you to disable the animation, allowing the Mobile Spike to be setup instantly rather than going through an animation process each time. We've enabled this by default as it is realistic to have to install it on the vehicle every time.

dict - This is the animation dictionary. name - This is the animation name.

You can find a list of animations here. The left column is the dictionary and the right column is the name. By default, we've configured an animation which we believe will work for most servers.

Sound

Navigate to the mobilespikeSound = { section.

mobilespikeSound = {
    enabled = true,
    soundName = "Activate_Trap",
    soundDict = "DLC_AW_Trap_Controller_Sounds",
}

By default, we've configured this to play a beep sound for all passengers in the vehicle that the Mobile Spike is deployed in. Deployment means when the Mobile Spike is lowered, ready to be used.

Setting enabled to false will disable the deployment sound.

soundName - This is the sound name. soundDict - This is the sound dictionary.

A list of frontend sounds can be found here.

Last updated