English TaskForce Radio Check

  • Auteur de la discussion Auteur de la discussion I'm the Boss
  • Date de début Date de début

I'm the Boss

Admin
2/1/20
657
3
43
1 100
This tutorial will allow you to add a black screen telling the player who are not present on your TaskForce Radio channel on teamspeak to join it
You must have TaskForce Radio installed beforehand

___
1 - System installation

  • Rendez-vous dans votre dossier mission puis dans le dossier core puis dans le fichier init.sqf
  • A la fin du fichier ajoutez le code suivant :

  • Go to your mission folder then to the core folder then to the init.sqf file
  • At the end of the file add the following code:

Code:
Développer Réduire Copier
/*
    Author: Maxence for The Programmer Forum

    Description: Task Force Radio Check
*/
[] spawn {
    _teamspeakName = "My Teamspeak Server";
    _temspeakAdress = "ts.myserver.com";
    _channelName = "TaskForceRadio";

    // Editing code below is not recommended
   _isAdmin = false;
    if !(isNil "life_adminlevel") then {
        if ((call life_adminlevel) > 0) then {
            _isAdmin = true;
            titleText ["The presence check in the Radio Task Force channel is disabled as you are admin !","BLACK IN"];
        };
    };
    if (_isAdmin) exitWith {};

    if (isNil "TFAR_fnc_isTeamSpeakPluginEnabled") exitwith {
        999999 cutText ["Radio Task Force is not enabled on your computer. Please re-synchronize and try again","BLACK FADED"];
        999999 cutFadeOut 99999999;
    };

    _tfarEnabled = true;
    _playerOnTeamspeak = true;
    _playerInChannel = false;
    _sleep = 2;
    _alreadyKnow = false;

    while {true} do {
        if !([] call TFAR_fnc_isTeamSpeakPluginEnabled) then {
            titleText ["Please enable Radio Task Force in your teampeak plugins ! To do this, go to the teamspeak settings tab then plugins and enable it", "BLACK"];
            _tfarEnabled = false;
        } else {
            _tfarEnabled = true;
        };

        if !(_teamspeakName == (call TFAR_fnc_getTeamSpeakServerName)) then {
            titleText [format ["Please join our teamspeak : %1",_temspeakAdress], "BLACK"];
            _playerOnTeamspeak = false;
        } else {
            _playerOnTeamspeak = true;
        };

        if !(_channelName == (call TFAR_fnc_getTeamSpeakChannelName)) then {
            titleText ["Please reload your Task Force Radio plugin to be moved to the voice channel! To do this, go to the teamspeak settings then plugins and press the "relaod" button", "BLACK"];
            _playerInChannel = false;
        } else {
            _playerInChannel = true;
        };

        if (_tfarEnabled && _playerOnTeamspeak && _playerInChannel) then {
            if !(_alreadyKnow) then {
                titleText ["Radio Task Force is well initialized, welcome !","BLACK IN"];
                _alreadyKnow = true;
            };
            _sleep = 5;
        } else {
            _alreadyKnow = false;
            _sleep = 2;
        };
       
        sleep _sleep;
    };
};
Change the values of the first 3 lines respectively by the name of your teamspeak, the login address of your teamspeak and the name of the Radio Task Force channel on your teamspeak
 
Dernière édition par un modérateur:
Activité
Pour l'instant, il n'y a personne ici