summaryrefslogtreecommitdiffstats
path: root/Server/Functions/Server_CanUpdateTeam.sqf
blob: e4863b70ebdd0cf7fa212f121a1459295be86bb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* 
	Author: Benny
	Name: Server_CanUpdateTeam.sqf
	Parameters:
	  0 - Group
	Description:
	  This function detect whether a human commander is in command or not and if a team is in the 'main' teams.
*/

Private ['_canUpdate','_commander','_team'];
_team = _this;

_canUpdate = true;
if (((leader _team) Call GetClientID) != 0) then {
	_commander = (side _team) Call GetCommanderTeam;
	if !(isNull _commander) then {_canUpdate = false};
};

_canUpdate