This commit is contained in:
[VB]AWOL
2013-09-08 00:23:30 -05:00
parent db1af13257
commit 9fcb43fde1
36 changed files with 676 additions and 669 deletions

View File

@@ -2404,7 +2404,7 @@ class CfgMagazines {
neednearby[] = {"workshop"}; neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox"}; requiretools[] = {"ItemToolbox"};
output[] = {{"cinder_garage_kit",1}}; output[] = {{"cinder_garage_kit",1}};
input[] = {{"CinderBlocks",3},{"MortarBucket",1}}; input[] = {{"CinderBlocks",3},{"MortarBucket",1},{"ItemTankTrap",1}};
}; };
}; };

View File

@@ -33,21 +33,6 @@ if(_classname isKindOf "TrapBear") exitwith {DZE_CanPickup = true; deleteVehicle
player playActionNow "PutDown"; player playActionNow "PutDown";
if (_classname == "MeleeCrowbar") then {
player addMagazine 'crowbar_swing';
};
if (_classname == "MeleeHatchet") then {
player addMagazine 'hatchet_swing';
};
if (_classname == "MeleeMachete") then {
player addMagazine 'Machete_swing';
};
if (_classname == "MeleeFishingPole") then {
player addMagazine 'Fishing_Swing';
};
sleep 1;
_claimedBy = _holder getVariable["claimed","0"]; _claimedBy = _holder getVariable["claimed","0"];
if (_claimedBy != _playerID) exitWith {sleep 1; DZE_CanPickup = true; cutText [format[(localize "str_player_beinglooted"),_text] , "PLAIN DOWN"]}; if (_claimedBy != _playerID) exitWith {sleep 1; DZE_CanPickup = true; cutText [format[(localize "str_player_beinglooted"),_text] , "PLAIN DOWN"]};
@@ -64,6 +49,9 @@ _qty = count _obj;
if(_qty >= 1) then { if(_qty >= 1) then {
//Remove melee magazines (BIS_fnc_invAdd fix) (add new melee ammo to array if needed)
{player removeMagazines _x} forEach ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Fishing_Swing"];
_config = (configFile >> _type >> _classname); _config = (configFile >> _type >> _classname);
_isOk = [player,_config] call BIS_fnc_invAdd; _isOk = [player,_config] call BIS_fnc_invAdd;
if (_isOk) then { if (_isOk) then {
@@ -81,20 +69,15 @@ if(_qty >= 1) then {
}; };
}; };
}; };
} else {
_holder setVariable["claimed","0",true]; //adding melee mags back if needed
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"]; switch (primaryWeapon player) do
if (_classname == "MeleeCrowbar") then { {
player removeMagazine 'crowbar_swing'; case "MeleeHatchet": {player addMagazine 'Hatchet_Swing';};
}; case "MeleeCrowbar": {player addMagazine 'Crowbar_Swing';};
if (_classname == "MeleeHatchet") then { case "MeleeMachete": {player addMagazine 'Machete_Swing';};
player removeMagazine 'hatchet_swing'; case "MeleeFishingPole": {player addMagazine 'Fishing_Swing';};
};
if (_classname == "MeleeMachete") then {
player removeMagazine 'Machete_swing';
};
if (_classname == "MeleeFishingPole") then {
player removeMagazine 'Fishing_Swing';
}; };
}; };
}; };

View File

