đŸĒTow Truck Pro

We all know it: Driving in Los Santos is hard and there are a lot of car crashes, but no one is towing these broken cars away. Well, now you can become a tow truck driver.

FiveM Forum Post: https://forum.cfx.re/t/tow-truck-pro-the-ultimate-tow-truck-job-codineer/4771828

YouTube Video: https://www.youtube.com/watch?v=mEZ8t5kfhEo

Download: https://garmingo.com/games/tebex/4736363

Installing Tow Truck Pro

This guide will show you how to install Tow Truck Pro.

This guide is very detailed but the basics that are always the same can be found in the Installation tutorial and should be enough for most server owners.

Please note that this guide is written for Tow Truck Pro version 1.1 and the installation might be different for older or newer versions.

  1. Unpack the file you downloaded before.

  2. Copy the TowTruckPro folder to your FiveM servers resources folder.

  3. Open the config.json file included in your just copied TowTruckPro folder.

  4. Edit the config file to your likings and close it (do not forget to save).

  5. Open your servers config.cfg file and enter ensure TowTruckPro in a new line.

Key System implementation

Please note that the implementation for car key systems is only included in Tow Truck Pro version 1.1 or newer.

Please note that this is a client side event. If your car key system needs server side implementation you will have to implement the bridge yourself.

Tow Truck Pro has an event called TowTruckPro:CarSpawned that is triggered whenever the player spawns his truck.

Parameters

  1. Vehicle Handle

    Can be used to retrieve the vehicle object or for native calls

  2. License Plate

    Can be used as identifier for some key resources

Example implementation

C# Example
EventHandlers["TowTruckPro:CarSpawned"] += new Action<int, string>(TargetFunction);

private void TargetFunction(int handle, string plate)
{
    myKeyScript.unlockCar(handle);
}
Lua Example
AddEventHandler("TowTruckPro:CarSpawned", function(handle, plate)
    myKeyScript.unlockCar(handle)
end)
JS Example
on('TowTruckPro:CarSpawned', (handle, plate) => {
    myKeyScript.unlockCar(handle);
});

Last updated