diff --git a/Sources/epoch_code/gui/scripts/group/EPOCH_Group_BtnLeave.sqf b/Sources/epoch_code/gui/scripts/group/EPOCH_Group_BtnLeave.sqf index b9f3724f..83c4f768 100644 --- a/Sources/epoch_code/gui/scripts/group/EPOCH_Group_BtnLeave.sqf +++ b/Sources/epoch_code/gui/scripts/group/EPOCH_Group_BtnLeave.sqf @@ -16,7 +16,6 @@ private ["_BtnLeave","_ret","_txt"]; //[[[end]]] disableSerialization; -_BtnLeave = (findDisplay -1300) displayCtrl 31; Epoch_my_Group params [ ["_groupName",""], ["_leaderName",""], @@ -25,7 +24,6 @@ Epoch_my_Group params [ ["_memberArray",[]] ]; if (getPlayerUID player == Epoch_my_GroupUID) then { - _BtnLeave ctrlSetText "Delete Group"; _txt = format["Do you want to delete your Group called %1?",_groupName]; _txt spawn { _ret = [_this,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage; diff --git a/Sources/epoch_code/gui/scripts/group/EPOCH_Group_onLoad.sqf b/Sources/epoch_code/gui/scripts/group/EPOCH_Group_onLoad.sqf index 8334b4c7..da3906ab 100644 --- a/Sources/epoch_code/gui/scripts/group/EPOCH_Group_onLoad.sqf +++ b/Sources/epoch_code/gui/scripts/group/EPOCH_Group_onLoad.sqf @@ -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 diff --git a/Sources/epoch_server/compile/epoch_group/EPOCH_server_createGroup.sqf b/Sources/epoch_server/compile/epoch_group/EPOCH_server_createGroup.sqf index f43dd931..eb19d397 100644 --- a/Sources/epoch_server/compile/epoch_group/EPOCH_server_createGroup.sqf +++ b/Sources/epoch_server/compile/epoch_group/EPOCH_server_createGroup.sqf @@ -60,8 +60,8 @@ if (_current_crypto >= _upgradePrice) then { _contentArray = [_groupName, _leaderName, EPOCH_group_upgrade_lvl_SEPXVar select 0, [], []]; - [["groupUpdate", _contentArray], (owner _leader)] call EPOCH_sendRemoteExecClient; - [["groupUidUpdate", _groupID], (owner _leader)] call EPOCH_sendRemoteExecClient; + [["groupUpdate", _contentArray], _leader] call EPOCH_sendRemoteExecClient; + [["groupUidUpdate", _groupID], _leader] call EPOCH_sendRemoteExecClient; _leader setVariable ["GROUP", _groupID]; diff --git a/Sources/epoch_server/compile/epoch_group/EPOCH_server_deleteGroup.sqf b/Sources/epoch_server/compile/epoch_group/EPOCH_server_deleteGroup.sqf index 9ffe4666..ba1406c1 100644 --- a/Sources/epoch_server/compile/epoch_group/EPOCH_server_deleteGroup.sqf +++ b/Sources/epoch_server/compile/epoch_group/EPOCH_server_deleteGroup.sqf @@ -30,5 +30,6 @@ if (_groupID != "") then { } forEach (allPlayers select {(_x getVariable["GROUP", ""]) == _groupID}); _return = ["Group", _groupID] call EPOCH_fnc_server_hiveDEL; + [["groupUpdate", []], _player] call EPOCH_sendRemoteExecClient; }; _return diff --git a/Sources/epoch_server/compile/epoch_group/EPOCH_server_updatePlayerGroup.sqf b/Sources/epoch_server/compile/epoch_group/EPOCH_server_updatePlayerGroup.sqf index 78fa5322..04d434b6 100644 --- a/Sources/epoch_server/compile/epoch_group/EPOCH_server_updatePlayerGroup.sqf +++ b/Sources/epoch_server/compile/epoch_group/EPOCH_server_updatePlayerGroup.sqf @@ -87,6 +87,7 @@ if ((_response select 0) == 1 && (_response select 1) isEqualType []) then { _x setVariable ["GROUP", nil]; [_x] joinSilent (createGroup [west, true]); [["resetGroup", true], _x] call EPOCH_sendRemoteExecClient; + [["groupUpdate", []], _x] call EPOCH_sendRemoteExecClient; } forEach (_allPlayers select {getPlayerUID _x == _selectedPlayerUID}); { if (_x select 0 == _selectedPlayerUID) exitWith { diff --git a/Sources/epoch_server/compile/epoch_grouptemp/EPOCH_server_deleteTempGroup.sqf b/Sources/epoch_server/compile/epoch_grouptemp/EPOCH_server_deleteTempGroup.sqf index ced8febb..94421636 100644 --- a/Sources/epoch_server/compile/epoch_grouptemp/EPOCH_server_deleteTempGroup.sqf +++ b/Sources/epoch_server/compile/epoch_grouptemp/EPOCH_server_deleteTempGroup.sqf @@ -37,7 +37,6 @@ if (_groupID != "") then { _x setVariable ["TEMPGROUP", nil]; [["resetTempGroup", true], _x] call EPOCH_sendRemoteExecClient; - [["tempGroupUpdate", []], _x] call EPOCH_sendRemoteExecClient; if (isNull _group) then { _group = createGroup [west, true]; }; @@ -45,6 +44,7 @@ if (_groupID != "") then { } forEach (allPlayers select {(_x getVariable["TEMPGROUP", ""]) == _groupID}); //_return = ["TempGroup", _groupID] call EPOCH_fnc_server_hiveDEL; + [["tempGroupUpdate", []], _player] call EPOCH_sendRemoteExecClient; _return = true; }; _return