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 {
|
switch _add do {
|
||||||
case -1: { (group player) selectLeader _uid; }; //Promote
|
case -1: { (group player) selectLeader _uid; }; //Promote
|
||||||
case 1: { systemChat format[localize "STR_EPOCH_PLAYER_JOINED",_uid]; };
|
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 3: { systemChat format[localize "STR_EPOCH_PLAYER_LEFT",_uid]; };
|
||||||
case 4: { localize "STR_EPOCH_GROUP_DISBANDED" call dayz_rollingMessages; };
|
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;
|
_event = _this select 0;
|
||||||
_player = _this select 1;
|
_player = _this select 1;
|
||||||
|
_kickedUID = if (count _this > 2) then {_this select 2} else {"0"};
|
||||||
_name = if (alive _player) then {name _player} else {"unknown"};
|
_name = if (alive _player) then {name _player} else {"unknown"};
|
||||||
_playerUID = getPlayerUID _player;
|
_playerUID = getPlayerUID _player;
|
||||||
|
|
||||||
@@ -29,7 +30,7 @@ _newGroup = switch _event do {
|
|||||||
case 1: {_groupUIDs};
|
case 1: {_groupUIDs};
|
||||||
//Kick (target was already kicked from group)
|
//Kick (target was already kicked from group)
|
||||||
case 2: {
|
case 2: {
|
||||||
_name = _this select 2; //Kicked player's UID
|
_name = _kickedUID;
|
||||||
format["CHILD:204:%1:%2:%3:",_name,dayZ_instance,[]] call server_hiveWrite;
|
format["CHILD:204:%1:%2:%3:",_name,dayZ_instance,[]] call server_hiveWrite;
|
||||||
_groupUIDs
|
_groupUIDs
|
||||||
};
|
};
|
||||||
@@ -56,6 +57,7 @@ _newGroup = switch _event do {
|
|||||||
|
|
||||||
//Notify group members of the change
|
//Notify group members of the change
|
||||||
PVDZ_groupInvite = [_event,_name];
|
PVDZ_groupInvite = [_event,_name];
|
||||||
|
_groupUIDs set [count _groupUIDs,_kickedUID];
|
||||||
{
|
{
|
||||||
_unit = getPlayerUID _x;
|
_unit = getPlayerUID _x;
|
||||||
if (_unit in _groupUIDs && {_unit != _playerUID}) then {
|
if (_unit in _groupUIDs && {_unit != _playerUID}) then {
|
||||||
|
|||||||
@@ -16320,6 +16320,9 @@
|
|||||||
<English>You invited %1 to join the group.</English>
|
<English>You invited %1 to join the group.</English>
|
||||||
<German>Du hast %1 eingeladen der Gruppe beizutreten.</German>
|
<German>Du hast %1 eingeladen der Gruppe beizutreten.</German>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_EPOCH_GROUP_KICKED">
|
||||||
|
<English>You were kicked from the group</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_EPOCH_PLAYER_KICKED">
|
<Key ID="STR_EPOCH_PLAYER_KICKED">
|
||||||
<English>%1 was kicked from the group.</English>
|
<English>%1 was kicked from the group.</English>
|
||||||
</Key>
|
</Key>
|
||||||
|
|||||||
Reference in New Issue
Block a user