mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 17:42:01 +03:00
Add group system
Initial commit, not tested in multiplayer yet. Some revisions still left to do.
This commit is contained in:
21
SQF/dayz_code/groups/disbandGroup.sqf
Normal file
21
SQF/dayz_code/groups/disbandGroup.sqf
Normal file
@@ -0,0 +1,21 @@
|
||||
private "_group";
|
||||
|
||||
_group = group player;
|
||||
if (count (units _group) == 1 or (!isNil "dayz_groupDisbandThread" && {!scriptDone dayz_groupDisbandThread})) exitWith {
|
||||
_this ctrlShow false;
|
||||
};
|
||||
|
||||
dayz_groupDisbanded = nil;
|
||||
PVDZ_Server_UpdateGroup = [4,player];
|
||||
publicVariableServer "PVDZ_Server_UpdateGroup";
|
||||
|
||||
dayz_groupDisbandThread = _group spawn {
|
||||
//Wait for response from server to confirm group finished updating in DB
|
||||
waitUntil {!isNil "dayz_groupDisbanded"};
|
||||
|
||||
{
|
||||
[_x] join grpNull;
|
||||
} count (units _this);
|
||||
|
||||
deleteGroup _this;
|
||||
};
|
||||
Reference in New Issue
Block a user