mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Add systemChat message when a new player joins the group
This commit is contained in:
@@ -50,7 +50,6 @@
|
||||
[NEW] You may set the buying or selling price of any item to -1 to disallow the respective trading action, only with config traders and advanced trading @icomrade
|
||||
[NEW] Salvage can now be disabled on locked vehicles via DZE_salvageLocked variable. #1757 @oiad
|
||||
[NEW] You may now rearm pooks and other helicoper/vehicle pilot/driver weapons @icomrade
|
||||
[NEW] Dogs can now be gutted and yield 2xFoodDogRaw @ebaydayz
|
||||
[NEW] Rewrote death messages to a PVEH instead of the unreliable MPHit. Added localization, more causes of death, systemChat and dynamicText killfeed options. @ebaydayz
|
||||
[NEW] Optional group system with database save. Group command bar is now hidden. @icomrade @ebaydayz
|
||||
|
||||
|
||||
@@ -13,4 +13,5 @@ dayz_groupDisbandThread = _group spawn {
|
||||
|
||||
{[_x] joinSilent grpNull} count (units _this);
|
||||
deleteGroup _this;
|
||||
dayz_myGroup = [];
|
||||
};
|
||||
@@ -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));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private "_oldGroup";
|
||||
private ["_leader","_oldGroup"];
|
||||
|
||||
if (count (units group player) > 1) then {
|
||||
[player] joinSilent grpNull;
|
||||
@@ -7,10 +7,12 @@ if (count (units group player) > 1) then {
|
||||
if (count dayz_myGroup > 1 && {!dayz_requireRadio or {dayz_requireRadio && "ItemRadio" in items player}}) then {
|
||||
{
|
||||
//Only auto join player into group if leader is in their savedGroup
|
||||
if (getPlayerUID leader _x in dayz_myGroup) exitWith {
|
||||
_leader = leader _x;
|
||||
if (getPlayerUID _leader in dayz_myGroup) exitWith {
|
||||
_oldGroup = group player;
|
||||
[player] joinSilent _x;
|
||||
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
||||
systemChat format [localize "STR_EPOCH_REJOINED_GROUP",name _leader];
|
||||
|
||||
// Update saved group in DB
|
||||
PVDZ_Server_UpdateGroup = [0,player];
|
||||
|
||||
@@ -27,6 +27,12 @@ if (!isNull _inviter) then {
|
||||
_oldGroup = group player;
|
||||
[player] joinSilent (group _inviter);
|
||||
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
||||
{
|
||||
_uid = getPlayerUID _x;
|
||||
if !(_uid in dayz_myGroup) then {
|
||||
dayz_myGroup set [count dayz_myGroup,_uid];
|
||||
};
|
||||
} count (units group player);
|
||||
|
||||
// Update saved group in DB
|
||||
PVDZ_Server_UpdateGroup = [1,player];
|
||||
|
||||
@@ -8,6 +8,7 @@ _target = _targetUID call dayz_getPlayer;
|
||||
if (isNull _target or _target == player or player != leader group player) exitWith {};
|
||||
|
||||
[_target] joinSilent grpNull;
|
||||
dayz_myGroup = dayz_myGroup - [_targetUID];
|
||||
|
||||
PVDZ_Server_UpdateGroup = [2,player,_targetUID];
|
||||
publicVariableServer "PVDZ_Server_UpdateGroup";
|
||||
|
||||
@@ -11,4 +11,5 @@ dayz_groupLeaveThread = [] spawn {
|
||||
//Wait for response from server to confirm group finished updating in DB
|
||||
waitUntil {!isNil "dayz_groupLeft"};
|
||||
[player] joinSilent grpNull;
|
||||
dayz_myGroup = [];
|
||||
};
|
||||
@@ -16357,6 +16357,12 @@
|
||||
<Key ID="STR_EPOCH_INVITE_TO">
|
||||
<English>You invited %1 to join the group.</English>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_PLAYER_JOINED">
|
||||
<English>%1 joined the group.</English>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_REJOINED_GROUP">
|
||||
<English>Rejoined %1's group</English>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_INVITE_NEW">
|
||||
<English>New group invite - Press F5 to view</English>
|
||||
</Key>
|
||||
|
||||
Reference in New Issue
Block a user