mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Send notfication to player kicked from group
This commit is contained in:
@@ -7,7 +7,13 @@ if (typeName _add == "SCALAR") exitWith {
|
||||
switch _add do {
|
||||
case -1: { (group player) selectLeader _uid; }; //Promote
|
||||
case 1: { systemChat format[localize "STR_EPOCH_PLAYER_JOINED",_uid]; };
|
||||
case 2: { systemChat format[localize "STR_EPOCH_PLAYER_KICKED",name (_uid call dayz_getPlayer)]; };
|
||||
case 2: {
|
||||
if (_uid == getPlayerUID player) then {
|
||||
localize "STR_EPOCH_GROUP_KICKED" call dayz_rollingMessages;
|
||||
} else {
|
||||
systemChat format[localize "STR_EPOCH_PLAYER_KICKED",name (_uid call dayz_getPlayer)];
|
||||
};
|
||||
};
|
||||
case 3: { systemChat format[localize "STR_EPOCH_PLAYER_LEFT",_uid]; };
|
||||
case 4: { localize "STR_EPOCH_GROUP_DISBANDED" call dayz_rollingMessages; };
|
||||
};
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
private ["_event","_groupUIDs","_name","_newGroup","_player","_playerUID","_save","_unit"];
|
||||
private ["_event","_groupUIDs","_kickedUID","_name","_newGroup","_player","_playerUID","_save","_unit"];
|
||||
|
||||
_event = _this select 0;
|
||||
_player = _this select 1;
|
||||
_kickedUID = if (count _this > 2) then {_this select 2} else {"0"};
|
||||
_name = if (alive _player) then {name _player} else {"unknown"};
|
||||
_playerUID = getPlayerUID _player;
|
||||
|
||||
@@ -29,7 +30,7 @@ _newGroup = switch _event do {
|
||||
case 1: {_groupUIDs};
|
||||
//Kick (target was already kicked from group)
|
||||
case 2: {
|
||||
_name = _this select 2; //Kicked player's UID
|
||||
_name = _kickedUID;
|
||||
format["CHILD:204:%1:%2:%3:",_name,dayZ_instance,[]] call server_hiveWrite;
|
||||
_groupUIDs
|
||||
};
|
||||
@@ -56,6 +57,7 @@ _newGroup = switch _event do {
|
||||
|
||||
//Notify group members of the change
|
||||
PVDZ_groupInvite = [_event,_name];
|
||||
_groupUIDs set [count _groupUIDs,_kickedUID];
|
||||
{
|
||||
_unit = getPlayerUID _x;
|
||||
if (_unit in _groupUIDs && {_unit != _playerUID}) then {
|
||||
|
||||
@@ -16320,6 +16320,9 @@
|
||||
<English>You invited %1 to join the group.</English>
|
||||
<German>Du hast %1 eingeladen der Gruppe beizutreten.</German>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_GROUP_KICKED">
|
||||
<English>You were kicked from the group</English>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_PLAYER_KICKED">
|
||||
<English>%1 was kicked from the group.</English>
|
||||
</Key>
|
||||
|
||||
Reference in New Issue
Block a user