Setting up vehicles

Each vehicle you wish to use a police grappler on must be configured beforehand in the config.lua file. To begin, navigate to the vehicles = { section.

Configuring vehicles beforehand is required as this sets the position on the vehicle for the grappler to spawn on, ensuring it is right for each different vehicle model and not incorrectly positioned. This may take some trial and error to find the right position for each vehicle.

We'll use the model name police2 as an example to configure:

[`police2`] = {

To begin, the model name must be wrapped in this symbol: `.

This allows for runtime hashing of the model name, improving efficiency of the overall resource. The resource will not work if it is not wrapped in those symbols.

        name = "Response Car",
        boneName = "engine",

The name line allows you to set a description of the vehicle. This is mainly used for logging purposes so you'll know which vehicle a grappler was deployed onto or removed from.

The boneName line is the bone that the grappler should attach to. This should be a bone that exists on the vehicle. If you aren't sure, we recommend using the bone name engine as this exists on most vehicle models and it can be found at the front, exactly where we need the grappler bumper to be!

For a list of bone names, take a look here. Each one will not exist on every vehicle and it depends on the model you're using.

        offSet = {0.0, 1.0, -0.4},
        rotation = {0.0, 0.0, 0.0},

This section is where things may get confusing! We need to setup the offSet and rotation of the bumper relative to the boneName. Whilst the engine may be located at the front of the vehicle, we still might need to move the grappler forward slightly so it isn't sticking out as much. This allows us to do that.

offSet = {x, y, z} - This is the format of setting the offset. X moves left and right. Y moves forward and backwards, Z moves up and down. In the example, we've moved 1.0 forwards and 0.4 downwards (-).

rotation = {x, y, z} - This allows you to rotate the grappler prop along three different exis, which will likely not be required unless your bone has been incorrectly rotated on the vehicle model.

We're also here to help and if you're struggling to setup the offSet and rotation for your fleet of vehicles, we can provide assistance. To get in touch, join our Discord server, email us or send us a message on the FiveM forum.

Developer Command

We've added a developer command built into the resource to help you position the grappler onto your vehicles. To begin, head to the config.lua file and enable developerMode.

This enables the /installgrappler command in-game. To start, get into the vehicle you want to position the grappler for and run the command.

This will spawn in a new grappler prop connected to the vehicle, you can then move it around with the following keys:

Page Up / Page Down - Up and Down

Arrow Up / Arrow Down - Moving Forwards and Backwards

Arrow Left / Arrow Right - Moving Left and Right

B and N - Rotating Left and Right

Once you are happy with the positioning of the grappler, you can press ENTER to confirm the position. The offSet and rotation values will then be printed for you to copy into the config.lua file.

Commands

The resource has one command with multiple usages.

/grappler [action] Actions:

Install - You must be outside of the vehicle to install a grappler and this will proceed to set one up after performing an animation.

Deploy - Once installed and inside the vehicle, you can either deploy the grappler by command or through a keybind, which we will show you how to configure later. Once deployed, you are not able to un-deploy it without removing the grappler.

Remove - You must be outside of the vehicle to remove the grappler, this will also remove the rope from the target vehicle if applied.

Grappler Deployment Key

Using /grappler deploy whilst in an active pursuit may not be the fastest option, this is why we've added a grappler deployment key into the config.

Find the deployGrapplerKey = { section to begin configuring this.

deployGrapplerKey = {0, 246} -- By default this is set to Y

By default, we've set this to Y. The first number is the control group and the second number is the selected control.

You can find a list of controls here. We recommend leaving the control group at 0 as this is the player control group. You should find the selected control and then copy the number into the second part of the brackets to change the control.

Last updated