Skip to content

Instantly share code, notes, and snippets.

@SamJUK
Created October 28, 2016 00:22
Show Gist options
  • Save SamJUK/3925bcfa384068cbc074c0bac9a0d7c5 to your computer and use it in GitHub Desktop.
Save SamJUK/3925bcfa384068cbc074c0bac9a0d7c5 to your computer and use it in GitHub Desktop.
[]spawn{
private ["_ServerName","_ChannelName","_TSPluginEnabled"];
sleep 15;
while {true} do {
_Error = false;
_ServerName = call TFAR_fnc_getTeamSpeakServerName;
_ChannelName = call TFAR_fnc_getTeamSpeakChannelName;
_TSPluginEnabled = call TFAR_fnc_isTeamSpeakPluginEnabled;;
_AdminState = (life_adminlvl > 0);
_WhiteListedChannels = ["InGameA3"];
if (!_AdminState && _ServerName != "Global Task Force Offical Teamspeak")then{_Wrong = true;};
if (!_AdminState && !(_ChannelName in _WhiteListedChannels))then{_Wrong = true;};
if (!_AdminState && !_TSPluginEnabled)then{_Wrong = true;};
if(_Error) then{
cutText["Please join the correct TS/Channel/Enable The Plugin","BLACK FADED"];
}else{
cutText["","PLAIN"];
sleep 5;
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment