mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
epoch groups system
move "Delete Group" button check to onLoad from button click. Remove owner from EPOCH_sendRemoteExecClient calls. Add UI update push to leader on Delete Group. Add UI update push to client on remove in case they clicked leave group.
This commit is contained in:
parent
56283e0c08
commit
d90eb4774f
@ -16,7 +16,6 @@
|
|||||||
private ["_BtnLeave","_ret","_txt"];
|
private ["_BtnLeave","_ret","_txt"];
|
||||||
//[[[end]]]
|
//[[[end]]]
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
_BtnLeave = (findDisplay -1300) displayCtrl 31;
|
|
||||||
Epoch_my_Group params [
|
Epoch_my_Group params [
|
||||||
["_groupName",""],
|
["_groupName",""],
|
||||||
["_leaderName",""],
|
["_leaderName",""],
|
||||||
@ -25,7 +24,6 @@ Epoch_my_Group params [
|
|||||||
["_memberArray",[]]
|
["_memberArray",[]]
|
||||||
];
|
];
|
||||||
if (getPlayerUID player == Epoch_my_GroupUID) then {
|
if (getPlayerUID player == Epoch_my_GroupUID) then {
|
||||||
_BtnLeave ctrlSetText "Delete Group";
|
|
||||||
_txt = format["Do you want to delete your Group called %1?",_groupName];
|
_txt = format["Do you want to delete your Group called %1?",_groupName];
|
||||||
_txt spawn {
|
_txt spawn {
|
||||||
_ret = [_this,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage;
|
_ret = [_this,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage;
|
||||||
|
@ -82,6 +82,10 @@ if (_currentMaxMember < _groupSize) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (_playerIsLeader) then {
|
||||||
|
(findDisplay -1300) displayCtrl 31 ctrlSetText "Delete Group";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
_picture = EPOCH_group_level_img select _forEachIndex; //0 = lead / 1 = mod / 2 = member
|
_picture = EPOCH_group_level_img select _forEachIndex; //0 = lead / 1 = mod / 2 = member
|
||||||
|
@ -60,8 +60,8 @@ if (_current_crypto >= _upgradePrice) then {
|
|||||||
|
|
||||||
_contentArray = [_groupName, _leaderName, EPOCH_group_upgrade_lvl_SEPXVar select 0, [], []];
|
_contentArray = [_groupName, _leaderName, EPOCH_group_upgrade_lvl_SEPXVar select 0, [], []];
|
||||||
|
|
||||||
[["groupUpdate", _contentArray], (owner _leader)] call EPOCH_sendRemoteExecClient;
|
[["groupUpdate", _contentArray], _leader] call EPOCH_sendRemoteExecClient;
|
||||||
[["groupUidUpdate", _groupID], (owner _leader)] call EPOCH_sendRemoteExecClient;
|
[["groupUidUpdate", _groupID], _leader] call EPOCH_sendRemoteExecClient;
|
||||||
|
|
||||||
_leader setVariable ["GROUP", _groupID];
|
_leader setVariable ["GROUP", _groupID];
|
||||||
|
|
||||||
|
@ -30,5 +30,6 @@ if (_groupID != "") then {
|
|||||||
} forEach (allPlayers select {(_x getVariable["GROUP", ""]) == _groupID});
|
} forEach (allPlayers select {(_x getVariable["GROUP", ""]) == _groupID});
|
||||||
|
|
||||||
_return = ["Group", _groupID] call EPOCH_fnc_server_hiveDEL;
|
_return = ["Group", _groupID] call EPOCH_fnc_server_hiveDEL;
|
||||||
|
[["groupUpdate", []], _player] call EPOCH_sendRemoteExecClient;
|
||||||
};
|
};
|
||||||
_return
|
_return
|
||||||
|
@ -87,6 +87,7 @@ if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
|
|||||||
_x setVariable ["GROUP", nil];
|
_x setVariable ["GROUP", nil];
|
||||||
[_x] joinSilent (createGroup [west, true]);
|
[_x] joinSilent (createGroup [west, true]);
|
||||||
[["resetGroup", true], _x] call EPOCH_sendRemoteExecClient;
|
[["resetGroup", true], _x] call EPOCH_sendRemoteExecClient;
|
||||||
|
[["groupUpdate", []], _x] call EPOCH_sendRemoteExecClient;
|
||||||
} forEach (_allPlayers select {getPlayerUID _x == _selectedPlayerUID});
|
} forEach (_allPlayers select {getPlayerUID _x == _selectedPlayerUID});
|
||||||
{
|
{
|
||||||
if (_x select 0 == _selectedPlayerUID) exitWith {
|
if (_x select 0 == _selectedPlayerUID) exitWith {
|
||||||
|
@ -37,7 +37,6 @@ if (_groupID != "") then {
|
|||||||
|
|
||||||
_x setVariable ["TEMPGROUP", nil];
|
_x setVariable ["TEMPGROUP", nil];
|
||||||
[["resetTempGroup", true], _x] call EPOCH_sendRemoteExecClient;
|
[["resetTempGroup", true], _x] call EPOCH_sendRemoteExecClient;
|
||||||
[["tempGroupUpdate", []], _x] call EPOCH_sendRemoteExecClient;
|
|
||||||
if (isNull _group) then {
|
if (isNull _group) then {
|
||||||
_group = createGroup [west, true];
|
_group = createGroup [west, true];
|
||||||
};
|
};
|
||||||
@ -45,6 +44,7 @@ if (_groupID != "") then {
|
|||||||
} forEach (allPlayers select {(_x getVariable["TEMPGROUP", ""]) == _groupID});
|
} forEach (allPlayers select {(_x getVariable["TEMPGROUP", ""]) == _groupID});
|
||||||
|
|
||||||
//_return = ["TempGroup", _groupID] call EPOCH_fnc_server_hiveDEL;
|
//_return = ["TempGroup", _groupID] call EPOCH_fnc_server_hiveDEL;
|
||||||
|
[["tempGroupUpdate", []], _player] call EPOCH_sendRemoteExecClient;
|
||||||
_return = true;
|
_return = true;
|
||||||
};
|
};
|
||||||
_return
|
_return
|
||||||
|
Loading…
Reference in New Issue
Block a user