Remove more ObjectIDs and ObjectUIDs from certain scripts

This commit is contained in:
A Man
2022-03-24 21:14:23 +01:00
parent 3ffa072c8e
commit 2168d504bb
17 changed files with 50 additions and 128 deletions

View File

@@ -34,15 +34,6 @@ if (_playerNear) exitWith { // Another player is nearby. Only one player can
localize "str_pickup_limit_5" call dayz_rollingMessages;
};
local _objectID = _obj getVariable ["ObjectID","0"];
local _objectUID = _obj getVariable ["ObjectUID","0"];
if (_objectID == "0" && _objectUID == "0") exitWith { // Not setup yet.
dayz_actionInProgress = false;
s_player_downgrade_build = -1;
localize "str_epoch_player_50" call dayz_rollingMessages;
};
///////////////////////////////////////////////////////////////////////////////////////////////////
local _classname = typeOf _obj;

View File

@@ -17,11 +17,9 @@ player removeAction s_player_upgrade_build;
s_player_upgrade_build = 1;
local _obj = _this select 3;
local _objectID = _obj getVariable ["ObjectID","0"];
local _objectUID = _obj getVariable ["ObjectUID","0"];
local _classname = typeOf _obj;
if ((_objectID == "0" && _objectUID == "0") || {_classname in DZE_DisableUpgrade}) exitWith {
if (_classname in DZE_DisableUpgrade) exitWith {
dayz_actionInProgress = false;
s_player_upgrade_build = -1;
localize "str_epoch_player_50" call dayz_rollingMessages; // Not setup yet.

View File

@@ -1,7 +1,7 @@
// 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"];
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","_wealth","_weaponsCount","_woGear","_playerNear","_ownerPUID","_plotCheck"];
disableSerialization;
@@ -65,14 +65,12 @@ 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 (_charID == "-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;

View File

@@ -18,7 +18,7 @@ if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call day
dayz_actionInProgress = true;
disableSerialization;
private ["_amount","_characterID","_control","_currencyModifier","_enoughMoney","_exit","_foundPos","_index","_itemText","_message","_moneyInfo","_name","_playerNear","_position","_success","_typeOf","_vehicleID","_vehicleUID","_wealth"];
private ["_amount","_characterID","_control","_currencyModifier","_enoughMoney","_exit","_foundPos","_index","_itemText","_message","_moneyInfo","_name","_playerNear","_position","_success","_typeOf","_wealth"];
vkc_cursorTarget = (_this select 3) select 0;
_characterID = (_this select 3) select 1;
@@ -52,24 +52,10 @@ if !(vkc_cursorTarget isKindOf "Air" || {vkc_cursorTarget isKindOf "LandVehicle"
if (isNull DZE_myVehicle || {!(alive DZE_myVehicle)} || {!(local DZE_myVehicle)}) exitWith {call _exit; localize "str_epoch_player_245" call dayz_rollingMessages;};
_vehicleID = vkc_cursorTarget getVariable ["ObjectID","0"];
_vehicleUID = vkc_cursorTarget getVariable ["ObjectUID","0"];
_typeOf = typeOf vkc_cursorTarget;
_name = getText(configFile >> "cfgVehicles" >> _typeOf >> "displayName");
if ((_vehicleID == "0" && {_vehicleUID == "0"}) || {_vehicleID == "1" || _vehicleUID == "1"}) exitWith {call _exit; format[localize "STR_CL_VKC_FAIL_SUPPORT",_name] call dayz_rollingMessages;};
if (_vehicleUID == "0") then {
_vehicleUID = "";
{
_x = _x * 10;
if (_x < 0) then {_x = _x * -10};
_vehicleUID = _vehicleUID + str(round(_x));
} forEach getPosATL vkc_cursorTarget;
_vehicleUID = _vehicleUID + str(round((getDir vkc_cursorTarget) + time));
vkc_cursorTarget setVariable["ObjectUID",_vehicleUID,true];
};
if (_characterID == "-1") exitWith {call _exit; format[localize "STR_CL_VKC_FAIL_SUPPORT",_name] call dayz_rollingMessages;};
vkc_keyList = call epoch_tempKeys;