Jump to content
David

[Tutorial] Task force Radio Black screen when not in channel ETC.

Recommended Posts

Author: IDK

Edited: David (variables, flash times, text and how it checks stuff)

G'day,

Here is some code that will make the player screen flash black if they either aren't in the "TaskForceRadio" Channel, haven't enabled the plugin or have any other errors to do with TFAR.


Tutorial:

Open your Mission file: e.g. Altis_Life.Altis

Go to "core\init.sqf" and add the following either at the very bottom of the file, making sure to edit where I have told you to!!!

if (isNil "TFAR_fnc_isTeamSpeakPluginEnabled") exitwith {
	
	999999 cutText ["Task Force Radio is not running on your computer. Please re-sync and retry","BLACK FADED"];
	999999 cutFadeOut 99999999;
	if (player getvariable "taskfr") then {
		player setvariable ["taskfr",false,true];
	};
};



_TFenabled = [] call TFAR_fnc_isTeamSpeakPluginEnabled;

if (!(_TFenabled)) then {

	while {!([] call TFAR_fnc_isTeamSpeakPluginEnabled)} do {
		
		titleText ["Please enable Task Force Radio in your TS3 Plugins! || TS3 -> Settings -> Plugins", "BLACK"];
		sleep 2;
		if (player getvariable "taskfr") then {
		player setvariable ["taskfr",false,true];
		};
	};
};

Dvid_TFEnabled = true;
Dvid_onTsServer = "Your TS Server Name There" == (call TFAR_fnc_getTeamSpeakServerName); ///////////////////////Edit This line (the channel at the top of your TS (where you right click and "Edit Virtual Server"), yes, get the name of that goes here)
Dvid_onChannel = "TaskForceRadio" == (call TFAR_fnc_getTeamSpeakChannelName);
titleText ["Task Force Radio loaded succesfully","BLACK IN"];

[] spawn {

	while {true} do {
	
				_isadmin = false;
				if (!(isNil "life_adminlevel")) then {
					_adminlvl = life_adminlevel call BIS_fnc_parseNumber;
					
					if (_adminlvl > 0) then {
						_isadmin = true;
					};
				};
				
				
				
					_TFenabled = [] call TFAR_fnc_isTeamSpeakPluginEnabled;
					if ((!(_TFenabled)) && (Dvid_TFEnabled)) then {
					if (!(_isadmin)) then {
						titleText ["Please enable Task Force Radio in your TS3 Plugins! || TS3 -> Settings -> Plugins", "BLACK"];
						Dvid_TFEnabled = false;
					};
							if (player getvariable "taskfr") then {
								player setvariable ["taskfr",false,true];
							};
					};
					
					_onTsServer = "same as Dvid_onTsServer variable " == (call TFAR_fnc_getTeamSpeakServerName); //////////////////////Edit too pls, or dont but it wont work if you dont
					if (!(_onTsServer)) then {
					if (!(_isadmin)) then {
						titleText ["Please join the teamspeak server! Adress: here", "BLACK"];
						Dvid_onTsServer = false;
					};
						if (player getvariable "taskfr") then {
							player setvariable ["taskfr",false,true];
						};
					} else {
						if (!(Dvid_onTsServer)) then {
						if (!(_isadmin)) then {
							titleText ["TS server check completed. Welcome!","BLACK IN"];
							Dvid_onTsServer = true;
							};
						if (!(player getvariable "taskfr")) then {
							player setvariable ["taskfr",true,true];
						};
						};
					};
					
					_onChannel = "TaskForceRadio" == (call TFAR_fnc_getTeamSpeakChannelName);
					if (!(_onChannel)) then {
					if (!(_isadmin)) then {
						titleText ["Please reload the plugin to join the TFR channel || Settings -> Plugins -> Reload All", "BLACK"];
						Dvid_onChannel = false;
					};
						if (player getvariable "taskfr") then {
							player setvariable ["taskfr",false,true];
						};
					} else {
						if (!(Dvid_onChannel)) then {
							titleText ["TS channel check completed. Welcome!","BLACK IN"];
							Dvid_onChannel = true;
						if (!(player getvariable "taskfr")) then {
							player setvariable ["taskfr",true,true];
						};
						};
					};
					
					
					if ((_TFenabled) && (!(Dvid_TFEnabled))) then {
						titleText ["Plugin enabled, welcome back!","BLACK IN"];
						Dvid_TFEnabled = true;
						if (!(player getvariable "taskfr")) then {
							player setvariable ["taskfr",true,true];
						};
					};
				
				sleep 2;	
			};

};

 

Then follow this tutorial to set up TFAR on client side (Credit goes to: MoNtEcRiStO©, for the linked tutorial)https://www.altisliferpg.com/topic/104-tutorial-install-task-force-radio-dedicated-server-client-side/

 


Done!

 

YOU MUST GIVE CREDIT TO USE!

Edited by David
  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, niksom said:

