[Traffic System] Have access to the menu with a condition (license, ...)

Mathis

TP-Forum Team
Membre du personnel
Welcome to this tutorial that will allow you to access the Traffic System menu with a condition such as a license instead of allowing a whole side ;)
This can be used to give, for example, access to the menu to repairman or to a job.
This tutorial follows a user's request for help on Discord.

Let's go !


In your @The_Programmer/addons/traffic_system/server/fn_initAllGroups.sqf, search theses lines :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
And replace theses lines by :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !

Replace your @The_Programmer/addons/traffic_system/client/fn_controlMenu.sqf by :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !

And finally, in the script's config_master (in the mission), find these lines :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
And replace them by :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !

Two examples :

For one license only :
condition_open_menu = "license_civ_VARIABLE";
For a license or cop or medic : condition_open_menu = "(license_civ_VARIABLE || (playerSide in [west, independent]))";
In both cases, replace VARIABLE by the variable of the concerned license.

And now, it's ready!

Sincerely,
Forum Manager - Mathis