Add delay before group update

This commit is contained in:
ebaydayz
2016-10-28 21:24:03 -04:00
parent dbb9e97efc
commit 127be2472d
3 changed files with 10 additions and 8 deletions

View File

@@ -22,10 +22,12 @@ if (!isNull _inviter) then {
_oldGroup = group player;
[player] join (group _inviter);
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
[] spawn {
uiSleep 1; //Required for group change to update on server
// Update saved group in DB
PVDZ_Server_UpdateGroup = [1,player];
publicVariableServer "PVDZ_Server_UpdateGroup";
};
} else {
_this ctrlShow false;
systemChat localize "STR_EPOCH_INVITE_EXPIRED";

View File

@@ -1,8 +1,9 @@
private ["_disbandButton","_display","_group","_myGroup","_target","_uid"];
private ["_disbandButton","_display","_group","_kickButton","_myGroup","_target","_uid"];
disableSerialization;
_display = findDisplay 80000;
_myGroup = _display displayCtrl 2;
_kickButton = _display displayCtrl 4;
_disbandButton = _display displayCtrl 5;
_promoteButton = _this;
_uid = _myGroup lbData (lbCurSel _myGroup);
@@ -12,8 +13,7 @@ _target = _uid call dayz_getPlayer;
if (player == leader _group && {!isNull _target} && {_target != player}) then {
_group selectLeader _target;
_promoteButton ctrlShow false;
_disbandButton ctrlShow false;
{_x ctrlShow false} count [_disbandButton,_kickButton,_promoteButton];
} else {
_promoteButton ctrlShow false;
};

View File

@@ -15,5 +15,5 @@ Please request permission to use/alter/distribute from project leader (R4Z0R49)
#define PLAYER_DEBUG
// comment this out if you don't want any misc SERVER (ZOMBIE, LOOT, CLEANUP) related debug
#define SERVER_DEBUG
//#define SERVER_DEBUG