mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-20 10:26:28 +03:00
1.0.2.13 developer build
This commit is contained in:
@@ -6,14 +6,17 @@ private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_object","_ho
|
||||
if(TradeInprogress) exitWith { cutText ["Pack tent already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
player removeAction s_player_packtent;
|
||||
s_player_packtent = 1;
|
||||
|
||||
_obj = _this;
|
||||
_ownerID = _obj getVariable["CharacterID","0"];
|
||||
_objectID = _obj getVariable["ObjectID","0"];
|
||||
_objectUID = _obj getVariable["ObjectUID","0"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
player removeAction s_player_packtent;
|
||||
s_player_packtent = 1;
|
||||
if(_objectID == "0" && _objectUID == "0") exitWith {TradeInprogress = false; s_player_packtent = -1; cutText ["Tent not setup yet.", "PLAIN DOWN"];};
|
||||
|
||||
if(_ownerID != dayz_characterID) exitWith {TradeInprogress = false; s_player_packtent = -1; cutText [localize "str_fail_tent_pack", "PLAIN DOWN"];};
|
||||
|
||||
@@ -36,28 +39,29 @@ sleep 3;
|
||||
|
||||
_classname = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "create");
|
||||
|
||||
_location = _pos;
|
||||
if(!isNull _obj and alive _obj) then {
|
||||
|
||||
//place tent (local)
|
||||
//_bag = createVehicle ["WeaponHolder_ItemTent",_pos,[], 0, "CAN_COLLIDE"];
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
_object setdir _dir;
|
||||
player reveal _object;
|
||||
_location = _pos;
|
||||
|
||||
//place tent (local)
|
||||
//_bag = createVehicle ["WeaponHolder_ItemTent",_pos,[], 0, "CAN_COLLIDE"];
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
_object setdir _dir;
|
||||
_object setpos _pos;
|
||||
player reveal _object;
|
||||
|
||||
_holder = _object;
|
||||
_holder = _object;
|
||||
|
||||
_weapons = getWeaponCargo _obj;
|
||||
_magazines = getMagazineCargo _obj;
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
|
||||
if(_objectID != "0" && _objectUID != "0") then {
|
||||
_weapons = getWeaponCargo _obj;
|
||||
_magazines = getMagazineCargo _obj;
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
|
||||
deleteVehicle _obj;
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
if (isServer) then {
|
||||
dayzDeleteObj call server_deleteObj;
|
||||
};
|
||||
deleteVehicle _obj;
|
||||
|
||||
//Add weapons
|
||||
_objWpnTypes = _weapons select 0;
|
||||
@@ -87,8 +91,7 @@ if(_objectID != "0" && _objectUID != "0") then {
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
cutText [localize "str_success_tent_pack", "PLAIN DOWN"];
|
||||
} else {
|
||||
deleteVehicle _obj;
|
||||
};
|
||||
|
||||
s_player_packtent = -1;
|
||||
TradeInprogress = false;
|
||||
Reference in New Issue
Block a user