You've already forked arma2-epoch-server
Initial
This commit is contained in:
42
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/player_MaintainVG.sqf
Executable file
42
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/player_MaintainVG.sqf
Executable file
@@ -0,0 +1,42 @@
|
||||
// Written by icomrade (https://github.com/icomrade)
|
||||
|
||||
private ["_hasAccess","_heliPad","_objectID","_objectUID","_plotCheck"];
|
||||
|
||||
closeDialog 0;
|
||||
|
||||
_itemText = if (Z_SingleCurrency) then {CurrencyName} else {[vg_maintainCost,true] call z_calcCurrency};
|
||||
_enoughMoney = false;
|
||||
_moneyInfo = [false, [], [], [], 0];
|
||||
_wealth = player getVariable [(["cashMoney","globalMoney"] select Z_persistentMoney),0];
|
||||
|
||||
if (Z_SingleCurrency) then {
|
||||
_enoughMoney = (_wealth >= vg_maintainCost);
|
||||
} else {
|
||||
Z_Selling = false;
|
||||
_moneyInfo = vg_maintainCost call Z_canAfford;
|
||||
_enoughMoney = _moneyInfo select 0;
|
||||
};
|
||||
|
||||
_success = true;
|
||||
if (vg_maintainCost > 0) then {
|
||||
_success = if (Z_SingleCurrency) then {_enoughMoney} else {[player,vg_maintainCost,_moneyInfo,false,0] call Z_payDefault};
|
||||
};
|
||||
|
||||
if (!_success && _enoughMoney) exitWith {systemChat localize "STR_EPOCH_TRADE_GEAR_AND_BAG_FULL";};
|
||||
|
||||
if (_enoughMoney || vg_maintainCost < 1) then {
|
||||
if (Z_SingleCurrency) then {
|
||||
player setVariable [(["cashMoney","globalMoney"] select Z_persistentMoney),(_wealth - vg_maintainCost),true];
|
||||
};
|
||||
localize "STR_CL_VG_MAINTAINSUCCESS" call dayz_rollingMessages;
|
||||
PVDZE_maintainGarage = if (vg_tiedToPole) then {
|
||||
_plotCheck = [player,false] call FNC_find_plots;
|
||||
_ownerPUID = if (_plotCheck select 1 > 0) then {(_plotCheck select 2) getVariable ["ownerPUID","0"]} else {dayz_playerUID};
|
||||
[player,_ownerPUID]
|
||||
} else {
|
||||
[player]
|
||||
};
|
||||
publicVariableServer "PVDZE_maintainGarage";
|
||||
} else {
|
||||
localize "STR_CL_VG_MAINTAINFAIL" call dayz_rollingMessages;
|
||||
};
|
69
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/player_getVehicle.sqf
Executable file
69
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/player_getVehicle.sqf
Executable file
@@ -0,0 +1,69 @@
|
||||
// Developed by [GZA] David for German Zombie Apocalypse Servers (https://zombieapo.eu/)
|
||||
// Rewritten by salival (https://github.com/oiad)
|
||||
|
||||
private ["_backPack","_charID","_dir","_heliPad","_inventory","_isNearPlot","_keyID","_keyName","_location","_plotCheck","_sign","_vehicle"];
|
||||
|
||||
closeDialog 0;
|
||||
_vehicle = (call compile format["%1",lbData[2802,(lbCurSel 2802)]]);
|
||||
|
||||
if (vg_removeKey && {_vehicle select 3 != 0} && {({getNumber (configFile >> "CfgWeapons" >> _x >> "type") == 131072} count (weapons player)) == 12}) exitWith {localize "str_epoch_player_107" call dayz_rollingMessages;};
|
||||
|
||||
_dir = round(random 360);
|
||||
_backPack = [];
|
||||
|
||||
_plotCheck = [player,false] call FNC_find_plots;
|
||||
_isNearPlot = (_plotCheck select 1) > 0;
|
||||
|
||||
_heliPad = nearestObjects [if (_isNearPlot) then {_plotCheck select 2} else {player},vg_heliPads,if (_isNearPlot) then {DZE_maintainRange} else {Z_VehicleDistance}];
|
||||
if ((count _heliPad == 0) && ((_vehicle select 1) isKindOf "Air")) exitWith {localize "STR_CL_VG_NEED_HELIPAD" call dayz_rollingMessages;};
|
||||
if (count _heliPad > 0) then {
|
||||
_location = [(_heliPad select 0)] call FNC_GetPos;
|
||||
} else {
|
||||
_location = [(position player),0,400,10,0,2000,0] call BIS_fnc_findSafePos;
|
||||
_location set [2,0];
|
||||
};
|
||||
|
||||
_sign = "Sign_arrow_down_large_EP1" createVehicleLocal [0,0,0];
|
||||
_sign setPos _location;
|
||||
|
||||
if (surfaceIsWater _location && {count (_location nearEntities ["Ship",8]) > 0}) then {
|
||||
deleteVehicle _sign;
|
||||
localize "STR_EPOCH_TRADE_OBSTRUCTED" call dayz_rollingMessages;
|
||||
} else {
|
||||
[_vehicle select 1,_sign] call fn_waitForObject;
|
||||
};
|
||||
|
||||
PVDZE_spawnVehicle = [[_dir,_location],player,_vehicle select 0];
|
||||
publicVariableServer "PVDZE_spawnVehicle";
|
||||
|
||||
waitUntil {!isNil "PVDZE_spawnVehicleResult"};
|
||||
|
||||
if (PVDZE_spawnVehicleResult != "0") then {
|
||||
_keyID = "";
|
||||
_charID = parseNumber PVDZE_spawnVehicleResult;
|
||||
if ((_charID > 0) && (_charID <= 2500)) then {_keyID = format["ItemKeyGreen%1",_charID];};
|
||||
if ((_charID > 2500) && (_charID <= 5000)) then {_keyID = format["ItemKeyRed%1",_charID-2500];};
|
||||
if ((_charID > 5000) && (_charID <= 7500)) then {_keyID = format["ItemKeyBlue%1",_charID-5000];};
|
||||
if ((_charID > 7500) && (_charID <= 10000)) then {_keyID = format["ItemKeyYellow%1",_charID-7500];};
|
||||
if ((_charID > 10000) && (_charID <= 12500)) then {_keyID = format["ItemKeyBlack%1",_charID-10000];};
|
||||
_keyName = getText(configFile >> "CfgWeapons" >> _keyID >> "displayName");
|
||||
|
||||
if (vg_removeKey) then {
|
||||
_inventory = weapons player;
|
||||
dayz_myBackpack = unitBackpack player;
|
||||
if (!isNull dayz_myBackpack) then {_backPack = (getWeaponCargo dayz_myBackpack) select 0;};
|
||||
if (_keyID in (_inventory+_backPack)) then {
|
||||
if (_keyID in _inventory) then {format[localize "STR_CL_VG_IN_INVENTORY",_keyName] call dayz_rollingMessages;};
|
||||
if (_keyID in _backPack) then {format[localize "STR_CL_VG_IN_BACKPACK",_keyName] call dayz_rollingMessages;};
|
||||
} else {
|
||||
player addWeapon _keyID;
|
||||
format[localize "STR_CL_VG_ADDED_INVENTORY",_keyName] call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
PVDZE_spawnVehicle = nil;
|
||||
PVDZE_spawnVehicleResult = nil;
|
||||
vg_vehicleList = nil;
|
||||
|
||||
localize "STR_CL_VG_VEHICLE_SPAWNED" call dayz_rollingMessages;
|
24
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/player_removePad.sqf
Executable file
24
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/player_removePad.sqf
Executable file
@@ -0,0 +1,24 @@
|
||||
// Written by salival (https://github.com/oiad)
|
||||
|
||||
private ["_hasAccess","_objectID","_objectUID","_plotCheck"];
|
||||
|
||||
closeDialog 0;
|
||||
|
||||
_plotCheck = [player, false] call FNC_find_plots;
|
||||
_hasAccess = [player,_plotCheck select 2] call FNC_check_access;
|
||||
|
||||
if ((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3) or (_hasAccess select 4)) then {
|
||||
|
||||
{
|
||||
_objectID = _x getVariable ["ObjectID","0"];
|
||||
_objectUID = _x getVariable ["ObjectUID","0"];
|
||||
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_x,dayz_authKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
|
||||
deleteVehicle _x;
|
||||
systemChat format[localize "STR_CL_VG_HELIPAD_REMOVED",typeOf _x];
|
||||
} count (nearestObjects [_plotCheck select 2,vg_heliPads,Z_VehicleDistance]);
|
||||
} else {
|
||||
systemChat localize "STR_EPOCH_PLAYER_134";
|
||||
};
|
171
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/player_storeVehicle.sqf
Executable file
171
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/player_storeVehicle.sqf
Executable file
@@ -0,0 +1,171 @@
|
||||
// Developed by [GZA] David for German Zombie Apocalypse Servers (https://zombieapo.eu/)
|
||||
// Rewritten by salival (https://github.com/oiad)
|
||||
|
||||
private ["_amount","_backPackCount","_backPackGear","_cargoAmount","_charID","_control","_counter","_display","_enoughMoney","_gearCount","_hasKey","_isLimitArray","_itemText","_items","_keyName","_limit","_magazineCount","_matchedCount","_moneyInfo","_name","_overLimit","_storedVehicles","_success","_typeName","_typeOf","_vehicle","_vehicleID","_vehicleUID","_wealth","_weaponsCount","_woGear","_playerNear","_ownerPUID","_plotCheck"];
|
||||
|
||||
disableSerialization;
|
||||
|
||||
_display = findDisplay 2800;
|
||||
_control = ((findDisplay 2800) displayCtrl 2802);
|
||||
|
||||
_vehicle = vg_vehicleList select (lbCurSel _control);
|
||||
_typeOf = typeOf _vehicle;
|
||||
_isLimitArray = typeName vg_limit == "ARRAY";
|
||||
|
||||
_overLimit = false;
|
||||
_matchedCount = 0;
|
||||
_storedVehicles = [];
|
||||
|
||||
{if (_typeOf isKindOf _x) exitWith {_overLimit = true;}} count vg_blackListed;
|
||||
if (_overLimit) exitWith {localize "STR_CL_VG_BLACKLISTED" call dayz_rollingMessages;};
|
||||
|
||||
{
|
||||
if (typeName _x == "ARRAY") then {
|
||||
_storedVehicles set [count _storedVehicles,_x select 1];
|
||||
};
|
||||
} count vg_vehicleList;
|
||||
|
||||
_gearCount = {
|
||||
private ["_counter"];
|
||||
_counter = 0;
|
||||
{_counter = _counter + _x;} count _this;
|
||||
_counter
|
||||
};
|
||||
|
||||
if (_isLimitArray) then {
|
||||
{
|
||||
_typeName = _x select 0;
|
||||
_limit = _x select 1;
|
||||
if (typeName _x == "ARRAY") then {
|
||||
if (_typeOf isKindOf _typeName) then {
|
||||
{
|
||||
if (_x isKindOf _typeName) then {_matchedCount = _matchedCount +1};
|
||||
if (_matchedCount >= _limit) then {_overLimit = true;};
|
||||
} count _storedVehicles;
|
||||
};
|
||||
};
|
||||
if (_overLimit) exitWith {};
|
||||
} count vg_limit;
|
||||
} else {
|
||||
if (count _storedVehicles >= vg_limit) then {_overLimit = true;};
|
||||
};
|
||||
|
||||
if (_overLimit) exitWith {
|
||||
if (_isLimitArray) then {
|
||||
systemChat localize "STR_CL_VG_LIMIT_ARRAY";
|
||||
} else {
|
||||
systemChat localize "STR_CL_VG_LIMIT_NUMBER";
|
||||
};
|
||||
};
|
||||
|
||||
vg_vehicleList = nil;
|
||||
|
||||
_woGear = _this select 0;
|
||||
closeDialog 0;
|
||||
if (!vg_storeWithGear && !_woGear) exitWith {localize "STR_CL_VG_NOSTOREWITHGEAR" call dayz_rollingMessages;};
|
||||
|
||||
_charID = _vehicle getVariable ["CharacterID","0"];
|
||||
_vehicleID = _vehicle getVariable ["ObjectID","0"];
|
||||
_vehicleUID = _vehicle getVariable ["ObjectUID","0"];
|
||||
_weaponsCount = ((getWeaponCargo _vehicle) select 1) call _gearCount;
|
||||
_magazineCount = ((getMagazineCargo _vehicle) select 1) call _gearCount;
|
||||
_backPackCount = ((getBackpackCargo _vehicle) select 1) call _gearCount;
|
||||
_cargoAmount = (_weaponsCount + _magazineCount + _backPackCount);
|
||||
|
||||
if (_vehicleID == "1" || _vehicleUID == "1") exitWith {localize "STR_CL_VG_STORE_MISSION" call dayz_rollingMessages;};
|
||||
if (isNull DZE_myVehicle || !local DZE_myVehicle) exitWith {localize "STR_EPOCH_PLAYER_245" call dayz_rollingMessages;};
|
||||
|
||||
_hasKey = false;
|
||||
|
||||
_items = items player;
|
||||
dayz_myBackpack = unitBackpack player;
|
||||
|
||||
if (!isNull dayz_myBackpack) then {
|
||||
_backPackGear = (getWeaponCargo dayz_myBackpack) select 0;
|
||||
_items = _items + _backPackGear;
|
||||
};
|
||||
|
||||
if (_charID != "0") then {
|
||||
{
|
||||
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) in DZE_itemKeys) then {
|
||||
if (str(getNumber(configFile >> "CfgWeapons" >> _x >> "keyid")) == _charID) then {
|
||||
_keyName = _x;
|
||||
_hasKey = true;
|
||||
};
|
||||
};
|
||||
} count _items;
|
||||
} else {
|
||||
_hasKey = true;
|
||||
};
|
||||
|
||||
if (vg_requireKey && {!_hasKey}) exitWith {localize "STR_CL_VG_REQUIRE_KEY" call dayz_rollingMessages;};
|
||||
|
||||
_name = getText(configFile >> "cfgVehicles" >> _typeOf >> "displayName");
|
||||
|
||||
{
|
||||
if (_typeOf isKindOf (_x select 0)) exitWith {_amount = _x select 1};
|
||||
} forEach vg_price;
|
||||
|
||||
if (_cargoAmount > 0) then {_amount = _amount + (_cargoAmount * vg_pricePer);};
|
||||
|
||||
if (!isNil "sk_dualCurrency") then {_amount = if (z_singleCurrency) then {_amount * 10} else {_amount};};
|
||||
|
||||
/*
|
||||
_playerNear = {isPlayer _x && (_x != player)} count (([_vehicle] call FNC_GetPos) nearEntities ["CAManBase", 15]) > 0;
|
||||
if (_playerNear) exitWith {localize "STR_CL_VG_PLAYERNEARVEHICLE" call dayz_rollingMessages;};
|
||||
*/
|
||||
|
||||
if (count (crew _vehicle) > 0) exitWith {localize "STR_CL_VG_PLAYERINVEHICLE" call dayz_rollingMessages;};
|
||||
|
||||
_enoughMoney = false;
|
||||
_moneyInfo = [false,[],[],[],0];
|
||||
_wealth = player getVariable [(["cashMoney","globalMoney"] select Z_persistentMoney),0];
|
||||
|
||||
if (Z_SingleCurrency) then {
|
||||
_enoughMoney = (_wealth >= _amount);
|
||||
} else {
|
||||
Z_Selling = false;
|
||||
if (Z_AllowTakingMoneyFromVehicle) then {false call Z_checkCloseVehicle};
|
||||
_moneyInfo = _amount call Z_canAfford;
|
||||
_enoughMoney = _moneyInfo select 0;
|
||||
};
|
||||
|
||||
_success = if (Z_SingleCurrency) then {true} else {[player,_amount,_moneyInfo,true,0] call Z_payDefault};
|
||||
|
||||
if (!_success && {_enoughMoney}) exitWith {systemChat localize "STR_EPOCH_TRADE_GEAR_AND_BAG_FULL"};
|
||||
|
||||
if (_enoughMoney) then {
|
||||
_success = if (Z_SingleCurrency) then {_amount <= _wealth} else {[player,_amount,_moneyInfo,false,0] call Z_payDefault};
|
||||
if (_success) then {
|
||||
if (Z_SingleCurrency) then {player setVariable [(["cashMoney","globalMoney"] select Z_persistentMoney),(_wealth - _amount),true];};
|
||||
|
||||
[_vehicle,true] call local_lockUnlock;
|
||||
DZE_myVehicle = objNull;
|
||||
|
||||
PVDZE_storeVehicle = if (vg_tiedToPole) then {
|
||||
_plotCheck = [player,false] call FNC_find_plots;
|
||||
_ownerPUID = if (_plotCheck select 1 > 0) then {(_plotCheck select 2) getVariable ["ownerPUID","0"]} else {dayz_playerUID};
|
||||
[_vehicle,player,_woGear,_ownerPUID]
|
||||
} else {
|
||||
[_vehicle,player,_woGear]
|
||||
};
|
||||
|
||||
publicVariableServer "PVDZE_storeVehicle";
|
||||
waitUntil {!isNil "PVDZE_storeVehicleResult"};
|
||||
|
||||
PVDZE_storeVehicle = nil;
|
||||
PVDZE_storeVehicleResult = nil;
|
||||
|
||||
format[localize "STR_CL_VG_VEHICLE_STORED",_name] call dayz_rollingMessages;
|
||||
if (vg_removeKey && {_charID != "0"}) then {[player,_keyName,1] call BIS_fnc_invRemove;};
|
||||
} else {
|
||||
systemChat localize "STR_EPOCH_TRADE_DEBUG";
|
||||
};
|
||||
} else {
|
||||
_itemText = if (Z_SingleCurrency) then {CurrencyName} else {[_amount,true] call z_calcCurrency};
|
||||
if (Z_SingleCurrency) then {
|
||||
systemChat format[localize "STR_CL_VG_NEED_COINS",[_amount] call BIS_fnc_numberText,_itemText,_name];
|
||||
} else {
|
||||
systemChat format[localize "STR_CL_VG_NEED_BRIEFCASES",_itemText,_name];
|
||||
};
|
||||
};
|
110
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/vehicleInfo.sqf
Executable file
110
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/vehicleInfo.sqf
Executable file
@@ -0,0 +1,110 @@
|
||||
// Developed by [GZA] David for German Zombie Apocalypse Servers (https://zombieapo.eu/)
|
||||
// Rewritten by salival (https://github.com/oiad)
|
||||
|
||||
private ["_backPackCount","_backPackSlots","_cargoAmount","_control","_counter","_DateStored","_formattedText","_index","_inventory","_localVehicle","_magazineCount","_magazineSlots","_name","_picture","_price","_typeOf","_vehicle","_weaponSlots","_weaponsCount","_MaintainDays","_DateMaintained"];
|
||||
|
||||
disableSerialization;
|
||||
|
||||
_control = (_this select 0) select 0;
|
||||
_index = (_this select 0) select 1;
|
||||
_localVehicle = typeName (vg_vehicleList select _index) == "OBJECT";
|
||||
_DateMaintained = "";
|
||||
_MaintainDays = -1;
|
||||
_gearCount = {
|
||||
private ["_counter"];
|
||||
_counter = 0;
|
||||
{_counter = _counter + _x;} count _this;
|
||||
_counter;
|
||||
};
|
||||
|
||||
if (_localVehicle) then {
|
||||
_vehicle = vg_vehicleList select _index;
|
||||
_typeOf = typeOf _vehicle;
|
||||
_weaponsCount = ((getWeaponCargo _vehicle) select 1) call _gearCount;
|
||||
_magazineCount = ((getMagazineCargo _vehicle) select 1) call _gearCount;
|
||||
_backPackCount = ((getBackpackCargo _vehicle) select 1) call _gearCount;
|
||||
ctrlShow[2852,false]; // getVehicle
|
||||
ctrlShow[2850,true]; // storeVehicle
|
||||
ctrlShow[2851,true]; // storeVehicleWithGear
|
||||
} else {
|
||||
_vehicle = (vg_vehicleList select _index) select 1;
|
||||
_inventory = (vg_vehicleList select _index) select 2;
|
||||
_DateStored = (vg_vehicleList select _index) select 4;
|
||||
_DateMaintained = (vg_vehicleList select _index) select 5;
|
||||
_MaintainDays = (vg_vehicleList select _index) select 6;
|
||||
_typeOf = _vehicle;
|
||||
_weaponsCount = _inventory select 0;
|
||||
_magazineCount = _inventory select 1;
|
||||
_backPackCount = _inventory select 2;
|
||||
|
||||
ctrlShow[2852,true]; // getVehicle
|
||||
ctrlShow[2850,false]; // storeVehicle
|
||||
ctrlShow[2851,false]; // storeVehicleWithGear
|
||||
};
|
||||
|
||||
_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');
|
||||
|
||||
_cargoAmount = (_weaponsCount + _magazineCount + _backPackCount);
|
||||
|
||||
if (_localVehicle) then {
|
||||
{
|
||||
if (_typeOf isKindOf (_x select 0)) exitWith {_price = _x select 1;};
|
||||
} forEach vg_price;
|
||||
if (_cargoAmount > 0) then {
|
||||
_price = _price + (_cargoAmount * vg_pricePer);
|
||||
ctrlShow[2850,false];
|
||||
} else {
|
||||
ctrlShow[2851,false];
|
||||
};
|
||||
_price = if (_price == 0) then {localize "strwffree"} else {
|
||||
if (!isNil "sk_dualCurrency") then {_price = if (z_singleCurrency) then {_price * 10} else {_price};};
|
||||
if (z_singleCurrency) then {
|
||||
format ["%1 %2",[_price] call BIS_fnc_numberText,currencyName]
|
||||
} else {
|
||||
[_price,true] call z_calcCurrency
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_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
|
||||
];
|
||||
|
||||
if (_localVehicle) then {_formattedText = _formattedText + format ["<t color='#33BFFF' size='0.7'>%1: </t><t color='#ffffff' size='0.7'>%2</t><br />",localize "STR_CL_VG_PRICE",_price];};
|
||||
if (!_localVehicle) then {
|
||||
if (_DateStored != "old") then {
|
||||
_formattedText = _formattedText + format ["<t color='#33BFFF' size='0.7'>%1: </t><t color='#ffffff' size='0.7'>%2</t><br />",localize "STR_CL_VG_STOREDATE",_DateStored];
|
||||
if (_MaintainDays >= 0) then {
|
||||
_formattedText = _formattedText + format ["<t color='#33BFFF' size='0.7'>%1: </t><t color='#ffffff' size='0.7'>%2</t><br /><t color='#33BFFF' size='0.7'>%3: </t><t color='#ffffff' size='0.7'>%4</t><br />",localize "STR_CL_VG_MAINTAINDATE",_DateMaintained,localize "STR_CL_VG_MAINTAININTERVAL",_MaintainDays];
|
||||
};
|
||||
} else {
|
||||
_formattedText = _formattedText + format ["<t color='#33BFFF' size='0.7'>%1: </t><t color='#ffffff' size='0.7'>%2</t><br />",localize "STR_CL_VG_STOREDATE",localize "STR_CL_VG_STOREDATE_INVALID"];
|
||||
};
|
||||
};
|
||||
|
||||
((findDisplay 2800) displayCtrl 2803) ctrlSetStructuredText parseText _formattedText;
|
||||
|
||||
ctrlShow [2803,true];
|
||||
ctrlShow [2830,true];
|
367
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/virtualGarage.hpp
Executable file
367
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/virtualGarage.hpp
Executable file
@@ -0,0 +1,367 @@
|
||||
// Developed by [GZA] David for German Zombie Apocalypse Servers (https://zombieapo.eu/)
|
||||
// Rewritten by salival (https://github.com/oiad)
|
||||
|
||||
class vg_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 vg_RscTitle : vg_RscText {
|
||||
idc = -1;
|
||||
style = 0;
|
||||
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
colorText[] = {0.95, 0.95, 0.95, 1};
|
||||
};
|
||||
|
||||
class vg_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 = 1;
|
||||
};
|
||||
class AttributesImage {
|
||||
font = "Zeppelin32";
|
||||
color = "#E5E5E5";
|
||||
align = "left";
|
||||
};
|
||||
soundPush[] = { "", 0, 1 };
|
||||
soundEnter[] ={ "", 0, 1 };
|
||||
soundClick[] ={ "", 0, 1 };
|
||||
soundEscape[] ={ "", 0, 1 };
|
||||
sound[] ={ "", 0, 1 };
|
||||
};
|
||||
|
||||
class vg_RscButtonMenu : vg_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 = 0;
|
||||
};
|
||||
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 vg_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 vg_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 virtualGarage {
|
||||
idd = 2800;
|
||||
name="virtualGarage";
|
||||
onload = "player setVariable['isBusy',true,true]; [] spawn vg_maintainSetText;";
|
||||
onUnload = "player setVariable['isBusy',false,true];dayz_actionInProgress = false;";
|
||||
movingEnabled = 0;
|
||||
enableSimulation = 1;
|
||||
|
||||
class controlsBackground {
|
||||
class vg_RscTitleBackground : vg_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 : vg_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 Title : vg_RscTitle {
|
||||
idc = 2801;
|
||||
text = $STR_CL_VG_VIRTUAL_GARAGE;
|
||||
x = 0.1;
|
||||
y = 0.2;
|
||||
w = 0.8;
|
||||
h = (1 / 25);
|
||||
};
|
||||
|
||||
class VehicleInfoHeader : vg_RscText {
|
||||
idc = 2830;
|
||||
text = $STR_CL_VG_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 : vg_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 VehicleList : vg_RscListBox {
|
||||
idc = 2802;
|
||||
text = "";
|
||||
sizeEx = 0.04;
|
||||
colorBackground[] = {0.1,0.1,0.1,0.9};
|
||||
onLBSelChanged = "[_this] call vehicleInfo;";
|
||||
x = 0.11; y = 0.302;
|
||||
w = 0.35; h = 0.49;
|
||||
};
|
||||
|
||||
class VehicleTitleBox : vg_RscText {
|
||||
idc = 2804;
|
||||
text = "";
|
||||
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 storeVehicle : vg_RscButtonMenu {
|
||||
idc = 2850;
|
||||
text = $STR_CL_VG_STORE_VEHICLE;
|
||||
onButtonClick = "if (!vg_hasRun) then {vg_hasRun = true;[true] spawn player_storeVehicle;};";
|
||||
x = 0.1 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
|
||||
y = 0.9 - (1 / 25);
|
||||
w = (6.25 / 36);
|
||||
h = (1 / 25);
|
||||
};
|
||||
|
||||
class storeVehicleGear : vg_RscButtonMenu {
|
||||
idc = 2851;
|
||||
text = $STR_CL_VG_STORE_VEHICLE_GEAR;
|
||||
onButtonClick = "if (!vg_hasRun) then {vg_hasRun = true;[false] spawn player_storeVehicle;};";
|
||||
x = 0.1 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
|
||||
y = 0.9 - (1 / 25);
|
||||
w = (6.25 / 15.85);
|
||||
h = (1 / 25);
|
||||
};
|
||||
|
||||
class getVehicle : vg_RscButtonMenu {
|
||||
idc = 2852;
|
||||
text = $STR_CL_VG_GET_VEHICLE;
|
||||
onButtonClick = "if (!vg_hasRun) then {vg_hasRun = true;[] spawn player_getVehicle;};";
|
||||
x = 0.1 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
|
||||
y = 0.9 - (1 / 25);
|
||||
w = (6.25 / 20);
|
||||
h = (1 / 25);
|
||||
};
|
||||
|
||||
class removePad : vg_RscButtonMenu {
|
||||
idc = 2853;
|
||||
text = $STR_CL_VG_REMOVE_PAD;
|
||||
onButtonClick = "call player_removePad;";
|
||||
x = 0.5 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
|
||||
y = 0.9 - (1 / 25);
|
||||
w = 0.241;
|
||||
h = (1 / 25);
|
||||
};
|
||||
|
||||
class MaintainGarage : vg_RscButtonMenu {
|
||||
idc = 2854;
|
||||
text = $STR_CL_VG_MAINTAIN_GARAGE;
|
||||
onButtonClick = "if (!vg_hasRun) then {vg_hasRun = true;[] spawn Player_MaintainVG;};";
|
||||
x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
|
||||
y = 0.903;
|
||||
w = 0.8;
|
||||
h = (1 / 25);
|
||||
};
|
||||
|
||||
class vehicleInfomationList : vg_RscStructuredText {
|
||||
idc = 2803;
|
||||
text = "";
|
||||
sizeEx = 0.035;
|
||||
x = 0.47; y = 0.3;
|
||||
w = 0.41; h = 0.5;
|
||||
};
|
||||
|
||||
class MainBackgroundHider : vg_RscText {
|
||||
colorBackground[] = {0,0,0,1};
|
||||
idc = 2810;
|
||||
x = 0.1;
|
||||
y = 0.2 + (11 / 250);
|
||||
w = 0.8;
|
||||
h = 0.7 - (22 / 250);
|
||||
};
|
||||
|
||||
class MainHideText : vg_RscText {
|
||||
idc = 2811;
|
||||
text = $STR_CL_VG_SEARCH_VEHICLES;
|
||||
sizeEx = 0.06;
|
||||
x = 0.10;
|
||||
y = 0.5;
|
||||
w = 0.8;
|
||||
h = (1 / 15);
|
||||
};
|
||||
};
|
||||
};
|
90
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/virtualGarage.sqf
Executable file
90
MPMissions/DayZ_Epoch_24.Napf/scripts/virtualGarage/virtualGarage.sqf
Executable file
@@ -0,0 +1,90 @@
|
||||
// Developed by [GZA] David for German Zombie Apocalypse Servers (https://zombieapo.eu/)
|
||||
// Rewritten by salival (https://github.com/oiad)
|
||||
|
||||
private ["_class","_control","_displayName","_heliPad","_isNearPlot","_itemText","_localVehicles","_plotCheck","_storedVehicles","_vgDisplCtl"];
|
||||
|
||||
if (isNil "vg_init") then {
|
||||
player_getVehicle = compile preprocessFileLineNumbers "scripts\virtualGarage\player_getVehicle.sqf";
|
||||
player_removePad = compile preprocessFileLineNumbers "scripts\virtualGarage\player_removePad.sqf";
|
||||
player_storeVehicle = compile preprocessFileLineNumbers "scripts\virtualGarage\player_storeVehicle.sqf";
|
||||
Player_MaintainVG = compile preprocessFileLineNumbers "scripts\virtualGarage\player_MaintainVG.sqf";
|
||||
vehicleInfo = compile preprocessFileLineNumbers "scripts\virtualGarage\vehicleInfo.sqf";
|
||||
vg_maintainSetText = {
|
||||
disableSerialization;
|
||||
waituntil {!isNull (findDisplay 2800)};
|
||||
_vgDisplCtl = (findDisplay 2800) displayCtrl 2854;
|
||||
if (vg_maintainCost > 0) then {
|
||||
_itemText = if (Z_SingleCurrency) then {CurrencyName} else {[vg_maintainCost,true] call z_calcCurrency};
|
||||
if (Z_SingleCurrency) then {
|
||||
_vgDisplCtl ctrlSetText format["%1 (%2 %3)",localize "STR_CL_VG_MAINTAIN_GARAGE",vg_maintainCost,_itemText];
|
||||
} else {
|
||||
_vgDisplCtl ctrlSetText format["%1 (%2)",localize "STR_CL_VG_MAINTAIN_GARAGE",_itemText];
|
||||
};
|
||||
} else {
|
||||
_vgDisplCtl ctrlSetText format["%1 (%2)",localize "STR_CL_VG_MAINTAIN_GARAGE",localize "strwffree"];
|
||||
};
|
||||
};
|
||||
vg_init = true;
|
||||
};
|
||||
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
disableSerialization;
|
||||
|
||||
vg_hasRun = false;
|
||||
|
||||
createDialog "virtualGarage";
|
||||
|
||||
{ctrlShow [_x,false]} count [2803,2830,2850,2851,2852,2853];
|
||||
|
||||
_plotCheck = [player,false] call FNC_find_plots;
|
||||
_isNearPlot = (_plotCheck select 1) > 0;
|
||||
|
||||
PVDZE_queryVehicle = if (vg_tiedToPole) then {
|
||||
[player,if (_isNearPlot) then {(_plotCheck select 2) getVariable ["ownerPUID","0"]} else {dayz_playerUID}]
|
||||
} else {
|
||||
[player]
|
||||
};
|
||||
|
||||
publicVariableServer "PVDZE_queryVehicle";
|
||||
waitUntil {!isNil "PVDZE_queryVehicleResult"};
|
||||
|
||||
_storedVehicles = PVDZE_queryVehicleResult;
|
||||
PVDZE_queryVehicle = nil;
|
||||
PVDZE_queryVehicleResult = nil;
|
||||
|
||||
_localVehicles = ([player] call FNC_getPos) nearEntities [["Air","LandVehicle","Ship"],Z_VehicleDistance];
|
||||
_heliPad = nearestObjects [if (_isNearPlot) then {_plotCheck select 2} else {player},vg_heliPads,if (_isNearPlot) then {DZE_maintainRange} else {Z_VehicleDistance}];
|
||||
|
||||
if (count _heliPad > 0 && {_isNearPlot}) then {ctrlShow[2853,true];};
|
||||
|
||||
_control = ((findDisplay 2800) displayCtrl 2802);
|
||||
lbClear _control;
|
||||
|
||||
if (count _storedVehicles == 0 && {isNull DZE_myVehicle || {!(alive DZE_myVehicle)} || {!(local DZE_myVehicle)}}) exitWith {ctrlSetText[2811,localize "STR_CL_VG_NO_VEHICLES"];};
|
||||
|
||||
vg_vehicleList = [];
|
||||
|
||||
{
|
||||
_displayName = getText(configFile >> "CfgVehicles" >> (_x select 1) >> "displayName");
|
||||
_control lbAdd _displayName;
|
||||
_control lbSetData [(lbSize _control)-1,str(_x)];
|
||||
vg_vehicleList set [count vg_vehicleList,_x];
|
||||
} count _storedVehicles;
|
||||
|
||||
{
|
||||
if (!isNull DZE_myVehicle && {local DZE_myVehicle} && {alive DZE_myVehicle} && {DZE_myVehicle == _x}) then {
|
||||
_class = typeOf _x;
|
||||
_displayName = getText(configFile >> "CfgVehicles" >> _class >> "displayName");
|
||||
_control lbAdd _displayName;
|
||||
_control lbSetData [(lbSize _control)-1,_class];
|
||||
_control lbSetColor [(lbSize _control)-1,[0, 1, 0, 1]];
|
||||
vg_vehicleList set [count vg_vehicleList,_x];
|
||||
};
|
||||
} count _localVehicles;
|
||||
|
||||
ctrlShow[2810,false];
|
||||
ctrlShow[2811,false];
|
||||
|
||||
ctrlSetText [2804, format ["%1 (%2 %3)",localize "STR_CL_VG_YOUR_VEHICLES",count (_storedVehicles),localize "STR_CL_VG_VEHICLES"]];
|
Reference in New Issue
Block a user