This commit is contained in:
2022-04-21 16:15:41 +03:00
commit 9d4fc88901
601 changed files with 66252 additions and 0 deletions

View File

@ -0,0 +1,304 @@
class rv_RscText {
idc = -1;
x = 0;
y = 0;
h = 0.037;
w = 0.3;
type = 0;
style = 0;
shadow = 2;
colorShadow[] = {0, 0, 0, 0.5};
font = "Zeppelin32";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
text = "";
colorText[] = {1, 1, 1, 1.0};
colorBackground[] = {0, 0, 0, 0};
linespacing = 1;
tooltipColorText[] = {1,1,1,1};
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
};
class rv_RscTitle : rv_RscText {
idc = -1;
style = 0;
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {0.95, 0.95, 0.95, 1};
};
class rv_RscShortcutButton {
idc = -1;
style = 0;
default = 0;
shadow = 2;
w = 0.183825;
h = "((((safezoneW / safezoneH) min 1.2) / 1.2) / 20)";
color[] = {1,1,1,1.0};
colorFocused[] = {1,1,1,1.0};
color2[] = {0.95,0.95,0.95,1};
colorDisabled[] = {1,1,1,0.25};
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1};
colorBackgroundFocused[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1};
colorBackground2[] = {1,1,1,1};
animTextureDefault = "gza\scripts\gold\gui\normal_ca.paa";
animTextureNormal = "gza\scripts\gold\gui\normal_ca.paa";
animTextureDisabled = "gza\scripts\gold\gui\normal_ca.paa";
animTextureOver = "gza\scripts\gold\gui\over_ca.paa";
animTextureFocused = "gza\scripts\gold\gui\focus_ca.paa";
animTexturePressed = "gza\scripts\gold\gui\down_ca.paa";
periodFocus = 1.2;
periodOver = 0.8;
class HitZone {
left = 0.0;
top = 0.0;
right = 0.0;
bottom = 0.0;
};
class ShortcutPos {
left = 0;
top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";
w = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)";
h = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
};
class TextPos {
left = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)";
top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";
right = 0.005;
bottom = 0.0;
};
period = 0.4;
font = "Zeppelin32";
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
text = "";
action = "";
class Attributes {
font = "Zeppelin32";
color = "#E5E5E5";
align = "left";
shadow = "true";
};
class AttributesImage {
font = "Zeppelin32";
color = "#E5E5E5";
align = "left";
};
soundPush[] = { "", 0, 1 };
soundEnter[] ={ "", 0, 1 };
soundClick[] ={ "", 0, 1 };
soundEscape[] ={ "", 0, 1 };
sound[] ={ "", 0, 1 };
};
class rv_RscButtonMenu : rv_RscShortcutButton {
idc = -1;
type = 16;
style = "0x02 + 0xC0";
default = 0;
shadow = 0;
x = 0;
y = 0;
w = 0.095589;
h = 0.039216;
animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
colorBackground[] = {0,0,0,0.8};
colorBackgroundFocused[] = {1,1,1,1};
colorBackground2[] = {0.75,0.75,0.75,1};
color[] = {1,1,1,1};
colorFocused[] = {0,0,0,1};
color2[] = {0,0,0,1};
colorText[] = {1,1,1,1};
colorDisabled[] = {1,1,1,0.25};
period = 1.2;
periodFocus = 1.2;
periodOver = 1.2;
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
tooltipColorText[] = {1,1,1,1};
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
class TextPos {
left = "0.25 * (((safezoneW / safezoneH) min 1.2) / 40)";
top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";
right = 0.005;
bottom = 0.0;
};
class Attributes {
font = "Zeppelin32";
color = "#E5E5E5";
align = "center";
shadow = "false";
};
class ShortcutPos {
left = "(6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005";
top = 0.005;
w = 0.0225;
h = 0.03;
};
textureNoShortcut = "";
};
class rv_RscListBox {
style = 16;
idc = -1;
type = 5;
w = 0.275;
h = 0.04;
font = "Zeppelin32";
colorSelect[] = {0.11,0.686,0.831,1};
colorText[] = {1, 1, 1, 1};
colorBackground[] = {0.28,0.28,0.28,0.28};
colorSelect2[] = {1, 1, 1, 1};
colorSelectBackground[] = {0.95, 0.95, 0.95, 0.5};
colorSelectBackground2[] = {1, 1, 1, 0.5};
colorScrollbar[] = {0.2, 0.2, 0.2, 1};
arrowFull = "\ca\ui\data\igui_arrow_top_active_ca.paa";
arrowEmpty = "\ca\ui\data\igui_arrow_top_ca.paa";
wholeHeight = 0.45;
rowHeight = 0.04;
color[] = {0.7, 0.7, 0.7, 1};
colorActive[] = {0,0,0,1};
colorDisabled[] = {0,0,0,0.3};
sizeEx = 0.023;
maxHistoryDelay = 1;
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
tooltipColorText[] = {1,1,1,1};
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
class ScrollBar {
color[] = {1, 1, 1, 0.6};
colorActive[] = {1, 1, 1, 1};
colorDisabled[] = {1, 1, 1, 0.3};
thumb = "\ca\ui\data\igui_scrollbar_thumb_ca.paa";
arrowFull = "\ca\ui\data\igui_arrow_top_active_ca.paa";
arrowEmpty = "\ca\ui\data\igui_arrow_top_ca.paa";
border = "\ca\ui\data\igui_border_scroll_ca.paa";
};
soundPush[] = { "", 0, 1 };
soundEnter[] ={ "", 0, 1 };
soundClick[] ={ "", 0, 1 };
soundEscape[] ={ "", 0, 1 };
sound[] ={ "", 0, 1 };
soundSelect[] = { "", 0, 1 };
};
class rv_RscStructuredText {
type = 13;
style = 0;
x = 0;
y = 0;
h = 0.035;
w = 0.1;
text = "";
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {1, 1, 1, 1.0};
shadow = 1;
class Attributes {
font = "Zeppelin32";
color = "#ffffff";
align = "left";
shadow = 1;
};
};
class remoteVehicle {
idd = 8800;
name="remoteVehicle";
onLoad = "uiNamespace setVariable ['rv_dialog', _this select 0]";
movingEnabled = 0;
enableSimulation = 1;
class controlsBackground {
class rv_RscTitleBackground : rv_RscText {
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
idc = -1;
x = 0.1;
y = 0.2;
w = 0.8;
h = (1 / 25);
};
class MainBackground : rv_RscText {
colorBackground[] = {0,0,0,0.7};
idc = -1;
x = 0.1;
y = 0.2 + (11 / 250);
w = 0.8;
h = 0.7 - (22 / 250);
};
class VehicleInfoHeader : rv_RscText {
idc = 8830;
text = $STR_CL_RV_VEHICLE_INFO;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
x = 0.47; y = 0.26;
w = 0.42;
h = (1 / 25);
};
class CloseBtn : rv_RscButtonMenu {
idc = -1;
text = $STR_UI_CLOSE;
onButtonClick = "closeDialog 2;";
x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
y = 0.9 - (1 / 25);
w = (6.25 / 40);
h = (1 / 25);
};
};
class controls {
class Title : rv_RscTitle {
idc = 8801;
text = "";
x = 0.1;
y = 0.2;
w = 0.8;
h = (1 / 25);
};
class VehicleList : rv_RscListBox {
idc = 8802;
text = "";
sizeEx = 0.04;
colorBackground[] = {0.1,0.1,0.1,0.9};
onLBSelChanged = "[_this] call rv_vehicleInfo;";
x = 0.11; y = 0.302;
w = 0.35; h = 0.49;
};
class VehicleTitleBox : rv_RscText {
idc = 8804;
text = $STR_CL_RV_VEHICLE_LIST;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
x = 0.11; y = 0.26;
w = 0.35;
h = (1 / 25);
};
class selectVehicle : rv_RscButtonMenu {
idc = 8850;
text = $STR_CL_RV_SELECT_VEHICLE;
onButtonClick = "rv_isOk = true;closeDialog 0;";
x = 0.1 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
y = 0.9 - (1 / 25);
w = (6.25 / 20);
h = (1 / 25);
};
class vehicleInfomationList : rv_RscStructuredText {
idc = 8803;
text = "";
sizeEx = 0.035;
x = 0.47; y = 0.3;
w = 0.41; h = 0.5;
};
};
};

