Setting up vehicles

Each vehicle you wish to use a police tracker 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 tracker unit 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 tracker was deployed onto or removed from.

The boneName line is the bone that the tracker 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 tracker unit 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 tracker 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 tracker onto your vehicles. To begin, head to the config.lua file and enable developerMode.

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

This will spawn in a new tracker unit 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 tracker, 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.

Tracker Deployment Key

Find the controls = { section of the config.lua file to begin configuring this.

controls = {
    ready = {0, 73}, -- X by default
    deploy = {0, 246}, -- Y by default
}

By default, we've set X to the ready mode. This means your tracker will be ready to shoot. Once you are behind a vehicle and you see a green line appear, you can press Y to deploy.

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