@@ -9,7 +9,7 @@ if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "P
TradeInprogress = true; TradeInprogress = true;
// temp array of removed parts // temp array of removed parts
_temp_removed_array = [];
_abort = false; _abort = false;
_distance = 3; _distance = 3;
_reason = ""; _reason = "";
@@ -59,6 +59,8 @@ if (_canDo) then {
while {_craft_doLoop} do { while {_craft_doLoop} do {
_temp_removed_array = [];
_missing = ""; _missing = "";
_missingTools = false; _missingTools = false;
{ {

View File

@@ -9,7 +9,7 @@ if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "P
TradeInprogress = true; TradeInprogress = true;
// temp array of removed parts // temp array of removed parts
_temp_removed_array = [];
_abort = false; _abort = false;
_distance = 3; _distance = 3;
_reason = ""; _reason = "";
@@ -59,6 +59,8 @@ if (_canDo) then {
while {_craft_doLoop} do { while {_craft_doLoop} do {
_temp_removed_array = [];
_missing = ""; _missing = "";
_missingTools = false; _missingTools = false;
{ {

View File

@@ -9,7 +9,7 @@ if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "P
TradeInprogress = true; TradeInprogress = true;
// temp array of removed parts // temp array of removed parts
_temp_removed_array = [];
_abort = false; _abort = false;
_distance = 3; _distance = 3;
_reason = ""; _reason = "";
@@ -59,6 +59,8 @@ if (_canDo) then {
while {_craft_doLoop} do { while {_craft_doLoop} do {
_temp_removed_array = [];
_missing = ""; _missing = "";
_missingTools = false; _missingTools = false;
{ {

View File

@@ -9,7 +9,7 @@ if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "P
TradeInprogress = true; TradeInprogress = true;
// temp array of removed parts // temp array of removed parts
_temp_removed_array = [];
_abort = false; _abort = false;
_distance = 3; _distance = 3;
_reason = ""; _reason = "";
@@ -59,6 +59,8 @@ if (_canDo) then {
while {_craft_doLoop} do { while {_craft_doLoop} do {
_temp_removed_array = [];
_missing = ""; _missing = "";
_missingTools = false; _missingTools = false;
{ {

View File

@@ -9,7 +9,7 @@ if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "P
TradeInprogress = true; TradeInprogress = true;
// temp array of removed parts // temp array of removed parts
_temp_removed_array = [];
_abort = false; _abort = false;
_distance = 3; _distance = 3;
_reason = ""; _reason = "";
@@ -59,6 +59,8 @@ if (_canDo) then {
while {_craft_doLoop} do { while {_craft_doLoop} do {
_temp_removed_array = [];
_missing = ""; _missing = "";
_missingTools = false; _missingTools = false;
{ {

View File

@@ -164,12 +164,15 @@ if (_proceed) then {
// Find one random part to give back // Find one random part to give back
_refundpart = ["PartEngine","PartGeneric","PartFueltank","PartWheel","PartGlass","ItemJerrycan"] call BIS_fnc_selectRandom; _refundpart = ["PartEngine","PartGeneric","PartFueltank","PartWheel","PartGlass","ItemJerrycan"] call BIS_fnc_selectRandom;
_selectedRemoveOutput set [count _selectedRemoveOutput,[_refundpart,1]]; _selectedRemoveOutput set [count _selectedRemoveOutput,[_refundpart,1]];
_giveRefund = true;
} else { } else {
_selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput");
_giveRefund = (_objectID != "0" && _objectUID != "0");
}; };
// give refund items // give refund items
if((count _selectedRemoveOutput) > 0) then { if((count _selectedRemoveOutput) > 0 and _giveRefund) then {
// Put itemsg // Put itemsg
{ {
_itemOut = _x select 0; _itemOut = _x select 0;

View File

@@ -50,42 +50,45 @@ _weapons = getWeaponCargo _obj;
_magazines = getMagazineCargo _obj; _magazines = getMagazineCargo _obj;
_backpacks = getBackpackCargo _obj; _backpacks = getBackpackCargo _obj;
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure; if(_objectID != "0" && _objectUID != "0") then {
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj"; dayzDeleteObj = [_objectID,_objectUID];
if (isServer) then { publicVariableServer "dayzDeleteObj";
dayzDeleteObj call server_deleteObj; if (isServer) then {
dayzDeleteObj call server_deleteObj;
};
deleteVehicle _obj;
//Add weapons
_objWpnTypes = _weapons select 0;
_objWpnQty = _weapons select 1;
_countr = 0;
{
_holder addweaponcargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
//Add Magazines
_objWpnTypes = _magazines select 0;
_objWpnQty = _magazines select 1;
_countr = 0;
{
_holder addmagazinecargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
//Add Backpacks
_objWpnTypes = _backpacks select 0;
_objWpnQty = _backpacks select 1;
_countr = 0;
{
_holder addbackpackcargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
cutText [localize "str_success_tent_pack", "PLAIN DOWN"];
} else {
deleteVehicle _obj;
}; };
deleteVehicle _obj;
//Add weapons
_objWpnTypes = _weapons select 0;
_objWpnQty = _weapons select 1;
_countr = 0;
{
_holder addweaponcargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
//Add Magazines
_objWpnTypes = _magazines select 0;
_objWpnQty = _magazines select 1;
_countr = 0;
{
_holder addmagazinecargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
//Add Backpacks
_objWpnTypes = _backpacks select 0;
_objWpnQty = _backpacks select 1;
_countr = 0;
{
_holder addbackpackcargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
cutText [localize "str_success_tent_pack", "PLAIN DOWN"];
s_player_packtent = -1; s_player_packtent = -1;
TradeInprogress = false; TradeInprogress = false;

View File

@@ -57,52 +57,56 @@ if(!isNull _obj and alive _obj) then {
_magazines = getMagazineCargo _obj; _magazines = getMagazineCargo _obj;
_backpacks = getBackpackCargo _obj; _backpacks = getBackpackCargo _obj;
// Remove from database if (_objectID != "0" && _objectUID != "0") then {
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
// Set down vault "take" item // Remove from database
_bag = createVehicle [_packedClass,_pos,[], 0, "CAN_COLLIDE"]; dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
// Delete original // Set down vault "take" item
deleteVehicle _obj; _bag = createVehicle [_packedClass,_pos,[], 0, "CAN_COLLIDE"];
_bag setdir _dir; // Delete original
_bag setpos _pos; deleteVehicle _obj;
player reveal _bag;
// Empty weapon holder _bag setdir _dir;
_holder = _bag; _bag setpos _pos;
player reveal _bag;
//Add weapons // Empty weapon holder
_objWpnTypes = _weapons select 0; _holder = _bag;
_objWpnQty = _weapons select 1;
_countr = 0;
{
_holder addweaponcargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
//Add Magazines //Add weapons
_objWpnTypes = _magazines select 0; _objWpnTypes = _weapons select 0;
_objWpnQty = _magazines select 1; _objWpnQty = _weapons select 1;
_countr = 0; _countr = 0;
{ {
_holder addmagazinecargoGlobal [_x,(_objWpnQty select _countr)]; _holder addweaponcargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1; _countr = _countr + 1;
} forEach _objWpnTypes; } forEach _objWpnTypes;
//Add Backpacks //Add Magazines
_objWpnTypes = _backpacks select 0; _objWpnTypes = _magazines select 0;
_objWpnQty = _backpacks select 1; _objWpnQty = _magazines select 1;
_countr = 0; _countr = 0;
{ {
_holder addbackpackcargoGlobal [_x,(_objWpnQty select _countr)]; _holder addmagazinecargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1; _countr = _countr + 1;
} forEach _objWpnTypes; } forEach _objWpnTypes;
cutText [format["Your %1 has been packed",_text], "PLAIN DOWN"]; //Add Backpacks
_objWpnTypes = _backpacks select 0;
_objWpnQty = _backpacks select 1;
_countr = 0;
{
_holder addbackpackcargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
s_player_packvault = -1; cutText [format["Your %1 has been packed",_text], "PLAIN DOWN"];
} else {
deleteVehicle _obj;
};
}; };
s_player_packvault = -1;
TradeInprogress = false; TradeInprogress = false;

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,4 @@
surfaceInfo="z\addons\dayz_epoch\textures\wood.bisurf"; surfaceInfo="data\wood.bisurf";
ambient[]={1,1,1,1}; ambient[]={1,1,1,1};
diffuse[]={1,1,1,1}; diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0}; forcedDiffuse[]={0,0,0,0};

View File

@@ -1,4 +1,4 @@
surfaceInfo="z\addons\dayz_epoch\textures\wood.bisurf"; surfaceInfo="data\wood.bisurf";
ambient[]={1,1,1,1}; ambient[]={1,1,1,1};
diffuse[]={1,1,1,1}; diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0}; forcedDiffuse[]={0,0,0,0};

View File

@@ -485,27 +485,31 @@ server_cleanFlies =
DZE_FlyWorkingSet = _newdayz_flyMonitor; DZE_FlyWorkingSet = _newdayz_flyMonitor;
}; };
server_cleanDead = server_cleanDead = {
{ private ["_objectPos","_noPlayerNear","_body","_handled"];
{ {
if (_x isKindOf "zZombie_Base") then if (_x isKindOf "zZombie_Base") then
{ {
deleteVehicle _x; _objectPos = getPosATL _x;
} _noPlayerNear = {isPlayer _x} count (_objectPos nearEntities ["CAManBase",35]) == 0;
else if (_noPlayerNear) then
{ {
_handled = _x getVariable ["handled",true]; deleteVehicle _x;
if (_handled) then { };
} else {
_handle = _x getVariable ["handle",true];
if (_handle) then {
_x enableSimulation false; _x enableSimulation false;
_body removeAllEventHandlers "HandleDamage"; _body removeAllEventHandlers "HandleDamage";
_body removeAllEventHandlers "Killed"; _body removeAllEventHandlers "Killed";
_body removeAllEventHandlers "Fired"; _body removeAllEventHandlers "Fired";
_body removeAllEventHandlers "FiredNear"; _body removeAllEventHandlers "FiredNear";
_x setVariable ["handle",false]; _x setVariable ["handle",false];
}; };
}; };
} forEach allDead; } forEach allDead;
}; };
server_cleanLoot = server_cleanLoot =
{ {

View File

@@ -104,6 +104,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"

View File

@@ -104,6 +104,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"

View File

@@ -104,6 +104,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"

View File

@@ -116,6 +116,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"

View File

@@ -117,6 +117,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"

View File

@@ -84,5 +84,5 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };

View File

@@ -104,6 +104,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"

View File

@@ -75,5 +75,5 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };

View File

@@ -104,6 +104,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"

View File

@@ -104,6 +104,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"

View File

@@ -104,6 +104,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"

View File

@@ -104,6 +104,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"

View File

@@ -105,6 +105,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"

View File

@@ -105,6 +105,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"

View File

@@ -104,6 +104,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"

View File

@@ -104,6 +104,6 @@ if (!isDedicated) then {
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; [] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
}; };
#include "\z\addons\dayz_code\system\REsec.sqf" #include "\z\addons\dayz_code\system\REsec.sqf"