View File

@ -0,0 +1,157 @@
/*
Remote vehicle script by salival (https://github.com/oiad)
*/
private ["_characterID","_checkDistance","_display","_distance","_fuel","_group","_vehicleFound","_keyID","_keyName","_option","_time","_vehicle","_vehicleType","_index","_control","_keyDisplay","_exit"];
if (isNil "rv_init") then {
rv_vehicleInfo = compile preprocessFileLineNumbers "scripts\remoteVehicle\vehicleInfo.sqf";
rv_init = true;
};
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true;
_keyName = _this select 0;
_option = _this select 1;
_checkDistance = true; // Check to see if the player is too far away from the remote
_distance = 300; // Maximum distance the player can be away from the vehicle to be able to use the remote.
disableSerialization;
_exit = {
dayz_actionInProgress = false;
rv_vehicleList = nil;
rv_selected = nil;
};
_display = findDisplay 106;
_display closeDisplay 0;
_keyList = call epoch_tempKeys;
_keyID = 0;
_keyID = (_keyList select 0) select ((_keyList select 2) find _keyName);
_foundPos = (_keyList select 0) find _keyID;
if (_foundPos >= 0) then {
_keyDisplay = (_keyList select 1) select _foundPos;
};
if (_foundPos == -1) exitWith {systemChat localize "STR_CL_RV_NO_KEYS"; call _exit;};
rv_vehicleList = [];
_vehicleFound = false;
{
_vehicleType = typeOf _x;
_characterID = _x getVariable ["CharacterID","0"];
if ((_characterID == _keyID) && {_vehicleType isKindOf "Air" || _vehicleType isKindOf "LandVehicle" || _vehicleType isKindOf "Ship"}) then {
_vehicleFound = true;
rv_vehicleList set [count rv_vehicleList,_x];
};
} count vehicles;
if (count rv_vehicleList > 1) then {
rv_isOk = false;
createDialog "remoteVehicle";
_display = uiNamespace getVariable["rv_dialog", displayNull];
_display displayCtrl 8801 ctrlSetText(format[localize "STR_CL_RV_TITLE",_keyDisplay]);
_control = ((findDisplay 8800) displayCtrl 8802);
lbClear _control;
{
_control lbAdd getText(configFile >> "CfgVehicles" >> typeOf _x >> "displayName");
if (!isNull DZE_myVehicle && {local DZE_myVehicle} && {alive DZE_myVehicle} && {DZE_myVehicle == _x}) then {
_control lbSetColor [(lbSize _control)-1,[0, 1, 0, 1]];
};
} count rv_vehicleList;
_control lbSetCurSel 0;
waitUntil {!dialog};
} else {
rv_selected = rv_vehicleList select 0;
rv_isOk = true;
};
if (!rv_isOk) exitWith {call _exit;};
if (!_vehicleFound) exitWith {systemChat localize "STR_CL_RV_NO_VEHICLES"; call _exit;};
_vehicleType = typeOf rv_selected;
_displayName = getText(configFile >> "CfgVehicles" >> _vehicleType >> "displayName");
if (!alive rv_selected) exitWith {systemChat localize "STR_CL_RV_DESTROYED"; call _exit;};
if (_checkDistance && {(player distance rv_selected) >= _distance}) exitWith {format[localize "STR_CL_RV_RANGE_FAIL",_displayName] call dayz_rollingMessages; call _exit;};
if (_option == 1) then {
_group = units group player;
systemChat format[localize "STR_CL_RV_EJECT",_displayName];
{
if !(_x in _group) then {
_x action ["eject",rv_selected];
systemChat format[localize "STR_CL_RV_EJECT_PLAYER",name _x];
};
} forEach (crew rv_selected);
};
if (_option == 2) then {
systemChat format[localize "STR_CL_RV_ENGINE",if (isEngineOn rv_selected) then {localize "strwfoff"} else {localize "strwfon"},_displayName];
if (isEngineOn rv_selected) then {
if (rv_selected isKindOf "Helicopter") then { // This is needed because dayz_engineSwitch won't turn off the engine for a helicopter.
_fuel = fuel rv_selected;
rv_selected setFuel 0;
player action ["engineOff",rv_selected];
uiSleep 4.5;
rv_selected setFuel _fuel;
} else {
[rv_selected,false] call dayz_engineSwitch;
};
} else {
[rv_selected,true] call dayz_engineSwitch;
};
};
if (_option == 3) then {
systemChat format[localize "STR_BLD_UNLOCKED",_displayName];
PVDZE_veh_Lock = [rv_selected,false];
_time = diag_tickTime;
if (local rv_selected) then {
PVDZE_veh_Lock call local_lockUnlock;
} else {
publicVariable "PVDZE_veh_Lock";
waitUntil {uiSleep 0.1;(!locked rv_selected or (diag_tickTime - _time > 4))};
};
};
if (_option == 4) then {
systemChat format[localize "STR_EPOCH_PLAYER_117",_displayName];
PVDZE_veh_Lock = [rv_selected,true];
_time = diag_tickTime;
if (local rv_selected) then {
PVDZE_veh_Lock call local_lockUnlock;
} else {
publicVariable "PVDZE_veh_Lock";
waitUntil {uiSleep 0.1;(locked rv_selected or (diag_tickTime - _time > 4))};
};
};
if (_option == 5) then {
if !(rv_selected getVariable["vehicleLights",false]) then {
player action ["lightOn", rv_selected];
systemChat format[localize "STR_CL_RV_LIGHTS",localize "strwfon",_vehicleType];
rv_selected setVariable ["vehicleLights",true,true];
} else {
player action ["lightOff", rv_selected];
systemChat format[localize "STR_CL_RV_LIGHTS",localize "strwfoff",_vehicleType];
rv_selected setVariable ["vehicleLights",false,true];
};
};
call _exit;