don't know, I can't find 5.0 on the net :(

What i mean is that, 5.0 is not officially released yet. Check the github. There is information on there.

Share this post


Link to post
Share on other sites
Hello I have to put what in the place of the edit Please , Thanks

    
ame as Dvid_onTsServer variable " == (call TFAR_fnc_getTeamSpeakServerName); //////////////////////Edit too pls, or dont but it wont work if you dont

 

 

Edited by Heisenbergko2p

Share this post


Link to post
Share on other sites
[] spawn {
	while {true} do {
		_server = [] call TFAR_fnc_getTeamSpeakServerName;
		_channel = [] call TFAR_fnc_getTeamSpeakChannelName;

        if(!([] call TFAR_fnc_isTeamSpeakPluginEnabled)) then {
        
        	cutText["Task Force Radio is not running on your computer, Enable TFR Plugin on Teamspeak!","BLACK"];
			waitUntil {([] call TFAR_fnc_isTeamSpeakPluginEnabled)};
			cutText["","PLAIN"];
			
        };

		if(_server != "Xenos Gaming - TeamSpeak Server" or _channel != "TaskForceRadio") then {
			
			cutText["Please join the Task Force Radio Teamspeak! 78.157.212.19 and reload your plugin","BLACK"];
			waitUntil {([] call TFAR_fnc_getTeamSpeakServerName) == "Xenos Gaming - TeamSpeak Server" and ([] call TFAR_fnc_getTeamSpeakChannelName) == "TaskForceRadio"};
			cutText["","PLAIN"];
			titleText ["Task Force Radio loaded successfully"];
        };
    	
    	sleep 5;
	};
};

mine from 1 year ago when xenosgaming was still around

i was going to use that from life-studios arma 3 life you pasted but lets be honest its terrible

Edited by Gaffa

Share this post


Link to post
Share on other sites
2 hours ago, Gaffa said:
[] spawn {
	while {true} do {
		_server = [] call TFAR_fnc_getTeamSpeakServerName;
		_channel = [] call TFAR_fnc_getTeamSpeakChannelName;

        if(!([] call TFAR_fnc_isTeamSpeakPluginEnabled)) then {
        
        	cutText["Task Force Radio is not running on your computer, Enable TFR Plugin on Teamspeak!","BLACK"];
			waitUntil {([] call TFAR_fnc_isTeamSpeakPluginEnabled)};
			cutText["","PLAIN"];
			
        };

		if(_server != "Xenos Gaming - TeamSpeak Server" or _channel != "TaskForceRadio") then {
			
			cutText["Please join the Task Force Radio Teamspeak! 78.157.212.19 and reload your plugin","BLACK"];
			waitUntil {([] call TFAR_fnc_getTeamSpeakServerName) == "Xenos Gaming - TeamSpeak Server" and ([] call TFAR_fnc_getTeamSpeakChannelName) == "TaskForceRadio"};
			cutText["","PLAIN"];
			titleText ["Task Force Radio loaded successfully"];
        };
    	
    	sleep 5;
	};
};

mine from 1 year ago when xenosgaming was still around

i was going to use that from life-studios arma 3 life you pasted but lets be honest its terrible

If it's yours ill give credit. Have you got any proof it was yours to begin with?

Share this post


Link to post
Share on other sites

not really, why would i have proof, i would say original was from lakeside Life-Studios where i see it and based my version from that. as they was first people to implement it

but i have github proof it was over a year ago when i added to an altis server but nearly 2 years ago when i used on takistan life for arma 3 on xenos we was first people to port takistan life you can go google that

https://gyazo.com/c95cdf9b27fe244051cedca98232a5db

 

not like code was that important you need to prove you made it, its quite simple to make.

Edited by Gaffa

Share this post


Link to post
Share on other sites
On 1/20/2017 at 10:38 PM, Rogue said:

This doesn't work for me, no errors strangely. Using 4.4r3

If you're admin in the Database, it will not be black. (atleast I think so by looking at the code.)

Share this post


Link to post
Share on other sites


I have the black screen that appears but when I launch teamspeak it disappears, no need to join a server, just launch teamspeak and the black screen disappears

Share this post


Link to post
Share on other sites
2 hours ago, Alessio said:


I have the black screen that appears but when I launch teamspeak it disappears, no need to join a server, just launch teamspeak and the black screen disappears

the script checks if they are in the TFAR Channel

also make sure you arent whitelisted as admin when testing?

Share this post


Link to post
Share on other sites
2 hours ago, Alessio said:


I have the black screen that appears but when I launch teamspeak it disappears, no need to join a server, just launch teamspeak and the black screen disappears

If you have a set ENUM in the database greater than 0 you wont need TFR enabled. To check who has an admin level in your database run: 

SELECT adminlevel FROM players;

in your query box.

Share this post


Link to post
Share on other sites

I have an Takistan life server but for some reason when I start the server I join without admin the message said join Task force radio : IP and goes away then comes back and does this forever. keeps flickering. i have looked everywhere but can't find if theres another TFAR script.

Share this post


Link to post
Share on other sites
20 hours ago, Jason1123 said:

I have an Takistan life server but for some reason when I start the server I join without admin the message said join Task force radio : IP and goes away then comes back and does this forever. keeps flickering. i have looked everywhere but can't find if theres another TFAR script.

Did you change where it says change

You have to edit the script for your ts channel name 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.