â™ģī¸Garbage Collector Pro

Being a garbage man: more fun than ever before!

FiveM Forum Post: https://forum.cfx.re/t/esx-non-esx-garbage-collector-pro-being-a-garbage-man-more-fun-than-ever-before/2255959

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

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

Installing Garbage Collector Pro

This guide will show you how to install Garbage Collector 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 Garbage Collector Pro version 1.1.0 and the installation might be different for older or newer versions.

  1. Unpack the file you downloaded before. Now there are two folders: GarbageCollectorPro and Translations

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

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

  4. Enter the Transaction ID you got with your Purchase in the TransactionID field.

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

  6. Open your servers config.cfg file and enter ensure GarbageCollectorPro in a new line.

Installing Translations

Please note that third party translations could contain malicious code and you should read through them before installing them. All translations included with your Garbage Collector Pro download are offical translations and are not containing malicious code.

The english version of Garbage Collector Pro is already pre-installed and you do not have to install any additional translations to use Garbage Collector Pro in english.

  1. Open the folder you got with your Garbage Collector Pro download. It contains two folders: GarbageCollectorPro and Translations.

  2. Open the Translations folder.

  3. Open the folder of the language you want to use. In my case German.

  4. Copy all files in there into your Garbage Collector Pro installation (the GarbageCollectorPro folder in your FiveM servers resources folder).

    1. If it asks if you want to replace or skip select Replace.

  5. Restart the script

Key System implementation

Please note that the implementation for car key systems is only included in Garbage Collector Pro version 1.4 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.

Garbage Collector Pro has an event called GarbageCollectorPro:CarSpawned that is triggered whenever a garbage truck is being spawned for the player.

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["GarbageCollectorPro:CarSpawned"] += new Action<int, string>(TargetFunction);

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

Last updated