View File

@ -0,0 +1,54 @@
private ["_backPackCount","_backPackCount_raw","_backPackSlots","_formattedText","_gearCount","_magazineCount","_magazineCount_raw","_magazineSlots","_name","_picture","_price","_text","_typeOf","_weaponSlots","_weaponsCount","_weaponsCount_raw","_control","_index"];
_gearCount = {
private ["_counter"];
_counter = 0;
{_counter = _counter + _x;} count _this;
_counter
};
_control = (_this select 0) select 0;
_index = (_this select 0) select 1;
rv_selected = rv_vehicleList select _index;
_typeOf = typeOf rv_selected;
_weaponsCount_raw = getWeaponCargo rv_selected;
_magazineCount_raw = getMagazineCargo rv_selected;
_backPackCount_raw = getBackpackCargo rv_selected;
_weaponSlots = getNumber(configFile >> "CfgVehicles" >> _typeOf >> "transportMaxWeapons");
_magazineSlots = getNumber(configFile >> "CfgVehicles" >> _typeOf >> "transportMaxMagazines");
_backPackSlots = getNumber(configFile >> "CfgVehicles" >> _typeOf >> "transportmaxbackpacks");
_name = getText(configFile >> "CfgVehicles" >> _typeOf >> "displayName");
_picture = getText(configFile >> 'CfgVehicles' >> _typeOf >> 'picture');
_weaponsCount = (_weaponsCount_raw select 1) call _gearCount;
_magazineCount = (_magazineCount_raw select 1) call _gearCount;
_backPackCount = (_backPackCount_raw select 1) call _gearCount;
_formattedText = format [
"<img image='%1' size='3' align='center'/><br />" +
"<t color='#33BFFF' size='0.7'>%2: </t><t color='#ffffff' size='0.7'>%3</t><br />" +
"<t color='#33BFFF' size='0.7'>%4: </t><t color='#ffffff' size='0.7'>%5</t><br />" +
"<t color='#33BFFF' size='0.7'>%6: </t><t color='#ffffff' size='0.7'><img image='%7'/> %13/%10 <img image='%8'/> %14/%11 <img image='%9'/> %15/%12</t><br />",
_picture,
localize "STR_EPOCH_NAME",
_name,
localize "STR_EPOCH_CLASS",
_typeOf,
localize "STR_EPOCH_CARGO_SPACE",
"\z\addons\dayz_code\gui\gear\gear_ui_slots_weapons_white.paa",
"\z\addons\dayz_code\gui\gear\gear_ui_slots_items_white.paa",
"\z\addons\dayz_code\gui\gear\gear_ui_slots_backPacks_white.paa",
_weaponSlots,
_magazineSlots,
_backPackSlots,
_weaponsCount,
_magazineCount,
_backPackCount,
_text
];
((findDisplay 8800) displayCtrl 8803) ctrlSetStructuredText parseText _formattedText;
ctrlShow [8803,true];