Add systemChat message when a new player joins the group

This commit is contained in:
ebaydayz
2016-10-31 17:30:03 -04:00
parent 1b3ed13a47
commit f21b5b74a7
8 changed files with 28 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
// Two second loop
private ["_count","_found","_group","_hasGPS","_index","_marker","_markBody","_markGroup","_markSelf","_pos","_self","_vehicle"];
private ["_count","_found","_group","_hasGPS","_index","_marker","_markBody","_markGroup","_markSelf","_pos","_self","_uid","_vehicle"];
_group = player call dayz_filterGroup;
@@ -10,6 +10,14 @@ if (dayz_requireRadio && {count _group > 1} && {!("ItemRadio" in items player)})
localize "STR_EPOCH_RADIO_CONTACT_LOST" call dayz_rollingMessages;
};
{
_uid = getPlayerUID _x;
if (!(_uid in dayz_myGroup) && _x != player) then {
dayz_myGroup set [count dayz_myGroup,_uid];
systemChat format [localize "STR_EPOCH_PLAYER_JOINED",name _x];
};
} count _group;
if (visibleMap or !isNull findDisplay 88890) then {
_hasGPS = "ItemGPS" in items player;
_markBody = (dayz_markBody == 1 or (dayz_markBody == 2 && _hasGPS));