mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Update group tags again
Also fixed wrong string name "STR_EPOCH_RADIO_CONTACT_LOST" thanks @oiad
This commit is contained in:
@@ -150,6 +150,7 @@ _myGroup = group _body;
|
||||
[_body] joinSilent dayz_firstGroup;
|
||||
deleteGroup _myGroup;
|
||||
|
||||
terminate dayz_groupTags;
|
||||
80000 cutText ["","PLAIN"]; //Clear group tags
|
||||
3 cutRsc ["default", "PLAIN",3];
|
||||
4 cutRsc ["default", "PLAIN",3];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private "_group";
|
||||
|
||||
_group = group player;
|
||||
if (count (units _group) == 1 or player != leader _group or (!isNil "dayz_groupDisbandThread" && {!scriptDone dayz_groupDisbandThread})) exitWith {};
|
||||
if (count (units _group) == 1 or player != leader _group or (!scriptDone dayz_groupDisbandThread)) exitWith {};
|
||||
|
||||
dayz_groupDisbanded = nil;
|
||||
PVDZ_Server_UpdateGroup = [4,player];
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
private ["_bodyCount","_count","_group","_hasGPS","_index","_marker","_markBody","_markGroup","_markSelf","_name","_pos","_self","_vehicle"];
|
||||
private ["_bodyCount","_count","_group","_hasGPS","_index","_inGroup","_marker","_markBody","_markGroup","_markSelf","_name","_pos","_self","_vehicle"];
|
||||
|
||||
while {true} do {
|
||||
_group = player call dayz_filterGroup;
|
||||
_inGroup = count _group > 1;
|
||||
|
||||
if (dayz_requireRadio && {count _group > 1} && {!("ItemRadio" in items player)}) then {
|
||||
if (dayz_requireRadio && {_inGroup} && {!("ItemRadio" in items player)}) then {
|
||||
[player] joinSilent grpNull;
|
||||
_group = [];
|
||||
if (!isNull findDisplay 80000) then {findDisplay 80000 closeDisplay 2;};
|
||||
localize "STR_EPOCH_RADIO_CONTACT_LOST" call dayz_rollingMessages;
|
||||
terminate dayz_groupTags;
|
||||
80000 cutText ["","PLAIN"];
|
||||
localize "STR_EPOCH_LOST_RADIO_CONTACT" call dayz_rollingMessages;
|
||||
} else {
|
||||
if (_inGroup && scriptDone dayz_groupTags) then {
|
||||
dayz_groupTags = execVM "\z\addons\dayz_code\groups\groupTags.sqf";
|
||||
};
|
||||
|
||||
if (visibleMap or !isNull (uiNamespace getVariable["BIS_RscMiniMap",displayNull])) then {
|
||||
_hasGPS = "ItemGPS" in items player;
|
||||
_markBody = (dayz_markBody == 1 or (dayz_markBody == 2 && _hasGPS));
|
||||
|
||||
@@ -5,17 +5,33 @@ _uid = _this select 1;
|
||||
|
||||
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 -1: { //Promote
|
||||
(group player) selectLeader _uid;
|
||||
};
|
||||
case 1: {
|
||||
systemChat format[localize "STR_EPOCH_PLAYER_JOINED",_uid];
|
||||
};
|
||||
case 2: {
|
||||
if (_uid == getPlayerUID player) then {
|
||||
localize "STR_EPOCH_GROUP_KICKED" call dayz_rollingMessages;
|
||||
terminate dayz_groupTags;
|
||||
80000 cutText ["","PLAIN"];
|
||||
} 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; };
|
||||
case 3: {
|
||||
systemChat format[localize "STR_EPOCH_PLAYER_LEFT",_uid];
|
||||
if (count (player call dayz_filterGroup) == 1) then {
|
||||
terminate dayz_groupTags;
|
||||
80000 cutText ["","PLAIN"];
|
||||
};
|
||||
};
|
||||
case 4: {
|
||||
localize "STR_EPOCH_GROUP_DISBANDED" call dayz_rollingMessages;
|
||||
terminate dayz_groupTags;
|
||||
80000 cutText ["","PLAIN"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -43,10 +43,9 @@ dayz_promotePlayer = compile preprocessFileLineNumbers "\z\addons\dayz_code\grou
|
||||
dayz_rejectGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\reject.sqf";
|
||||
dayz_groupInit = true;
|
||||
|
||||
if (!isNil "PVDZ_Server_UpdateGroup") then {
|
||||
dayz_groupTags = execVM "\z\addons\dayz_code\groups\groupTags.sqf";
|
||||
};
|
||||
//Initialize as script data type, no scriptNull in A2
|
||||
dayz_groupDisbandThread = 0 spawn {};
|
||||
dayz_groupLeaveThread = 0 spawn {};
|
||||
dayz_groupTags = 0 spawn {};
|
||||
|
||||
if (dayz_requireRadio or {dayz_markGroup > 0} or {dayz_markSelf > 0} or {dayz_markBody > 0}) then {
|
||||
execVM "\z\addons\dayz_code\groups\groupMarkers.sqf";
|
||||
};
|
||||
execVM "\z\addons\dayz_code\groups\groupMarkers.sqf";
|
||||
@@ -27,8 +27,4 @@ dayz_activeInvites set [count dayz_activeInvites,_invite];
|
||||
PVDZ_groupInvite = [true,_invite];
|
||||
publicVariableServer "PVDZ_groupInvite";
|
||||
|
||||
systemChat format[localize "STR_EPOCH_INVITE_TO",name _recipient];
|
||||
|
||||
if (isNil "dayz_groupTags" or {scriptDone dayz_groupTags}) then {
|
||||
dayz_groupTags = execVM "\z\addons\dayz_code\groups\groupTags.sqf";
|
||||
};
|
||||
systemChat format[localize "STR_EPOCH_INVITE_TO",name _recipient];
|
||||
@@ -27,10 +27,6 @@ if (!isNull _inviter) then {
|
||||
_oldGroup = group player;
|
||||
[player] joinSilent (group _inviter);
|
||||
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
||||
|
||||
if (isNil "dayz_groupTags" or {scriptDone dayz_groupTags}) then {
|
||||
dayz_groupTags = execVM "\z\addons\dayz_code\groups\groupTags.sqf";
|
||||
};
|
||||
|
||||
// Update saved group in DB
|
||||
PVDZ_Server_UpdateGroup = [1,player];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private "_group";
|
||||
_group = units group player;
|
||||
|
||||
if (count _group == 1 or (!isNil "dayz_groupLeaveThread" && {!scriptDone dayz_groupLeaveThread})) exitWith {};
|
||||
if (count _group == 1 or (!scriptDone dayz_groupLeaveThread)) exitWith {};
|
||||
|
||||
dayz_groupLeft = nil;
|
||||
PVDZ_Server_UpdateGroup = [3,player];
|
||||
|
||||
@@ -32,12 +32,12 @@ while {!isNull findDisplay 80000} do {
|
||||
lbSort _myGroup;
|
||||
|
||||
if (lbSize _myGroup > 1) then {
|
||||
if (isNil "dayz_groupLeaveThread" or {scriptDone dayz_groupLeaveThread}) then {
|
||||
if (scriptDone dayz_groupLeaveThread) then {
|
||||
_leaveButton ctrlShow true;
|
||||
} else {
|
||||
_leaveButton ctrlShow false;
|
||||
};
|
||||
if (player == _leader && (isNil "dayz_groupDisbandThread" or {scriptDone dayz_groupDisbandThread})) then {
|
||||
if (player == _leader && scriptDone dayz_groupDisbandThread) then {
|
||||
_disbandButton ctrlShow true;
|
||||
} else {
|
||||
_disbandButton ctrlShow false;
|
||||
|
||||
Reference in New Issue
Block a user