Prevent group join, if already in group

This commit is contained in:
He-Man 2018-08-29 22:06:07 +02:00
parent 26e39c87e4
commit f493906efa
2 changed files with 6 additions and 0 deletions

View File

@ -13,6 +13,9 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/group/EPOCH_iGroup_acceptInvite.sqf
*/
if (Epoch_invited_GroupUID != "") then {
if !(Epoch_my_GroupUID == "") exitwith {
["Leave your current Group first...",5] call Epoch_Message;
};
[Epoch_invited_GroupUID,getPlayerUID player,true,false,player,Epoch_personalToken] remoteExec ["EPOCH_server_updatePlayerGroup",2];
};
(findDisplay -1500) closeDisplay 0;

View File

@ -13,6 +13,9 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/groupTemp/EPOCH_itempGroup_acceptInvite.sqf
*/
if (Epoch_invited_tempGroupUID != "") then {
if !(Epoch_my_tempGroupUID == "") exitwith {
["Leave your current Group first...",5] call Epoch_Message;
};
[Epoch_invited_tempGroupUID,getPlayerUID player,true,false,player,Epoch_personalToken] remoteExec ["EPOCH_server_updatePlayerTempGroup",2];
};
(findDisplay -1500) closeDisplay 0;