AlienX
Valued Member!
Help and discussion for seeing how much space is left in your tent starts here...
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
private [ "_lookingat", "_type", "_maxGuns", "_maxMags", "_maxBags", "_cntGuns", "_cntMags", "_cntBags", "_fndDisplay", "_fndDisplay_Visible", "_dispEnum", "_dispControl", "_dispControlInitText", "_distance", "_typeName" ];
waitUntil {!isNil ("dayzLoginRecord")};
disableSerialization;
_dispControlInitText = "";
_lookingat = objNull;
while {true} do
{
sleep 0.5;
_fndDisplay = findDisplay 106;
_fndDisplay_Visible = ( (str _fndDisplay) != "No display");
if ( _fndDisplay_Visible ) then {
if ( !isNull cursorTarget ) then {
if ( isNull _lookingat ) then {
_lookingat = cursorTarget;
};
_type = typeOf _lookingat;
_distance = ((getPos _lookingat) distance (getPos player));
if ( _distance < 10.5 ) then {
_maxGuns = getNumber(configFile >> "cfgVehicles" >> _type >> "transportMaxWeapons");
_maxMags = getNumber(configFile >> "cfgVehicles" >> _type >> "transportMaxMagazines");
_maxBags = getNumber(configFile >> "cfgVehicles" >> _type >> "transportmaxbackpacks");
if ( (_maxGuns + _maxMags + _maxBags) > 0 ) then {
_typeName = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
_cntGuns = 0;
_cntMags = 0;
_cntBags = 0;
{
_cntGuns = _cntGuns + _x;
} foreach ( (getWeaponCargo _lookingat) select 1 );
{
_cntMags = _cntMags + _x;
} foreach ( (getMagazineCargo _lookingat) select 1 );
{
_cntBags = _cntBags + _x;
} foreach ( (getWeaponCargo _lookingat) select 1 );
_dispControl = _fndDisplay displayCtrl 1001; //156 is the title of the object (eg "old camping tent"), however it flashes every half a second or so - makes it unuseable... 1001 is the title of the dialog.
if ( _dispControlInitText == "" ) then {
_dispControlInitText = ctrlText _dispControl;
};
_dispControl ctrlSetText format [ "%8 (%2/%3 %4/%5 %6/%7)", _dispControlInitText, _cntGuns, _maxGuns, _cntMags, _maxMags, _cntBags, _maxBags, _typeName];
};
};
};
} else {
_lookingat = objNull;
_dispControlInitText = "";
};
};
i believe it when i see it ^^it seems that tomorrow it's the release of dayz 1.7.7
It's displayed in the Gear UI
![]()
But it seems that AlienX forgot about the backpacks
A little fix:
Code:private [ "_lookingat", "_type", "_maxGuns", "_maxMags", "_maxBags" "_cntGuns", "_cntMags", "_cntBags "_fndDisplay", "_fndDisplay_Visible", "_dispEnum", "_dispControl", "_dispControlInitText", "_distance", "_typeName" ]; waitUntil {!isNil ("dayzLoginRecord")}; disableSerialization; _dispControlInitText = ""; _lookingat = objNull; while {true} do { sleep 0.5; _fndDisplay = findDisplay 106; _fndDisplay_Visible = ( (str _fndDisplay) != "No display"); if ( _fndDisplay_Visible ) then { if ( !isNull cursorTarget ) then { if ( isNull _lookingat ) then { _lookingat = cursorTarget; }; _type = typeOf _lookingat; _distance = ((getPos _lookingat) distance (getPos player)); if ( _distance < 10.5 ) then { _maxGuns = getNumber(configFile >> "cfgVehicles" >> _type >> "transportMaxWeapons"); _maxMags = getNumber(configFile >> "cfgVehicles" >> _type >> "transportMaxMagazines"); _maxBags = getNumber(configFile >> "cfgVehicles" >> _type >> "transportmaxbackpacks"); if ( (_maxGuns + _maxMags + _maxBags) > 0 ) then { _typeName = getText(configFile >> "cfgVehicles" >> _type >> "displayName"); _cntGuns = 0; _cntMags = 0; _cntBags = 0; { _cntGuns = _cntGuns + _x; } foreach ( (getWeaponCargo _lookingat) select 1 ); { _cntMags = _cntMags + _x; } foreach ( (getMagazineCargo _lookingat) select 1 ); { _cntBags = _cntBags + _x; } foreach ( (getWeaponCargo _lookingat) select 1 ); _dispControl = _fndDisplay displayCtrl 1001; //156 is the title of the object (eg "old camping tent"), however it flashes every half a second or so - makes it unuseable... 1001 is the title of the dialog. if ( _dispControlInitText == "" ) then { _dispControlInitText = ctrlText _dispControl; }; _dispControl ctrlSetText format [ "%8 (%2/%3 %4/%5 %6/%7)", _dispControlInitText, _cntGuns, _maxGuns, _cntMags, _maxMags, _cntBags, _maxBags, _typeName]; }; }; }; } else { _lookingat = objNull; _dispControlInitText = ""; }; };
private [ "_lookingat", "_type", "_maxGuns", "_maxMags", "_maxBags", "_cntGuns", "_cntMags", "_cntBags", "_fndDisplay", "_fndDisplay_Visible", "_dispEnum", "_dispControl", "_dispControlInitText", "_distance", "_typeName" ];
waitUntil {!isNil ("dayzLoginRecord")};
disableSerialization;
_dispControlInitText = "";
_lookingat = objNull;
while {true} do
{
sleep 0.5;
_fndDisplay = findDisplay 106;
_fndDisplay_Visible = ( (str _fndDisplay) != "No display");
if ( _fndDisplay_Visible ) then {
if ( !isNull cursorTarget ) then {
if ( isNull _lookingat ) then {
_lookingat = cursorTarget;
};
_type = typeOf _lookingat;
_distance = ((getPos _lookingat) distance (getPos player));
if ( _distance < 10.5 ) then {
_maxGuns = getNumber(configFile >> "cfgVehicles" >> _type >> "transportMaxWeapons");
_maxMags = getNumber(configFile >> "cfgVehicles" >> _type >> "transportMaxMagazines");
_maxBags = getNumber(configFile >> "cfgVehicles" >> _type >> "transportmaxbackpacks");
if ( (_maxGuns + _maxMags + _maxBags) > 0 ) then {
_typeName = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
_cntGuns = 0;
_cntMags = 0;
_cntBags = 0;
{
_cntGuns = _cntGuns + _x;
} foreach ( (getWeaponCargo _lookingat) select 1 );
{
_cntMags = _cntMags + _x;
} foreach ( (getMagazineCargo _lookingat) select 1 );
{
_cntBags = _cntBags + _x;
} foreach ( (getWeaponCargo _lookingat) select 1 );
_dispControl = _fndDisplay displayCtrl 1001; //156 is the title of the object (eg "old camping tent"), however it flashes every half a second or so - makes it unuseable... 1001 is the title of the dialog.
if ( _dispControlInitText == "" ) then {
_dispControlInitText = ctrlText _dispControl;
};
_dispControl ctrlSetText format [ "%8 (%2/%3 %4/%5 %6/%7)", _dispControlInitText, _cntGuns, _maxGuns, _cntMags, _maxMags, _cntBags, _maxBags, _typeName];
};
};
};
} else {
_lookingat = objNull;
_dispControlInitText = "";
};
};