Add group system

Initial commit, not tested in multiplayer yet. Some revisions still left
to do.
This commit is contained in:
ebaydayz
2016-10-27 16:06:33 -04:00
parent f92d84f720
commit f770b0a85d
73 changed files with 1195 additions and 21 deletions

View File

@@ -0,0 +1,23 @@
private ["_disbandButton","_display","_group","_myGroup","_target","_uid"];
disableSerialization;
_display = findDisplay 80000;
_myGroup = _display displayCtrl 2;
_disbandButton = _display displayCtrl 5;
_promoteButton = _this;
_uid = _myGroup lbData (lbCurSel _myGroup);
_group = group player;
_target = _uid call dayz_getPlayer;
if (player == leader _group && {!isNull _target} && {_target != player}) then {
if (local _group) then {
_group selectLeader _target; //group must be local
_promoteButton ctrlShow false;
_disbandButton ctrlShow false;
} else {
systemChat "Failed: Group must be local to do this";
};
} else {
_promoteButton ctrlShow false;
};