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

@@ -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] 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] 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] 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] 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 [NEW] Optional group system with database save. Group command bar is now hidden. @icomrade @ebaydayz

View File

@@ -13,4 +13,5 @@ dayz_groupDisbandThread = _group spawn {
{[_x] joinSilent grpNull} count (units _this); {[_x] joinSilent grpNull} count (units _this);
deleteGroup _this; deleteGroup _this;
dayz_myGroup = [];
}; };

View File

@@ -1,5 +1,5 @@
// Two second loop // 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; _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; 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 { if (visibleMap or !isNull findDisplay 88890) then {
_hasGPS = "ItemGPS" in items player; _hasGPS = "ItemGPS" in items player;
_markBody = (dayz_markBody == 1 or (dayz_markBody == 2 && _hasGPS)); _markBody = (dayz_markBody == 1 or (dayz_markBody == 2 && _hasGPS));

View File

@@ -1,4 +1,4 @@
private "_oldGroup"; private ["_leader","_oldGroup"];
if (count (units group player) > 1) then { if (count (units group player) > 1) then {
[player] joinSilent grpNull; [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 { 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 //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; _oldGroup = group player;
[player] joinSilent _x; [player] joinSilent _x;
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;}; if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
systemChat format [localize "STR_EPOCH_REJOINED_GROUP",name _leader];
// Update saved group in DB // Update saved group in DB
PVDZ_Server_UpdateGroup = [0,player]; PVDZ_Server_UpdateGroup = [0,player];

View File

@@ -27,6 +27,12 @@ if (!isNull _inviter) then {
_oldGroup = group player; _oldGroup = group player;
[player] joinSilent (group _inviter); [player] joinSilent (group _inviter);
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;}; 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 // Update saved group in DB
PVDZ_Server_UpdateGroup = [1,player]; PVDZ_Server_UpdateGroup = [1,player];

View File

@@ -8,6 +8,7 @@ _target = _targetUID call dayz_getPlayer;
if (isNull _target or _target == player or player != leader group player) exitWith {}; if (isNull _target or _target == player or player != leader group player) exitWith {};
[_target] joinSilent grpNull; [_target] joinSilent grpNull;
dayz_myGroup = dayz_myGroup - [_targetUID];
PVDZ_Server_UpdateGroup = [2,player,_targetUID]; PVDZ_Server_UpdateGroup = [2,player,_targetUID];
publicVariableServer "PVDZ_Server_UpdateGroup"; publicVariableServer "PVDZ_Server_UpdateGroup";

View File

@@ -11,4 +11,5 @@ dayz_groupLeaveThread = [] spawn {
//Wait for response from server to confirm group finished updating in DB //Wait for response from server to confirm group finished updating in DB
waitUntil {!isNil "dayz_groupLeft"}; waitUntil {!isNil "dayz_groupLeft"};
[player] joinSilent grpNull; [player] joinSilent grpNull;
dayz_myGroup = [];
}; };

View File

@@ -16357,6 +16357,12 @@
<Key ID="STR_EPOCH_INVITE_TO"> <Key ID="STR_EPOCH_INVITE_TO">
<English>You invited %1 to join the group.</English> <English>You invited %1 to join the group.</English>
</Key> </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"> <Key ID="STR_EPOCH_INVITE_NEW">
<English>New group invite - Press F5 to view</English> <English>New group invite - Press F5 to view</English>
</Key> </Key>