Add group system

Initial commit, not tested in multiplayer yet. Some revisions still left
to do.
This commit is contained in:
ebaydayz
2016-10-27 16:06:33 -04:00
parent f92d84f720
commit f770b0a85d
73 changed files with 1195 additions and 21 deletions

View File

@@ -266,6 +266,171 @@ class CfgInGameUI
};
};
};
// Hide group hotbar
class CommandBar {
left = "-0.032 + SafeZoneX";
top = "(SafeZoneH + SafeZoneY) - (1 - 0.851)";
width = 0;
height = 0;
imageDefaultWeapons = "ca\ui\data\clear_empty.paa";
imageNoWeapons = "ca\ui\data\clear_empty.paa";
imageCommander = "ca\ui\data\clear_empty.paa";
imageDriver = "ca\ui\data\clear_empty.paa";
imageGunner = "ca\ui\data\clear_empty.paa";
imageCargo = "ca\ui\data\clear_empty.paa";
dimm = 0.3;
colorRedTeam[] = {0,0,0,0};
colorBlueTeam[] = {0,0,0,0};
colorGreenTeam[] = {0,0,0,0};
colorYellowTeam[] = {0,0,0,0};
colorWhiteTeam[] = {0,0,0,0};
class prevPage {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class nextPage {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class UnitInfo {
class GroupIcon {
x = 0;
y = 0;
w = 0;
h = 0;
};
class HcGroupText {
x = 0;
y = 0;
w = 0;
h = 0;
font = "Zeppelin32";
SizeEx = 0;
};
class UnitBackground {
x = 0;
y = 0;
w = 0;
h = 0;
textureNormal = "ca\ui\data\clear_empty.paa";
textureSelected = "ca\ui\data\clear_empty.paa";
texturePlayer = "ca\ui\data\clear_empty.paa";
textureFocus = "ca\ui\data\clear_empty.paa";
};
class UnitFocus {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class UnitIcon {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
colorPlayer[] = {0,0,0,0};
colorNoAmmo[] = {0,0,0,0};
colorWounded[] = {0,0,0,0};
colorWoundedFade[] = {0,0,0,0};
colorNoFuel[] = {0,0,0,0};
};
class Semaphore {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class CommandBackground {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class CommandText {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
font = "Zeppelin32";
SizeEx = 0;
};
class UnitSpecialRole {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
};
class VehicleNumberBackground {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class VehicleNumberText {
x = 0;
y = 0;
w = 0;
h = 0;
colorText[] = {0,0,0,0};
font = "Zeppelin32";
SizeEx = 0;
};
class UnitRole {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
};
class UnitNumberBackground {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class UnitNumberText {
x = 0;
y = 0;
w = 0;
h = 0;
colorText[] = {0,0,0,0};
font = "Zeppelin32";
SizeEx = 0;
};
class CombatMode {
x = 0;
y = 0;
w = 0;
h = 0;
textureMCareless = "ca\ui\data\clear_empty.paa";
textureMSafe = "ca\ui\data\clear_empty.paa";
textureMAware = "ca\ui\data\clear_empty.paa";
textureMCombat = "ca\ui\data\clear_empty.paa";
textureMStealth = "ca\ui\data\clear_empty.paa";
};
};
};
};
class CfgVoice {

View File

@@ -259,6 +259,7 @@ class CfgWeapons
#include "Tools\Flashlight.hpp"
#include "Tools\FlashlightRed.hpp"
#include "Tools\Radio.hpp"
#include "Item\ItemKeyKit.hpp"
#include "Item\ItemKeys.hpp"

View File

@@ -0,0 +1,11 @@
class ItemRadio : ItemCore
{
class ItemActions
{
class Groups
{
text = $STR_EPOCH_GROUPS_KEY;
script = "spawn dayz_openGroupDialog;";
};
};
};

View File

@@ -0,0 +1,227 @@
class DZ_GroupText: RscText {
idc = -1;
type = 0;
style = 0x00;
sizeEx = .025;
shadow = 2;
colorBackground[] = {1,1,1,0};
colorText[] = {1,1,1,1};
};
class DZ_GroupDynamicText: RscStructuredText {
access = 0;
type = 13;
colorText[] = {1,1,1,1};
class Attributes {
font = "Zeppelin32";
color = "#ffffff";
align = "center";
shadow = true;
};
};
class DZ_GroupListBox: RscListBox {
type = 5;
style = 69;
text = "";
colorBackground[] = {0, 0, 0, 0};
colorSelectBackground[] = {0, 0, 0, 1.0};
colorSelectBackground2[] = {0, 0, 0, 0.8};
colorText[] = {0.95, 0.95, 0.95, 1};
colorScrollbar[] = {.2, .2, .2, 1};
arrowEmpty = "\ca\ui\data\ui_arrow_combo_ca.paa";
arrowFull = "\ca\ui\data\ui_arrow_combo_active_ca.paa";
wholeHeight = .45;
rowHeight = .04;
colorActive[] = {0,0,0,1};
colorDisabled[] = {0,0,0,.3};
sizeEx = .023;
soundSelect[] = {"",.1,1};
soundExpand[] = {"",.1,1};
soundCollapse[] = {"",.1,1};
class ScrollBar;
};
class DZ_GroupButton: RscButton {
idc = -1;
periodFocus = 1.2;
periodOver = .8;
period = .4;
size = .023;
sizeEx = .023;
text = "";
type = 16;
action = "";
x = .317;
w = .14;
h = .05 * safezoneH;
color[] = {0.95, 0.95, 0.95, 1.0};
color2[] = {0.95, 0.95, 0.95, 1};
colorDisabled[] = {1, 1, 1, 0.25};
colorText[] = {0.95, 0.95, 0.95, 1};
colorBackground[] = {1, 1, 1, 1};
colorbackground2[] = {1, 1, 1, 0.4};
colorBackgroundActive[] = {0.5, 0.5, 0.5, 1};
colorBackgroundDisabled[] = {0.1, 0.1, 0.1, 0.5};
colorShadow[] = {0.95, 0.95, 0.95, 1};
colorBorder[] = {0.95, 0.95, 0.95, 1};
animTextureNormal = "\z\addons\dayz_code\gui\grey\ui_button_normal_ca.paa";
animTextureDisabled = "\z\addons\dayz_code\gui\grey\ui_button_disabled_ca.paa";
animTextureOver = "\z\addons\dayz_code\gui\grey\ui_button_over_ca.paa";
animTextureFocused = "\z\addons\dayz_code\gui\grey\ui_button_focus_ca.paa";
animTexturePressed = "\z\addons\dayz_code\gui\grey\ui_button_down_ca.paa";
animTextureDefault = "\z\addons\dayz_code\gui\grey\ui_button_default_ca.paa";
animTextureNoShortcut = "\z\addons\dayz_code\gui\grey\ui_button_normal_ca.paa";
textureNoShortcut = "";
class HitZone {
left = .002;
top = .003;
right = .002;
bottom = .016;
};
class ShortcutPos {
left = -.006;
top = -.007;
w = .0392157;
h = .0522876;
};
class TextPos {
left = .002;
top = .0325;
right = .002;
bottom = .005;
};
class Attributes {
font = "Zeppelin32";
color = "#E5E5E5";
align = "center";
shadow = "1";
};
class AttributesImage {
font = "Zeppelin32";
color = "#E5E5E5";
align = "left";
};
};
class DZ_GroupDialog {
idd = 80000;
movingEnable = 1;
enableSimulation = 1;
class ControlsBackground {
class Window {
idc = -1;
type = 0;
style = 48;
font = "Zeppelin32";
sizeEx = .023;
colorBackground[] = {};
colorText[] = {};
text = "\z\addons\dayz_code\gui\grey\ui_background_controls_ca.paa";
moving = 1;
x = .0;
y = .1;
w = 1.0;
h = .65;
};
class Title: DZ_GroupText {
text = $STR_EPOCH_GROUPS;
sizeEx = .04;
x = .35;
y = .112;
w = .3;
h = .05;
};
class Players: DZ_GroupText {
text = $STR_EPOCH_PLAYERS;
x = .1075;
y = .165;
w = .3;
h = .050;
};
class MyGroup: DZ_GroupText {
text = $STR_EPOCH_MY_GROUP;
x = .5675;
y = .165;
w = .3;
h = .050;
};
class Invite: DZ_GroupDynamicText {
idc = 9;
style = 0;
size = .025;
x = .2735;
y = .4915;
w = .235;
h = .075;
};
};
class controls {
class Players: DZ_GroupListBox {
idc = 1;
onLBSelChanged = "(_this select 0) call dayz_selectPlayer;";
x = .04;
y = .21;
w = .235;
h = .425;
};
class MyGroup: DZ_GroupListBox {
idc = 2;
onLBSelChanged = "(_this select 0) call dayz_selectGroupMember;";
x = .5;
y = .21;
w = .235;
h = .425;
};
class Close: DZ_GroupButton {
idc = -1;
text = $STR_UI_CLOSE;
onButtonClick = "findDisplay 80000 closeDisplay 2;";
x = .03;
y = .6525;
};
class Invite: DZ_GroupButton {
idc = 3;
text = $STR_EPOCH_INVITE;
onButtonClick = "(_this select 0) call dayz_inviteToGroup;";
y = .184;
};
class Kick: DZ_GroupButton {
idc = 4;
text = $STR_EPOCH_KICK;
onButtonClick = "(_this select 0) call dayz_kickFromGroup;";
y = .239;
};
class Disband: DZ_GroupButton {
idc = 5;
text = $STR_EPOCH_DISBAND;
onButtonClick = "(_this select 0) call dayz_disbandGroup;";
y = .294;
};
class Promote: DZ_GroupButton {
idc = 10;
text = $STR_EPOCH_PROMOTE;
onButtonClick = "(_this select 0) call dayz_promotePlayer;";
y = .349;
};
class Leave: DZ_GroupButton {
idc = 6;
text = $STR_EPOCH_LEAVE;
onButtonClick = "(_this select 0) call dayz_leaveGroup;";
y = .405;
};
class Accept: DZ_GroupButton {
idc = 7;
text = $STR_EPOCH_ACCEPT;
onButtonClick = "(_this select 0) call dayz_joinGroup;";
y = .5265;
};
class Reject: DZ_GroupButton {
idc = 8;
text = $STR_EPOCH_REJECT;
onButtonClick = "(_this select 0) call dayz_rejectGroup;";
y = .5765;
};
};
};

View File

@@ -617,4 +617,135 @@ class RscTitles
};
};
};
class DZ_GroupIcons
{
idd = -1;
movingEnable = 1;
enableSimulation = 1;
enableDisplay = 1;
onLoad = "uiNamespace setVariable ['DZ_GroupIcons',_this select 0];";
duration = 99999999999999999;
fadein = 0;
fadeout = 0;
class controls
{
class Icons: DZ_GroupDynamicText
{
idc = -1;
style = 0x00;
x = .9;
y = .9;
w = .9;
h = .9;
size = .08;
colorBackground[] = {0,0,0,0};
colortext[] = {0,0,0,.7};
class Attributes {
align = "left";
};
};
// Max 100 players per group
class Icon0:Icons {idc = 100;};
class Icon1:Icons {idc = 101;};
class Icon2:Icons {idc = 102;};
class Icon3:Icons {idc = 103;};
class Icon4:Icons {idc = 104;};
class Icon5:Icons {idc = 105;};
class Icon6:Icons {idc = 106;};
class Icon7:Icons {idc = 107;};
class Icon8:Icons {idc = 108;};
class Icon9:Icons {idc = 109;};
class Icon10:Icons {idc = 110;};
class Icon11:Icons {idc = 111;};
class Icon12:Icons {idc = 112;};
class Icon13:Icons {idc = 113;};
class Icon14:Icons {idc = 114;};
class Icon15:Icons {idc = 115;};
class Icon16:Icons {idc = 116;};
class Icon17:Icons {idc = 117;};
class Icon18:Icons {idc = 118;};
class Icon19:Icons {idc = 119;};
class Icon20:Icons {idc = 120;};
class Icon21:Icons {idc = 121;};
class Icon22:Icons {idc = 122;};
class Icon23:Icons {idc = 123;};
class Icon24:Icons {idc = 124;};
class Icon25:Icons {idc = 125;};
class Icon26:Icons {idc = 126;};
class Icon27:Icons {idc = 127;};
class Icon28:Icons {idc = 128;};
class Icon29:Icons {idc = 129;};
class Icon30:Icons {idc = 130;};
class Icon31:Icons {idc = 131;};
class Icon32:Icons {idc = 132;};
class Icon33:Icons {idc = 133;};
class Icon34:Icons {idc = 134;};
class Icon35:Icons {idc = 135;};
class Icon36:Icons {idc = 136;};
class Icon37:Icons {idc = 137;};
class Icon38:Icons {idc = 138;};
class Icon39:Icons {idc = 139;};
class Icon40:Icons {idc = 140;};
class Icon41:Icons {idc = 141;};
class Icon42:Icons {idc = 142;};
class Icon43:Icons {idc = 143;};
class Icon44:Icons {idc = 144;};
class Icon45:Icons {idc = 145;};
class Icon46:Icons {idc = 146;};
class Icon47:Icons {idc = 147;};
class Icon48:Icons {idc = 148;};
class Icon49:Icons {idc = 149;};
class Icon50:Icons {idc = 150;};
class Icon51:Icons {idc = 151;};
class Icon52:Icons {idc = 152;};
class Icon53:Icons {idc = 153;};
class Icon54:Icons {idc = 154;};
class Icon55:Icons {idc = 155;};
class Icon56:Icons {idc = 156;};
class Icon57:Icons {idc = 157;};
class Icon58:Icons {idc = 158;};
class Icon59:Icons {idc = 159;};
class Icon60:Icons {idc = 160;};
class Icon61:Icons {idc = 161;};
class Icon62:Icons {idc = 162;};
class Icon63:Icons {idc = 163;};
class Icon64:Icons {idc = 164;};
class Icon65:Icons {idc = 165;};
class Icon66:Icons {idc = 166;};
class Icon67:Icons {idc = 167;};
class Icon68:Icons {idc = 168;};
class Icon69:Icons {idc = 169;};
class Icon70:Icons {idc = 170;};
class Icon71:Icons {idc = 171;};
class Icon72:Icons {idc = 172;};
class Icon73:Icons {idc = 173;};
class Icon74:Icons {idc = 174;};
class Icon75:Icons {idc = 175;};
class Icon76:Icons {idc = 176;};
class Icon77:Icons {idc = 177;};
class Icon78:Icons {idc = 178;};
class Icon79:Icons {idc = 179;};
class Icon80:Icons {idc = 180;};
class Icon81:Icons {idc = 181;};
class Icon82:Icons {idc = 182;};
class Icon83:Icons {idc = 183;};
class Icon84:Icons {idc = 184;};
class Icon85:Icons {idc = 185;};
class Icon86:Icons {idc = 186;};
class Icon87:Icons {idc = 187;};
class Icon88:Icons {idc = 188;};
class Icon89:Icons {idc = 189;};
class Icon90:Icons {idc = 190;};
class Icon91:Icons {idc = 191;};
class Icon92:Icons {idc = 192;};
class Icon93:Icons {idc = 193;};
class Icon94:Icons {idc = 194;};
class Icon95:Icons {idc = 195;};
class Icon96:Icons {idc = 196;};
class Icon97:Icons {idc = 197;};
class Icon98:Icons {idc = 198;};
class Icon99:Icons {idc = 199;};
class Icon100:Icons {idc = 200;};
};
};
};

View File

@@ -1,3 +1,4 @@
#include "RscGroups.hpp"
#include "RscDisplayCraftingMenu.hpp"
#include "RscDisplayGear.hpp"
#include "RscDisplayGenderSelect.hpp"

View File

@@ -5,5 +5,5 @@ call Z_clearBuyList;
{
_index = lbAdd [Z_AT_BUYABLELIST,_x select 0];
lbSetPicture [Z_AT_BUYABLELIST,_index,"\z\addons\dayz_code\gui\epoch\arrow_right.paa"];
lbSetPicture [Z_AT_BUYABLELIST,_index,"\z\addons\dayz_code\gui\grey\arrow_right.paa"];
} forEach Z_traderData;

View File

@@ -43,6 +43,18 @@ if (isNil "keyboard_keys") then {
};
_handled = true;
};
_openGroups = {
if (dayz_requireRadio && !("ItemRadio" in items player)) then {
localize "STR_EPOCH_NEED_RADIO" call dayz_rollingMessages;
} else {
if (isNull findDisplay 80000) then {
if (!isNil "dayz_groupInit") then {[] spawn dayz_openGroupDialog;};
} else {
findDisplay 80000 closeDisplay 2;
};
};
_handled = true;
};
_muteSound = {
call player_toggleSoundMute;
_handled = true;
@@ -350,6 +362,11 @@ if (isNil "keyboard_keys") then {
DIK_F8,DIK_F7,DIK_F6,DIK_F5,DIK_F4,
DIK_F3,DIK_F2,DIK_9,
DIK_8,DIK_7,DIK_6,DIK_5,DIK_4], _block] call _addArray;
if (dayz_groupSystem) then {
[[DIK_F5], _openGroups] call _addArray;
[[DIK_LWIN,DIK_RWIN], {dayz_groupNameTags = !dayz_groupNameTags;_handled = true;}] call _addArray;
[actionKeys "TacticalView", _block] call _addArray;
};
diag_log "keyboard_keys reset";
if (!isNil "bis_fnc_halo_keydown_eh") then {bis_fnc_halo_keydown_eh = (finddisplay 46) displayaddeventhandler ["keydown","_this call bis_fnc_halo_keydown;"];}; // halo in progress
};

View File

@@ -123,7 +123,11 @@ _switchUnit = {
removeAllWeapons _oldUnit;
{_oldUnit removeMagazine _x;} count magazines _oldUnit;
if !(isNull _oldUnit) then {deleteVehicle _oldUnit;};
deleteGroup _oldGroup;
if (!isNil "dayz_groupInit" && count (units _oldGroup) > 1) then {
[_newUnit] join _oldGroup;
if (count (units _group) == 0) then {deleteGroup _group;};
};
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
if (_currentWpn != "") then {_newUnit selectWeapon _currentWpn;};
};

View File

@@ -13,7 +13,10 @@ if (_button == 1) then {
_pos = ctrlPosition _group;
_item = gearSlotData _control;
if (!DZE_SelfTransfuse && _item in ["ItemBloodbag","wholeBloodBagANEG","wholeBloodBagAPOS","wholeBloodBagBNEG","wholeBloodBagBPOS","wholeBloodBagABNEG","wholeBloodBagABPOS","wholeBloodBagONEG","wholeBloodBagOPOS"]) exitWith {}; // No right click option on bloodbags if DZE_SelfTransfuse = false;
if ( //No right click action
(!DZE_SelfTransfuse && _item in ["ItemBloodbag","wholeBloodBagANEG","wholeBloodBagAPOS","wholeBloodBagBNEG","wholeBloodBagBPOS","wholeBloodBagABNEG","wholeBloodBagABPOS","wholeBloodBagONEG","wholeBloodBagOPOS"]) or
(!dayz_groupSystem && _item == "ItemRadio")
) exitWith {};
if (mouseOverCarry) then {
_item = DayZ_onBack;
carryClick = true;

View File

@@ -41,7 +41,6 @@ timezoneswitch = 0; // Changes murderMenu times with this offset in hours.
DZE_SafeZonePosArray = []; //Prevent players in safeZones from being killed if their vehicle is destroyed. Format is [[[3D POS], RADIUS],[[3D POS], RADIUS]]; Ex. DZE_SafeZonePosArray = [[[6325.6772,7807.7412,0],150],[[4063.4226,11664.19,0],150]];
DZE_GemOccurance = [["ItemTopaz",10], ["ItemObsidian",8], ["ItemSapphire",6], ["ItemAmethyst",4], ["ItemEmerald",3], ["ItemCitrine",2], ["ItemRuby",1]]; //Sets how rare each gem is in the order shown when mining (whole numbers only)
DZE_GodModeBaseExclude = []; //Array of object class names excluded from the god mode bases feature
DZE_groupManagement = false; //Enable or disable group management. Enabled by default
DZE_salvageLocked = true; //Enable or disable salvaging of locked vehicles, useful for stopping griefing on locked vehicles.
// Trader Menu
@@ -83,6 +82,12 @@ DZE_doorManagementAdmins = []; //Array of admin PlayerUIDs enclosed in quotation
DZE_doorManagementAllowManualCode = true; //Allows opening doors still using PIN
DZE_doorManagementMaxFriends = 10; //Maximum number of friends allowed on a door.
// Group System
dayz_groupSystem = true; // Enable group system
dayz_markGroup = 1; // Players can see group members positions on the map 0=never, 1=always, 2=With GPS only
dayz_markSelf = 0; // Players can see their own position on the map 0=never, 1=always, 2=With GPS only
dayz_markBody = 0; // Players can see their corpse position on the map 0=never, 1=always, 2=With GPS only
dayz_requireRadio = false; // Require players to have a radio on their toolbelt to create a group, be in a group and receive invites
/*
Developers:

View File

@@ -0,0 +1,21 @@
private "_group";
_group = group player;
if (count (units _group) == 1 or (!isNil "dayz_groupDisbandThread" && {!scriptDone dayz_groupDisbandThread})) exitWith {
_this ctrlShow false;
};
dayz_groupDisbanded = nil;
PVDZ_Server_UpdateGroup = [4,player];
publicVariableServer "PVDZ_Server_UpdateGroup";
dayz_groupDisbandThread = _group spawn {
//Wait for response from server to confirm group finished updating in DB
waitUntil {!isNil "dayz_groupDisbanded"};
{
[_x] join grpNull;
} count (units _this);
deleteGroup _this;
};

View File

@@ -0,0 +1,10 @@
private "_group";
_group = [];
{
if (alive _x && isPlayer _x) then {
_group set [count _group,_x];
};
} count (units group _this);
_group

View File

@@ -0,0 +1,8 @@
private "_crew";
_crew = [];
{
_crew set [count _crew, if (alive _x) then {name _x} else {"unknown"}];
} count crew _this;
format ["%1%2",typeOf _this,_crew]

View File

@@ -0,0 +1,10 @@
private "_player";
_player = objNull;
{
if (getPlayerUID _x == _this) exitWith {
_player = _x;
};
} count allUnits;
_player

View File

@@ -0,0 +1,45 @@
// OnEachFrame loop
private ["_display","_distance","_group","_icon","_index","_pos","_scale","_screen","_text"];
_group = player call dayz_filterGroup;
if (!visibleMap && count _group > 1 && cameraView in ["INTERNAL","EXTERNAL","GUNNER"]) then {
80000 cutRsc ["DZ_GroupIcons","PLAIN"];
_display = uiNamespace getVariable "DZ_GroupIcons";
_index = 0;
{
_pos = getPosATL _x;
if (surfaceIsWater _pos) then {_pos = getPosASL _x;};
_distance = _pos distance player;
_icon = _display displayCtrl (100 + _index);
if (_distance > 1 && _distance < 2500) then {
_pos set [2,(_pos select 2) + 1.5];
_screen = worldToScreen _pos;
_text = composeText [image "\ca\ui\data\igui_side_unknown_ca.paa"," ",if (dayz_groupNameTags) then {name _x} else {""}];
if (count _screen > 1) then {
_scale = if (_distance < 200) then {.3} else {1 min ((1 - (_distance - 3) / 15) max .3)};
_icon ctrlSetStructuredText _text;
_icon ctrlSetPosition [(_screen select 0),(_screen select 1),.99,.65];
_icon ctrlSetScale _scale;
_icon ctrlSetFade ((1 - _scale) / 2);
_icon ctrlCommit 0;
_icon ctrlShow true;
} else {
_icon ctrlShow false;
};
} else {
_icon ctrlShow false;
};
_index = _index + 1;
} count _group;
if (dayz_oldGroupCount > count _group) then {
_display displayCtrl (100 + _index) ctrlShow false;
};
dayz_oldGroupCount = count _group;
} else {
if (!isNull (uiNamespace getVariable "DZ_GroupIcons")) then {
80000 cutText ["","PLAIN"];
};
};

View File

@@ -0,0 +1,36 @@
private ["_add","_inviter","_recipient","_uid","_unit"];
_add = _this select 0;
_uid = _this select 1;
// Update active invites on all machines with the change
if (_add) then {
_inviter = _uid select 0;
_recipient = _uid select 1;
dayz_activeInvites set [count dayz_activeInvites,_uid];
if (!isDedicated && {_recipient == getPlayerUID player} && {!dayz_requireRadio or {dayz_requireRadio && "ItemRadio" in items player}}) then {
localize "STR_EPOCH_INVITE_NEW" call dayz_rollingMessages;
};
} else {
// Remove all invites to this player
_inviter = "0";
_recipient = _uid;
{
if (_recipient == _x select 1) then {
dayz_activeInvites set [_forEachIndex,"delete"];
};
} forEach dayz_activeInvites;
dayz_activeInvites = dayz_activeInvites - ["delete"];
};
// Send change to all active clients except the originator (they already updated themself)
if (isServer) then {
PVDZ_groupInvite = _this;
{
_unit = getPlayerUID _x;
if (_unit != "" && ((!_add && _unit != _recipient) or (_add && _unit != _inviter))) then {
// Don't use regular PV because JIP clients don't need it (dayz_activeInvites is synced to them in server_playerLogin)
owner _x publicVariableClient "PVDZ_groupInvite";
};
} count allUnits;
};

View File

@@ -0,0 +1,57 @@
// Two second loop
private ["_count","_group","_hasGPS","_index","_marker","_markBody","_markGroup","_markSelf","_pos","_self","_vehicle"];
_group = player call dayz_filterGroup;
if (dayz_requireRadio && {count _group > 1} && {!("ItemRadio" in items player)}) exitWith {
[player] join grpNull;
_group = [];
if (!isNull findDisplay 80000) then {findDisplay 80000 closeDisplay 2;};
localize "STR_EPOCH_RADIO_CONTACT_LOST" call dayz_rollingMessages;
};
if (visibleMap or !isNull findDisplay 88890) then {
_hasGPS = "ItemGPS" in items player;
_markBody = (dayz_markBody == 1 or (dayz_markBody == 2 && _hasGPS));
_markGroup = (dayz_markGroup == 1 or (dayz_markGroup == 2 && _hasGPS));
_markSelf = (dayz_markSelf == 1 or (dayz_markSelf == 2 && _hasGPS));
_index = 0;
{
_self = _x == player;
_vehicle = vehicle _x;
if ((_self or _markGroup) && (!_self or _markSelf) && (driver _vehicle == _x)) then {
_pos = getPosATL _x;
if (surfaceIsWater _pos) then {_pos = getPosASL _x;};
deleteMarkerLocal format["groupMember%1",_index];
_marker = createMarkerLocal [format["groupMember%1",_index],_pos];
_marker setMarkerTypeLocal "DestroyedVehicle";
_marker setMarkerTextLocal format ["%1",if (_vehicle == _x) then {name _x} else {_vehicle call dayz_getCrew}];
_marker setMarkerColorLocal "ColorGreen";
} else {
deleteMarkerLocal format["groupMember%1",_index];
};
_index = _index + 1;
} count _group;
// Remove markers for group members that left
_count = count _group;
if (dayz_oldMemberCount > _count) then {
for "_i" from _count to dayz_oldMemberCount do {deleteMarkerLocal format["groupMember%1",_i];};
};
dayz_oldMemberCount = _count;
if (_markBody) then {
{
if (_x getVariable["bodyName",""] == name player) then {
deleteMarkerLocal "MyBody";
_marker = createMarkerLocal ["MyBody",getPosATL _x];
_marker setMarkerTypeLocal "DestroyedVehicle";
_marker setMarkerTextLocal localize "STR_EPOCH_RIP";
_marker setMarkerColorLocal "ColorRed";
};
} count allDead;
} else {
deleteMarkerLocal "MyBody";
};
};

View File

@@ -0,0 +1,39 @@
private "_oldGroup";
if (count (units group player) > 1) then {
[player] join grpNull;
};
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 {
_oldGroup = group player;
[player] join _x;
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
// Update saved group in DB
PVDZ_Server_UpdateGroup = [0,player];
publicVariableServer "PVDZ_Server_UpdateGroup";
};
} count allGroups;
};
dayz_oldGroupCount = 0;
dayz_oldMemberCount = 0;
dayz_disbandGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\disbandGroup.sqf";
dayz_filterGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\filterGroup.sqf";
dayz_getCrew = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\getCrew.sqf";
dayz_getPlayer = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\getPlayer.sqf";
dayz_groupIcons = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\groupIcons.sqf";
dayz_groupMarkers = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\groupMarkers.sqf";
dayz_inviteToGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\inviteToGroup.sqf";
dayz_joinGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\joinGroup.sqf";
dayz_kickFromGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\kickFromGroup.sqf";
dayz_leaveGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\leaveGroup.sqf";
dayz_openGroupDialog = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\openDialog.sqf";
dayz_promotePlayer = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\promotePlayer.sqf";
dayz_rejectGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\rejectGroup.sqf";
dayz_selectGroupMember = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\selectGroupMember.sqf";
dayz_selectPlayer = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\selectPlayer.sqf";
dayz_groupInit = true;

View File

@@ -0,0 +1,32 @@
private ["_hasInvite","_invite","_playerList","_recipient","_uid"];
disableSerialization;
_playerList = findDisplay 80000 displayCtrl 1;
_uid = _playerList lbData (lbCurSel _playerList);
_recipient = _uid call dayz_getPlayer;
if (isNull _recipient or player != leader group player or count (units group _recipient) > 1) exitWith {
_this ctrlShow false;
};
_hasInvite = false;
{
if (_x select 1 == _uid) then {
_hasInvite = true;
};
} forEach dayz_activeInvites;
if (_hasInvite) exitWith {
systemChat localize "STR_EPOCH_INVITE_PENDING";
};
_invite = [getPlayerUID player,_uid];
//Update locally with change
dayz_activeInvites set [count dayz_activeInvites,_invite];
//Sync change to all remote machines (less data than sending whole array)
PVDZ_groupInvite = [true,_invite];
publicVariableServer "PVDZ_groupInvite";
systemChat format[localize "STR_EPOCH_INVITE_TO",name _recipient];

View File

@@ -0,0 +1,32 @@
private ["_inviter","_inviterUID","_oldGroup","_uid"];
_inviterUID = "0";
_uid = getPlayerUID player;
//Remove all invites to this player since they joined a group
{
if (_uid == _x select 1) then {
_inviterUID = _x select 0; //Take most recent invite
dayz_activeInvites set [_forEachIndex,"delete"];
};
} forEach dayz_activeInvites;
dayz_activeInvites = dayz_activeInvites - ["delete"];
//Sync change to all remote machines (less data than sending whole array)
PVDZ_groupInvite = [false,_uid];
publicVariableServer "PVDZ_groupInvite";
_inviter = _inviterUID call dayz_getPlayer;
if (!isNull _inviter) then {
_oldGroup = group player;
[player] join (group _inviter);
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
// Update saved group in DB
PVDZ_Server_UpdateGroup = [1,player];
publicVariableServer "PVDZ_Server_UpdateGroup";
} else {
_this ctrlShow false;
systemChat localize "STR_EPOCH_INVITE_EXPIRED";
};

View File

@@ -0,0 +1,15 @@
private ["_myGroup","_target","_targetUID"];
disableSerialization;
_myGroup = findDisplay 80000 displayCtrl 2;
_targetUID = _myGroup lbData (lbCurSel _myGroup);
_target = _targetUID call dayz_getPlayer;
if (isNull _target or _target == player or player != leader group player) exitWith {
_this ctrlShow false;
};
[_target] join grpNull;
PVDZ_Server_UpdateGroup = [2,player,_targetUID];
publicVariableServer "PVDZ_Server_UpdateGroup";

View File

@@ -0,0 +1,16 @@
private "_group";
_group = units group player;
if (count _group == 1 or (!isNil "dayz_groupLeftThread" && {!scriptDone dayz_groupLeftThread})) exitWith {
_this ctrlShow false;
};
dayz_groupLeft = nil;
PVDZ_Server_UpdateGroup = [3,player];
publicVariableServer "PVDZ_Server_UpdateGroup";
dayz_groupLeftThread = [] spawn {
//Wait for response from server to confirm group finished updating in DB
waitUntil {!isNil "dayz_groupLeft"};
[player] join grpNull;
};

View File

@@ -0,0 +1,71 @@
if (!isNull findDisplay 80000) exitWith {};
private ["_disbandButton","_display","_group","_index","_inviteButton","_inviter","_inviterUID","_kickButton","_leader","_leaveButton","_myGroup","_playerList","_promoteButton","_uid"];
disableSerialization;
createDialog "DZ_GroupDialog";
_display = findDisplay 80000;
_uid = getPlayerUID player;
_playerList = _display displayCtrl 1;
_myGroup = _display displayCtrl 2;
_inviteButton = _display displayCtrl 3;
_kickButton = _display displayCtrl 4;
_disbandButton = _display displayCtrl 5;
_leaveButton = _display displayCtrl 6;
_joinButton = _display displayCtrl 7;
_rejectButton = _display displayCtrl 8;
_inviteText = _display displayCtrl 9;
_promoteButton = _display displayCtrl 10;
{_x ctrlShow false;} count [_disbandButton,_inviteButton,_joinButton,_kickButton,_leaveButton,_promoteButton,_rejectButton];
while {!isNull findDisplay 80000} do {
//Fill my group list
_group = group player;
_leader = leader _group;
lbClear _myGroup;
{
if (alive _x && isPlayer _x) then {
_index = _myGroup lbAdd (name _x);
_myGroup lbSetData [_index,getPlayerUID _x];
_myGroup lbSetPicture [_index, if (_x == _leader) then {"\ca\ui\data\icon_unit_teamleader_ca.paa"} else {"\ca\ui\data\map_bush_ca.paa"}];
};
} count (units _group);
lbSort _myGroup;
if (lbSize _myGroup > 1) then {
_leaveButton ctrlShow true;
if (player == _leader) then {_disbandButton ctrlShow true};
} else {
{_x ctrlShow false} count [_disbandButton,_leaveButton];
};
_hasInvite = false;
{
if (_x select 1 == _uid) then {
_hasInvite = true;
_inviterUID = _x select 0; //Take most recent invite
};
} forEach dayz_activeInvites;
if (_hasInvite) then {
{_x ctrlShow true} count [_inviteText,_joinButton,_rejectButton];
_inviter = _inviterUID call dayz_getPlayer;
if (!isNull _inviter) then {
_inviteText ctrlSetStructuredText parseText (format ["%1<br/>%2",localize "STR_EPOCH_INVITE_FROM",name _inviter]);
};
} else {
{_x ctrlShow false} count [_inviteText,_joinButton,_rejectButton];
};
//Fill player list
lbClear _playerList;
{
if (isPlayer _x && _x != player) then {
_index = _playerList lbAdd (name _x);
_playerList lbSetData [_index, getPlayerUID _x];
_playerList lbSetPicture [_index, if (count (units group _x) > 1) then {"\ca\ui\data\ui_task_failed_ca.paa"} else {"\ca\ui\data\ui_task_done_ca.paa"}];
};
} count allUnits;
lbSort _playerList;
uiSleep 1;
};

View File

@@ -0,0 +1,23 @@
private ["_disbandButton","_display","_group","_myGroup","_target","_uid"];
disableSerialization;
_display = findDisplay 80000;
_myGroup = _display displayCtrl 2;
_disbandButton = _display displayCtrl 5;
_promoteButton = _this;
_uid = _myGroup lbData (lbCurSel _myGroup);
_group = group player;
_target = _uid call dayz_getPlayer;
if (player == leader _group && {!isNull _target} && {_target != player}) then {
if (local _group) then {
_group selectLeader _target; //group must be local
_promoteButton ctrlShow false;
_disbandButton ctrlShow false;
} else {
systemChat "Failed: Group must be local to do this";
};
} else {
_promoteButton ctrlShow false;
};

View File

@@ -0,0 +1,16 @@
private "_uid";
_uid = getPlayerUID player;
//Remove all invites to this player
{
if (_uid == _x select 1) then {
dayz_activeInvites set [_forEachIndex,"delete"];
};
} forEach dayz_activeInvites;
dayz_activeInvites = dayz_activeInvites - ["delete"];
_this ctrlShow false;
//Sync change to all remote machines (less data than sending whole array)
PVDZ_groupInvite = [false,_uid];
publicVariableServer "PVDZ_groupInvite";

View File

@@ -0,0 +1,15 @@
private ["_display","_kickButton","_myGroup","_promoteButton","_target","_uid"];
disableSerialization;
_display = findDisplay 80000;
_myGroup = _this;
_kickButton = _display displayCtrl 4;
_promoteButton = _display displayCtrl 10;
_uid = _myGroup lbData (lbCurSel _myGroup);
_target = _uid call dayz_getPlayer;
if (player == leader group player && {!isNull _target} && {_target != player}) then {
{_x ctrlShow true;} count [_kickButton,_promoteButton];
} else {
{_x ctrlShow false;} count [_kickButton,_promoteButton];
};

View File

@@ -0,0 +1,13 @@
private ["_inviteButton","_playerList","_target","_uid"];
disableSerialization;
_playerList = _this;
_inviteButton = findDisplay 80000 displayCtrl 3;
_uid = _playerList lbData (lbCurSel _playerList);
_target = _uid call dayz_getPlayer;
if (player == leader group player && {!isNull _target} && {count (units group _target) == 1}) then {
_inviteButton ctrlShow true;
} else {
_inviteButton ctrlShow false;
};

View File

@@ -0,0 +1,42 @@
private ["_event","_groupUIDs","_key","_newGroup","_player","_playerUID","_targetUID"];
_event = _this select 0;
_player = _this select 1;
_targetUID = if (count _this > 2) then {_this select 2} else {"0"};
_playerUID = getPlayerUID _player;
_groupUIDs = [];
{
if (alive _x && isPlayer _x) then {
_groupUIDs set [count _groupUIDs,getPlayerUID _x];
};
} count (units group _player);
_newGroup = [];
_newGroup = switch _event do {
//Login
case 0;
//Join
case 1;
//Kick (target was already kicked from group)
case 2: {_groupUIDs};
//Leave
case 3: {
dayz_groupLeft = true;
(owner _player) publicVariableClient "dayz_groupLeft";
(_groupUIDs - [_playerUID])
};
//Disband
case 4: {
dayz_groupDisbanded = true;
(owner _player) publicVariableClient "dayz_groupDisbanded";
[]
};
};
// Update all group members' saved group in DB
{
_save = if ((_event == 2 && _x == _targetUID) or (_event == 3 && _x == _playerUID)) then {[]} else {_newGroup};
_key = format ["CHILD:204:%1:%2:%3:",_x,dayZ_instance,_save];
_key call server_hiveWrite;
} count _groupUIDs;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -4,6 +4,7 @@ if (isServer) then {
pvs_processSetAccessCode = compile preprocessFile "\z\addons\dayz_code\eventHandlers\processSetAccessCode.sqf";
pvs_processAccessCode = compile preprocessFile "\z\addons\dayz_code\eventHandlers\processAccessCode.sqf";
server_spawnTraders = compile preprocessFile "\z\addons\dayz_server\compile\server_spawnTraders.sqf";
server_updateGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\server_updateGroup.sqf";
};
if (!isDedicated) then {
@@ -681,6 +682,7 @@ local_spawnObjects = compile preprocessFileLineNumbers "\z\addons\dayz_code\comp
FNC_GetSetPos = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fnc_getSetPos.sqf";
FNC_GetPos = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fnc_getPos.sqf";
dayz_EjectPlayer = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dze_ejectPlayer.sqf";
dayz_groupInvite = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\groupInvite.sqf";
DZE_FilterCheats = {
#define DIK_SUBTRACT 0x4A

View File

@@ -17,6 +17,9 @@
"PVDZE_plr_GutBodyZ" addPublicVariableEventHandler {(_this select 1) spawn local_gutObjectZ};
"PVDZE_veh_Init" addPublicVariableEventHandler {(_this select 1) call fnc_veh_ResetEH};
"PVDZE_obj_Remove" addPublicVariableEventHandler {_pos = (_this select 1); _obj = nearestObjects [_pos, DZE_isWreckBuilding, 5]; if (count _obj > 0) then {deleteVehicle (_obj select 0);};};
if (dayz_groupSystem) then {
"PVDZ_groupInvite" addPublicVariableEventHandler {(_this select 1) call dayz_groupInvite};
};
if (toLower worldName == "chernarus") then { //need to add building coordinates for other maps
{
@@ -99,6 +102,9 @@ if (isServer) then {
"PVDZE_plr_DeathB" addPublicVariableEventHandler {(_this select 1) spawn server_deaths};
"PVDZE_handleSafeGear" addPublicVariableEventHandler {(_this select 1) spawn server_handleSafeGear};
"PVDZE_fullobj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishFullObject}; // PlotForLife take base ownership
if (dayz_groupSystem) then {
"PVDZ_Server_UpdateGroup" addPublicVariableEventHandler {(_this select 1) call server_updateGroup};
};
//Added as part of the maintenance system to allow the server to replace the damaged model with a normal model.
"PVDZ_object_replace" addPublicVariableEventHandler {

View File

@@ -510,6 +510,7 @@ switch (toLower worldName) do {
keypadCancel = false; //Brute force fix
keyPadReset = {uiSleep 2; keypadCancel = false;};
canbuild = true;
dayz_activeInvites = [];
dayz_combination = "";
dayz_disallowedVault = ["TentStorage","BuiltItems","ModularItems","DZE_Base_Object","Generator_DZ"];
// These work with just a running generator
@@ -709,4 +710,5 @@ if (!isDedicated) then {
DZE_Quarantine = false;
DZE_InRadiationZone = false;
DZE_myVehicle = objNull;
dayz_groupNameTags = false;
};

View File

@@ -16182,6 +16182,106 @@
<Czech>Hráč</Czech>
<Japanese>プレイヤー</Japanese>
</Key>
<Key ID="STR_EPOCH_PLAYERS">
<English>Players</English>
<French>Joueurs</French>
<Spanish>Jugadores</Spanish>
<Italian>Giocatori</Italian>
<Hungarian>Játékosok</Hungarian>
<Polish>Gracze</Polish>
<Russian>Игроки</Russian>
<German>Spieler</German>
<Czech>Hráči</Czech>
</Key>
<Key ID="STR_EPOCH_GROUPS_KEY">
<English>Groups (F5)</English>
<Russian>групп</Russian>
<German>Gruppen (F5)</German>
</Key>
<Key ID="STR_EPOCH_GROUPS">
<English>Groups</English>
<Russian>групп</Russian>
<German>Gruppen</German>
</Key>
<Key ID="STR_EPOCH_MY_GROUP">
<English>My Group</English>
</Key>
<Key ID="STR_EPOCH_INVITE">
<English>Invite</English>
<Russian>приглашение</Russian>
<German>Einladen</German>
</Key>
<Key ID="STR_EPOCH_INVITE_FROM">
<English>Invite From</English>
</Key>
<Key ID="STR_EPOCH_INVITE_TO">
<English>You invited %1 to join the group.</English>
</Key>
<Key ID="STR_EPOCH_INVITE_NEW">
<English>New group invite - Press F5 to view</English>
</Key>
<Key ID="STR_EPOCH_INVITE_PENDING">
<English>This player already has a pending invite.</English>
</Key>
<Key ID="STR_EPOCH_INVITE_EXPIRED">
<English>The invite expired.</English>
</Key>
<Key ID="STR_EPOCH_NEED_RADIO">
<English>You need a radio to join a group.</English>
</Key>
<Key ID="STR_EPOCH_LOST_RADIO_CONTACT">
<English>Lost radio contact with group</English>
</Key>
<Key ID="STR_EPOCH_RIP">
<English>RIP</English>
</Key>
<Key ID="STR_EPOCH_PROMOTE">
<English>Promote</English>
</Key>
<Key ID="STR_EPOCH_DISBAND">
<English>Disband</English>
<Russian>распускать</Russian>
<German>Auflösen</German>
</Key>
<Key ID="STR_EPOCH_LEAVE">
<English>Leave</English>
<Russian>Оставлять</Russian>
<German>Verlassen</German>
</Key>
<Key ID="STR_EPOCH_ACCEPT">
<English>Accept</English>
<French>Accepter</French>
<Spanish>Aceptar</Spanish>
<Italian>Accetta</Italian>
<Hungarian>Elfogadás</Hungarian>
<Polish>Zaakceptuj</Polish>
<Russian>Принять</Russian>
<German>Annehmen</German>
<Czech>Přijmout</Czech>
</Key>
<Key ID="STR_EPOCH_REJECT">
<English>Reject</English>
<French>Refuser</French>
<Spanish>Rechazar</Spanish>
<Italian>Rifiuta</Italian>
<Hungarian>Elutasít</Hungarian>
<Polish>Odrzuć</Polish>
<Russian>Отказать</Russian>
<German>Ablehnen</German>
<Czech>Odmítnout</Czech>
</Key>
<Key ID="STR_EPOCH_KICK">
<English>Kick</English>
<French>Ejecter</French>
<Spanish>Expulsa</Spanish>
<Italian>Espelli</Italian>
<Hungarian>Kirúgás</Hungarian>
<Polish>Wyrzuć</Polish>
<Russian>Выгнать</Russian>
<German>Kicken</German>
<Czech>Vyhostit</Czech>
<Japanese>排除</Japanese>
</Key>
<Key ID="STR_EPOCH_AI">
<English>AI</English>
<French>IA</French>

View File

@@ -486,7 +486,7 @@ class FSM
"_isHiveOk = false;" \n
"_newPlayer = false;" \n
"_isInfected = false;" \n
"_mygroup = [];" \n
"dayz_myGroup = [];" \n
"_characterCoins = 0;" \n
"_globalCoins = 0;" \n
"_CoinsSpecial = 0;" \n
@@ -495,7 +495,7 @@ class FSM
" _isHiveOk = _msg select 7;" \n
" _newPlayer = _msg select 8;" \n
" _isInfected = _msg select 9;" \n
" _mygroup = _msg select 10;" \n
" dayz_myGroup = _msg select 10;" \n
" _characterCoins = _msg select 11;" \n
" _globalCoins = _msg select 12;" \n
" _CoinsSpecial = _msg select 13;" \n
@@ -1171,12 +1171,6 @@ class FSM
" player setVariable [""GlobalMoney"", _globalCoins, true];" \n
" player setVariable [""MoneySpecial"", _CoinsSpecial, true];" \n
"};" \n
"" \n
"if (DZE_groupManagement) then {" \n
" player setVariable [""savedGroup"", _mygroup, true];" \n
" player setVariable [""purgeGroup"", 0, true];" \n
"};" \n
"" \n
"dayz_musicH = [] spawn player_music;" \n
"dayz_slowCheck = [] spawn player_spawn_2;" \n
"Dayz_logonTime = daytime;" \n

View File

@@ -227,6 +227,8 @@ while {1 == 1} do {
player setVariable["USEC_infected",true,true];
};
};
if (!isNil "dayz_groupInit") then {call dayz_groupMarkers;};
// Radiation zones rapid blood loss
if (DZE_InRadiationZone) then {

View File

@@ -12,6 +12,7 @@ while {true} do {
if ((!isNil "Dayz_loginCompleted") and {(Dayz_loginCompleted)}) exitWith {
//diag_log [ __FILE__, __LINE__, "End loop"];
dayz_playerName = if (alive player) then {name player} else {"unknown"};
if (dayz_groupSystem) then {call compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\init.sqf";};
};
_display = uiNameSpace getVariable "BIS_loadingScreen";
if ((!isNil "_display") and {(dayz_loadScreenMsg != "" )}) then {

View File

@@ -28,6 +28,8 @@ sched_onEachFrame = {
hintSilent localize "str_player_lowPFS";
diag_log format [ "h1nt: LOW FPS (%1)", diag_fpsmin ];
};
if (!isNil "dayz_groupIcons") then {call dayz_groupIcons;};
_ret
};

View File

@@ -148,6 +148,11 @@ if (_endMission) exitwith {
//Sync chopped trees for JIP player
{_x setDamage 1} count dayz_choppedTrees;
//Sync active group invites to JIP player
if (count dayz_activeInvites > 0) then {
(owner _playerObj) publicVariableClient "dayz_activeInvites";
};
//Record Player Login/LogOut
[_playerID,_charID,1,_playerName] call dayz_recordLogin;

View File

@@ -1,5 +1,5 @@
private ["_distanceFoot","_playerPos","_lastPos","_playerGear","_medical","_currentModel","_currentAnim",
"_currentWpn","_muzzles","_array","_coins","_key","_globalCoins","_bankCoins","_group","_playerBackp",
"_currentWpn","_muzzles","_array","_coins","_key","_globalCoins","_bankCoins","_playerBackp",
"_backpack","_kills","_killsB","_killsH","_headShots","_humanity","_lastTime","_timeGross","_timeSince",
"_timeLeft","_config","_onLadder","_isTerminal","_modelChk","_temp","_currentState","_character",
"_magazines","_characterID","_charPos","_isInVehicle","_name","_isNewMed",
@@ -48,7 +48,6 @@ _distanceFoot = 0;
//all getVariable immediately
_globalCoins = _character getVariable ["GlobalMoney", -1];
_bankCoins = _character getVariable ["MoneySpecial", -1];
_group = _character getVariable ["savedGroup", []];
_coins = _character getVariable [Z_MoneyVariable, -1]; //should getting coins fail set the variable to an invalid value to prevent overwritting the in the DB
_lastPos = _character getVariable ["lastPos",_charPos];
_usec_Dead = _character getVariable ["USEC_isDead",false];
@@ -237,10 +236,5 @@ if (Z_SingleCurrency) then { //update global coins
_key call server_hiveWrite;
};
if (DZE_groupManagement) then { //update player group
_key = format["CHILD:204:%1:%2:%3:",_playerUID,dayZ_instance, _group];
_key call server_hiveWrite;
};
// Force gear updates for nearby vehicles/tents
{[_x,"gear"] call server_updateObject;} count nearestObjects [_charPos,DayZ_GearedObjects,10];
{[_x,"gear"] call server_updateObject;} count nearestObjects [_charPos,DayZ_GearedObjects,10];

View File

@@ -1,3 +1,3 @@
//new
5 !=(remExField|remExFP) !=(PVCDZ_obj_GutBody|drn_AskServerDynamicWeatherEventArgs|BIS_effects_gepv|achievement|dayzFlies) !=PVDZ_(drg_(RaDrag|RaLW|RLact)|getTickTime|hlt_Bleed|obj_(Delete|Publish|RoadFlare|Destroy|Fire)|veh_Save|veh_SF) !=PVDZ_(plr_(Death|Login[12]|LoginRecord|Save|SwitchMove)|Server(_Simulation|StoreVar)|sec_atp) !=PVDZ_playerMedicalSync !=PVDZ_(send(|Unconscious)) !=PVDZ_Server_(buildLock|LogIt) !=PVDZ_Server_process(Code|SetAccessCode) !=PVDZ_objgather_(Delete|Knockdown) !=PVDZE_(obj_(Delete|Publish|Swap|Trade)|fullobj_Publish|maintainArea|veh_(Lock|Publish2|Upgrade)|handleSafeGear|plr_(DeathB|FriendRQ|GutBodyZ|TradeMenu))
5 !=(remExField|remExFP) !=(PVCDZ_obj_GutBody|drn_AskServerDynamicWeatherEventArgs|BIS_effects_gepv|achievement|dayzFlies) !=PVDZ_(drg_(RaDrag|RaLW|RLact)|getTickTime|hlt_Bleed|obj_(Delete|Publish|RoadFlare|Destroy|Fire)|veh_Save|veh_SF) !=PVDZ_(plr_(Death|Login[12]|LoginRecord|Save|SwitchMove)|Server(_Simulation|StoreVar)|sec_atp) !=PVDZ_(playerMedicalSync|object_replace|groupInvite) !=PVDZ_(send(|Unconscious)) !=PVDZ_Server_(buildLock|LogIt|UpdateGroup) !=PVDZ_Server_process(Code|SetAccessCode) !=PVDZ_objgather_(Delete|Knockdown) !=PVDZE_(obj_(Delete|Publish|Swap|Trade)|fullobj_Publish|maintainArea|veh_(Lock|Publish2|Upgrade)|handleSafeGear|plr_(DeathB|FriendRQ|GutBodyZ|TradeMenu))
1=BIS_effects_gepv|PVDZ_(drg_RaDrag|hlt_Bleed|obj_Delete|obj_Destroy|obj_Publish|plr_Death|plr_LoginRecord|sec_atp|send|veh_SF)