mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 13:26:39 +03:00
another sync with trader fixes
This commit is contained in:
@@ -18,44 +18,96 @@ if (isServer) then {
|
||||
|
||||
waitUntil {!isNil "dayzTraderMenuResult"};
|
||||
|
||||
/*
|
||||
`item` varchar(255) NOT NULL COMMENT '[Class Name,1 = CfgMagazines | 2 = Vehicle | 3 = Weapon]',
|
||||
`qty` int(8) NOT NULL COMMENT 'amount in stock available to buy',
|
||||
`buy` varchar(255) NOT NULL COMMENT '[[Qty,Class,Type],]',
|
||||
`sell` varchar(255) NOT NULL COMMENT '[[Qty,Class,Type],]',
|
||||
`order` int(2) NOT NULL DEFAULT '0' COMMENT '# sort order for addAction menu',
|
||||
`tid` int(8) NOT NULL COMMENT 'Trader Menu ID',
|
||||
`afile` varchar(64) NOT NULL DEFAULT 'trade_items',
|
||||
*/
|
||||
|
||||
diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
|
||||
{
|
||||
_header = _x select 0; // "TRD"
|
||||
_btype = _x select 1;
|
||||
_stype = _x select 2;
|
||||
_loc = _x select 3;
|
||||
_name = _x select 4;
|
||||
_qty = _x select 5;
|
||||
_cost = _x select 6;
|
||||
_bcurrency = _x select 7;
|
||||
_sell = _x select 8;
|
||||
_scurrency = _x select 9;
|
||||
_cat = _x select 10;
|
||||
_order = _x select 11;
|
||||
_tid = _x select 12;
|
||||
_actionFile = _x select 13;
|
||||
|
||||
_textPart = getText(configFile >> _btype >> _name >> "displayName");
|
||||
// Trader Item name|type
|
||||
_item = _x select 1;
|
||||
_name = _item select 0;
|
||||
_type = _item select 1;
|
||||
switch(true)do{
|
||||
case (_type == 1): {
|
||||
_type = "CfgMagazines";
|
||||
};
|
||||
case (_type == 2): {
|
||||
_type = "CfgVehicles";
|
||||
};
|
||||
case (_type == 3): {
|
||||
_type = "CfgWeapons";
|
||||
};
|
||||
};
|
||||
// Display Name of item
|
||||
_textPart = getText(configFile >> _type >> _name >> "displayName");
|
||||
|
||||
_File = "\z\addons\dayz_code\actions\" + _actionFile + ".sqf";
|
||||
// Total in stock
|
||||
_qty = _x select 2;
|
||||
|
||||
_part_out = _name;
|
||||
_part_in = _bcurrency;
|
||||
// Buy Data from array
|
||||
_buy = _x select 3;
|
||||
_bqty = _buy select 0;
|
||||
_bname = _buy select 1;
|
||||
_btype = _buy select 2;
|
||||
switch(true)do{
|
||||
case (_btype == 1): {
|
||||
_btype = "CfgMagazines";
|
||||
};
|
||||
case (_btype == 2): {
|
||||
_btype = "CfgVehicles";
|
||||
};
|
||||
case (_btype == 3): {
|
||||
_btype = "CfgWeapons";
|
||||
};
|
||||
};
|
||||
// Display Name of buy item
|
||||
_textCurrency = getText(configFile >> _btype >> _bname >> "displayName");
|
||||
|
||||
// Sell data from array
|
||||
_sell = _x select 4;
|
||||
_sqty = _sell select 0;
|
||||
_sname = _sell select 1;
|
||||
_stype = _sell select 2;
|
||||
|
||||
// Menu sort order
|
||||
_order = _x select 5;
|
||||
|
||||
// Trader Menu ID
|
||||
_tid = _x select 6;
|
||||
|
||||
// Action file to use for trade
|
||||
_afile = _x select 7;
|
||||
_File = "\z\addons\dayz_code\actions\" + _afile + ".sqf";
|
||||
|
||||
// Allways 1 for now
|
||||
_out = 1;
|
||||
_in = _cost;
|
||||
// qty consumed of bname
|
||||
_in = _bqty;
|
||||
|
||||
_textCurrency = getText(configFile >> _stype >> _part_in >> "displayName");
|
||||
|
||||
_Display = format["Buy %1 for %2 %3", _textPart, _cost, _textCurrency];
|
||||
|
||||
// trade_items.sqf | [part_out, part_in, qty_out, qty_in,_textPart,_textCurrency];
|
||||
_part = player addAction [_Display, _File,[_part_out,_part_in,_out,_in,"buy",_textPart,_textCurrency], _order, true, true, "",""];
|
||||
if(_qty <= 0) then {
|
||||
_Display = format["Buy %1 (Out of Stock: %2)", _textPart, _qty];
|
||||
_part = player addAction [_Display, "\z\addons\dayz_code\actions\trade_cancel.sqf",[], 0, true, false, "",""];
|
||||
} else {
|
||||
_Display = format["Buy %1 for %2 %3 (Available: %4)", _textPart, _in, _textCurrency, _qty];
|
||||
_part = player addAction [_Display, _File,[_name,_bname,_out,_in,"buy",_textCurrency,_textPart], _order, true, true, "",""];
|
||||
};
|
||||
|
||||
diag_log format["DEBUG TRADER: %1", _part];
|
||||
s_player_parts set [count s_player_parts,_part];
|
||||
|
||||
} forEach dayzTraderMenuResult;
|
||||
|
||||
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["medical"], 10, true, false, "",""];
|
||||
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["medical"], 0, true, false, "",""];
|
||||
s_player_parts set [count s_player_parts,_cancel];
|
||||
|
||||
// Clear Data maybe consider cacheing results
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
private["_vehicle"];
|
||||
_vehicle = _this select 3;
|
||||
|
||||
_vehicle setVehicleInit "this lock true";
|
||||
_vehicle setVehicleInit "this lockCargo true";
|
||||
_vehicle setVehicleInit "this lock true; this lockCargo true;";
|
||||
|
||||
processInitCommands;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_activatingPlayer","_trader_id","_category","_action","_id","_btype","_stype","_loc","_name","_qty","_cost","_qty","_sell","_order","_tid","_bcurrency","_scurrency","_actionFile","_in","_out","_part","_cat","_cancel","_Display","_File","_textCurrency","_textPart"];
|
||||
private["_activatingPlayer","_trader_id","_category","_action","_id","_type","_loc","_name","_qty","_cost","_qty","_sell","_cur","_order","_tid","_currency","_actionFile","_in","_out","_part","_cat","_cancel","_Display","_File","_textCurrency","_textPart"];
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
|
||||
@@ -18,45 +18,93 @@ if (isServer) then {
|
||||
|
||||
waitUntil {!isNil "dayzTraderMenuResult"};
|
||||
|
||||
diag_log format["DEBUG Sell: %1", dayzTraderMenuResult];
|
||||
/*
|
||||
`item` varchar(255) NOT NULL COMMENT '[Class Name,1 = CfgMagazines | 2 = Vehicle | 3 = Weapon]',
|
||||
`qty` int(8) NOT NULL COMMENT 'amount in stock available to buy',
|
||||
`buy` varchar(255) NOT NULL COMMENT '[[Qty,Class,Type],]',
|
||||
`sell` varchar(255) NOT NULL COMMENT '[[Qty,Class,Type],]',
|
||||
`order` int(2) NOT NULL DEFAULT '0' COMMENT '# sort order for addAction menu',
|
||||
`tid` int(8) NOT NULL COMMENT 'Trader Menu ID',
|
||||
`afile` varchar(64) NOT NULL DEFAULT 'trade_items',
|
||||
*/
|
||||
|
||||
diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
|
||||
{
|
||||
_header = _x select 0; // "TRD"
|
||||
_btype = _x select 1;
|
||||
_stype = _x select 2;
|
||||
_loc = _x select 3;
|
||||
_name = _x select 4;
|
||||
_qty = _x select 5;
|
||||
_cost = _x select 6;
|
||||
_bcurrency = _x select 7;
|
||||
_sell = _x select 8;
|
||||
_scurrency = _x select 9;
|
||||
_cat = _x select 10;
|
||||
_order = _x select 11;
|
||||
_tid = _x select 12;
|
||||
_actionFile = _x select 13;
|
||||
|
||||
_textPart = getText(configFile >> _stype >> _scurrency >> "displayName");
|
||||
// Trader Item name|type
|
||||
_item = _x select 1;
|
||||
_name = _item select 0;
|
||||
_type = _item select 1;
|
||||
switch(true)do{
|
||||
case (_type == 1): {
|
||||
_type = "CfgMagazines";
|
||||
};
|
||||
case (_type == 2): {
|
||||
_type = "CfgVehicles";
|
||||
};
|
||||
case (_type == 3): {
|
||||
_type = "CfgWeapons";
|
||||
};
|
||||
};
|
||||
// Display Name of item
|
||||
_textPart = getText(configFile >> _type >> _name >> "displayName");
|
||||
|
||||
_File = "\z\addons\dayz_code\actions\" + _actionFile + ".sqf";
|
||||
|
||||
_part_out = _scurrency;
|
||||
_part_in = _name;
|
||||
_out = _sell;
|
||||
// Total in stock
|
||||
_qty = _x select 2;
|
||||
|
||||
// Buy Data from array
|
||||
_buy = _x select 3;
|
||||
_bqty = _buy select 0;
|
||||
_bname = _buy select 1;
|
||||
_btype = _buy select 2;
|
||||
|
||||
// Sell data from array
|
||||
_sell = _x select 4;
|
||||
_sqty = _sell select 0;
|
||||
_sname = _sell select 1;
|
||||
_stype = _sell select 2;
|
||||
switch(true)do{
|
||||
case (_stype == 1): {
|
||||
_stype = "CfgMagazines";
|
||||
};
|
||||
case (_stype == 2): {
|
||||
_stype = "CfgVehicles";
|
||||
};
|
||||
case (_stype == 3): {
|
||||
_stype = "CfgWeapons";
|
||||
};
|
||||
};
|
||||
// Display Name of sell item
|
||||
_textCurrency = getText(configFile >> _stype >> _sname >> "displayName");
|
||||
|
||||
// Menu sort order
|
||||
_order = _x select 5;
|
||||
|
||||
// Trader Menu ID
|
||||
_tid = _x select 6;
|
||||
|
||||
// Action file to use for trade
|
||||
_afile = _x select 7;
|
||||
_File = "\z\addons\dayz_code\actions\" + _afile + ".sqf";
|
||||
|
||||
// Allways 1 for now
|
||||
_out = _sqty;
|
||||
// qty consumed of bname
|
||||
_in = 1;
|
||||
|
||||
_textCurrency = getText(configFile >> _btype >> _part_in >> "displayName");
|
||||
|
||||
_Display = format["Sell %1 for %2 %3", _textPart, _sell, _textCurrency];
|
||||
|
||||
// trade_items.sqf | [part_out, part_in, qty_out, qty_in,"buy",_textPart,_textCurrency];
|
||||
_part = player addAction [_Display, _File,[_part_out,_part_in,_out,_in,"sell",_textPart,_textCurrency], _order, true, true, "",""];
|
||||
//diag_log format["DEBUG TRADER: %1", _part];
|
||||
// trade_items.sqf | [part_out, part_in, qty_out, qty_in,_textPart,_textCurrency];
|
||||
_Display = format["Sell %1 for %2 %3", _textPart, _sqty, _textCurrency];
|
||||
_part = player addAction [_Display, _File,[_sname,_name,_out,_in,"sell",_textPart,_textCurrency], _order, true, true, "",""];
|
||||
|
||||
diag_log format["DEBUG TRADER: %1", _part];
|
||||
s_player_parts set [count s_player_parts,_part];
|
||||
|
||||
} forEach dayzTraderMenuResult;
|
||||
|
||||
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["medical"], 10, true, false, "",""];
|
||||
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["medical"], 0, true, false, "",""];
|
||||
s_player_parts set [count s_player_parts,_cancel];
|
||||
|
||||
// Clear Data maybe consider cacheing results
|
||||
dayzTraderMenuResult = nil;
|
||||
s_player_parts_crtl = 1;
|
||||
s_player_parts_crtl = 1;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
private["_position","_tent","_location","_isOk","_backpack","_tentType","_trg","_key"];
|
||||
//check if can pitch here
|
||||
call gear_ui_init;
|
||||
_playerPos = getPosATL player;
|
||||
_item = _this;
|
||||
_hastentitem = _this in magazines player;
|
||||
_location = player modeltoworld [0,2.5,0];
|
||||
@@ -9,23 +10,28 @@ _building = nearestObject [(vehicle player), "HouseBase"];
|
||||
_isOk = [(vehicle player),_building] call fnc_isInsideBuilding;
|
||||
//_isOk = true;
|
||||
|
||||
diag_log ("Pitch Tent: " + str(_isok) );
|
||||
//diag_log ("Pitch Tent: " + str(_isok) );
|
||||
|
||||
_config = configFile >> "CfgMagazines" >> _item;
|
||||
_text = getText (_config >> "displayName");
|
||||
|
||||
if (!_hastentitem) exitWith {cutText [format[(localize "str_player_31"),_text,"pitch"] , "PLAIN DOWN"]};
|
||||
|
||||
|
||||
//allowed
|
||||
if (["forest",dayz_surfaceType] call fnc_inString) then { _isOk = false; diag_log ("surface forest"); };
|
||||
//if (["grass",dayz_surfaceType] call fnc_inString) then { _isOk = false; diag_log ("surface grass"); };
|
||||
|
||||
//blocked
|
||||
if (["concrete",dayz_surfaceType] call fnc_inString) then { _isOk = true; diag_log ("surface concrete"); };
|
||||
//if (["wood",dayz_surfaceType] call fnc_inString) then { _isOk = true; diag_log ("surface concrete"); };
|
||||
//Block Tents in pounds
|
||||
_objectsPond = nearestObjects [_playerPos, [], 10];
|
||||
{
|
||||
_isPond = ["pond",str(_x),false] call fnc_inString;
|
||||
if (_isPond) then {
|
||||
_pondPos = (_x worldToModel _playerPos) select 2;
|
||||
if (_pondPos < 0) then {
|
||||
_isOk = true;
|
||||
};
|
||||
};
|
||||
} forEach _objectsPond;
|
||||
|
||||
diag_log ("Pitch Tent Surface: " + str(_isok) );
|
||||
//diag_log ("Pitch Tent: " + str(_isok) );
|
||||
|
||||
if (!_isOk) then {
|
||||
//remove tentbag
|
||||
|
||||
@@ -75,5 +75,6 @@ if (_qty >= _qty_in) then {
|
||||
s_player_parts_crtl = -1;
|
||||
|
||||
} else {
|
||||
_needed = _qty_in - _qty;
|
||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||
};
|
||||
48
dayz_code/actions/trade_backpacks.sqf
Normal file
48
dayz_code/actions/trade_backpacks.sqf
Normal file
@@ -0,0 +1,48 @@
|
||||
private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty"];
|
||||
// [part_out,part_in, qty_out, qty_in,];
|
||||
|
||||
_part_out = (_this select 3) select 0;
|
||||
_part_in = (_this select 3) select 1;
|
||||
_qty_out = (_this select 3) select 2;
|
||||
_qty_in = (_this select 3) select 3;
|
||||
_buy_o_sell = (_this select 3) select 4;
|
||||
_textPartIn = (_this select 3) select 5;
|
||||
_textPartOut = (_this select 3) select 6;
|
||||
|
||||
if(_buy_o_sell == "buy") then {
|
||||
_qty = {_x == _part_in} count magazines player;
|
||||
} else {
|
||||
_qty = 0;
|
||||
_bag = unitBackpack player;
|
||||
_class = typeOf _bag;
|
||||
if(_class == _part_in) then {
|
||||
_qty = 1;
|
||||
};
|
||||
};
|
||||
|
||||
if (_qty >= _qty_in) then {
|
||||
|
||||
if(_buy_o_sell == "buy") then {
|
||||
for "_x" from 1 to _qty_in do {
|
||||
player removeMagazine _part_in;
|
||||
};
|
||||
removeBackpack player;
|
||||
player addBackpack _part_out;
|
||||
} else {
|
||||
// Sell
|
||||
for "_x" from 1 to _qty_out do {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
removeBackpack player;
|
||||
// player addBackpack _part_out;
|
||||
};
|
||||
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
s_player_parts_crtl = -1;
|
||||
|
||||
} else {
|
||||
_needed = _qty_in - _qty;
|
||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||
};
|
||||
@@ -24,8 +24,6 @@ if (_qty >= _qty_in) then {
|
||||
// [player,"repair",0,false] call dayz_zombieSpeak;
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
s_player_parts_crtl = -1;
|
||||
} else {
|
||||
_needed = _qty_in - _qty;
|
||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||
|
||||
@@ -40,7 +40,6 @@ if (_qty >= _qty_in) then {
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
s_player_parts_crtl = -1;
|
||||
|
||||
|
||||
} else {
|
||||
_needed = _qty_in - _qty;
|
||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
private["_vehicle"];
|
||||
_vehicle = _this select 3;
|
||||
|
||||
_vehicle setVehicleInit "this lock false";
|
||||
_vehicle setVehicleInit "this lockCargo false";
|
||||
_vehicle setVehicleInit "this lock false; this lockCargo false;";
|
||||
|
||||
processInitCommands;
|
||||
|
||||
3
dayz_code/actions/vault_pack.sqf
Normal file
3
dayz_code/actions/vault_pack.sqf
Normal file
@@ -0,0 +1,3 @@
|
||||
private["_obj","_bag","_pos"];
|
||||
_obj = _this select 3;
|
||||
_obj spawn player_packVault;
|
||||
70
dayz_code/actions/vault_pitch.sqf
Normal file
70
dayz_code/actions/vault_pitch.sqf
Normal file
@@ -0,0 +1,70 @@
|
||||
private["_position","_tent","_location","_isOk","_backpack","_tentType","_trg","_key"];
|
||||
//check if can pitch here
|
||||
call gear_ui_init;
|
||||
_playerPos = getPosATL player;
|
||||
_item = _this;
|
||||
_hastentitem = _this in magazines player;
|
||||
_location = player modeltoworld [0,2.5,0];
|
||||
_location set [2,0];
|
||||
_building = nearestObject [(vehicle player), "HouseBase"];
|
||||
_isOk = [(vehicle player),_building] call fnc_isInsideBuilding;
|
||||
//_isOk = true;
|
||||
|
||||
//diag_log ("Pitch Tent: " + str(_isok) );
|
||||
|
||||
_config = configFile >> "CfgMagazines" >> _item;
|
||||
_text = getText (_config >> "displayName");
|
||||
|
||||
if (!_hastentitem) exitWith {cutText [format[(localize "str_player_31"),_text,"pitch"] , "PLAIN DOWN"]};
|
||||
|
||||
//blocked
|
||||
if (["concrete",dayz_surfaceType] call fnc_inString) then { _isOk = true; diag_log ("surface concrete"); };
|
||||
//Block Tents in pounds
|
||||
_objectsPond = nearestObjects [_playerPos, [], 10];
|
||||
{
|
||||
_isPond = ["pond",str(_x),false] call fnc_inString;
|
||||
if (_isPond) then {
|
||||
_pondPos = (_x worldToModel _playerPos) select 2;
|
||||
if (_pondPos < 0) then {
|
||||
_isOk = true;
|
||||
};
|
||||
};
|
||||
} forEach _objectsPond;
|
||||
|
||||
//diag_log ("Pitch Tent: " + str(_isok) );
|
||||
|
||||
if (!_isOk) then {
|
||||
//remove tentbag
|
||||
player removeMagazine _item;
|
||||
_dir = round(direction player);
|
||||
|
||||
//wait a bit
|
||||
player playActionNow "Medic";
|
||||
sleep 1;
|
||||
[player,"tentunpack",0,false] call dayz_zombieSpeak;
|
||||
|
||||
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
sleep 5;
|
||||
//place tent (local)
|
||||
_tent = createVehicle ["VaultStorage", _location, [], 0, "CAN_COLLIDE"];
|
||||
_tent setdir _dir;
|
||||
_tent setpos _location;
|
||||
player reveal _tent;
|
||||
_location = getPosATL _tent;
|
||||
|
||||
_tent setVariable ["characterID",dayz_characterID,true];
|
||||
|
||||
//player setVariable ["tentUpdate",["Land_A_tent",_dir,_location,[dayz_tentWeapons,dayz_tentMagazines,dayz_tentBackpacks]],true];
|
||||
|
||||
dayzPublishObj = [dayz_characterID,_tent,[_dir,_location],"VaultStorage"];
|
||||
publicVariable "dayzPublishObj";
|
||||
if (isServer) then {
|
||||
dayzPublishObj call server_publishObj;
|
||||
};
|
||||
|
||||
cutText ["You have setup your vault", "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText ["You cannot place a Vault here. The area must be flat, and free of other objects", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
@@ -243,7 +243,7 @@ class CfgLoot {
|
||||
0.02,
|
||||
0.02,
|
||||
0.04
|
||||
};
|
||||
}
|
||||
};
|
||||
policeman[] = {
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -52,6 +52,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
_isZombie = cursorTarget isKindOf "zZombie_base";
|
||||
_isDestructable = cursorTarget isKindOf "BuiltItems";
|
||||
_isTent = cursorTarget isKindOf "TentStorage";
|
||||
_isVault = cursorTarget isKindOf "VaultStorage";
|
||||
_isFuel = false;
|
||||
_isAlive = alive cursorTarget;
|
||||
_text = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
|
||||
@@ -175,6 +176,18 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
player removeAction s_player_packtent;
|
||||
s_player_packtent = -1;
|
||||
};
|
||||
|
||||
|
||||
//Packing my vault
|
||||
if(cursorTarget isKindOf "VaultStorage" and _canDo and _ownerID == dayz_characterID) then {
|
||||
if ((s_player_packvault < 0) and (player distance cursorTarget < 3)) then {
|
||||
s_player_packvault = player addAction ["Pack Vault", "\z\addons\dayz_code\actions\vault_pack.sqf",cursorTarget, 0, false, true, "",""];
|
||||
// s_player_packvault = player addAction ["Lock Vault", "\z\addons\dayz_code\actions\vault_pack.sqf",cursorTarget, 0, false, true, "",""];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_packvault;
|
||||
s_player_packvault = -1;
|
||||
};
|
||||
|
||||
//Repairing Vehicles
|
||||
if ((dayz_myCursorTarget != cursorTarget) and !_isMan and _hasToolbox and (damage cursorTarget < 1)) then {
|
||||
@@ -241,11 +254,21 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
// [_trader_id, _category, ];
|
||||
_buy = player addAction ["Buy Parts", "\z\addons\dayz_code\actions\buy_db.sqf",[1,"Parts"], 99, true, false, "",""];
|
||||
_sell = player addAction ["Sell Parts", "\z\addons\dayz_code\actions\sell_db.sqf",[1,"Parts"], 98, true, false, "",""];
|
||||
_buy = player addAction ["Buy Car Parts", "\z\addons\dayz_code\actions\buy_db.sqf",[21], 99, true, false, "",""];
|
||||
_sell = player addAction ["Sell Car Parts", "\z\addons\dayz_code\actions\sell_db.sqf",[21], 98, true, false, "",""];
|
||||
|
||||
_buy2 = player addAction ["Buy Building Supplies", "\z\addons\dayz_code\actions\buy_db.sqf",[22], 97, true, false, "",""];
|
||||
_sell2 = player addAction ["Sell Building Supplies", "\z\addons\dayz_code\actions\sell_db.sqf",[22], 96, true, false, "",""];
|
||||
|
||||
_buy3 = player addAction ["Buy Explosives", "\z\addons\dayz_code\actions\buy_db.sqf",[23], 95, true, false, "",""];
|
||||
_sell3 = player addAction ["Sell Explosives", "\z\addons\dayz_code\actions\sell_db.sqf",[23], 94, true, false, "",""];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy];
|
||||
s_player_parts set [count s_player_parts,_sell];
|
||||
s_player_parts set [count s_player_parts,_buy2];
|
||||
s_player_parts set [count s_player_parts,_sell2];
|
||||
s_player_parts set [count s_player_parts,_buy3];
|
||||
s_player_parts set [count s_player_parts,_sell3];
|
||||
|
||||
s_player_parts_crtl = 1;
|
||||
};
|
||||
@@ -260,11 +283,43 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
// [_trader_id, _category, ];
|
||||
_buy = player addAction ["Buy Weapons", "\z\addons\dayz_code\actions\buy_db.sqf",[4,"Weapons"], 99, true, false, "",""];
|
||||
_sell = player addAction ["Sell Weapons", "\z\addons\dayz_code\actions\sell_db.sqf",[4,"Weapons"], 98, true, false, "",""];
|
||||
_buy1 = player addAction ["Buy Sidearm", "\z\addons\dayz_code\actions\buy_db.sqf",[11], 99, true, false, "",""];
|
||||
_sell1 = player addAction ["Sell Sidearm", "\z\addons\dayz_code\actions\sell_db.sqf",[11], 98, true, false, "",""];
|
||||
|
||||
_buy = player addAction ["Buy Rifle", "\z\addons\dayz_code\actions\buy_db.sqf",[12], 97, true, false, "",""];
|
||||
_sell = player addAction ["Sell Rifle", "\z\addons\dayz_code\actions\sell_db.sqf",[12], 96, true, false, "",""];
|
||||
|
||||
_buy2 = player addAction ["Buy Shotgun", "\z\addons\dayz_code\actions\buy_db.sqf",[13], 95, true, false, "",""];
|
||||
_sell2 = player addAction ["Sell Shotgun", "\z\addons\dayz_code\actions\sell_db.sqf",[13], 94, true, false, "",""];
|
||||
|
||||
_buy3 = player addAction ["Buy Assault Rifle", "\z\addons\dayz_code\actions\buy_db.sqf",[14], 93, true, false, "",""];
|
||||
_sell3 = player addAction ["Sell Assault Rifle", "\z\addons\dayz_code\actions\sell_db.sqf",[14], 92, true, false, "",""];
|
||||
|
||||
_buy4 = player addAction ["Buy Machine Gun", "\z\addons\dayz_code\actions\buy_db.sqf",[15], 91, true, false, "",""];
|
||||
_sell4 = player addAction ["Sell Machine Gun", "\z\addons\dayz_code\actions\sell_db.sqf",[15], 90, true, false, "",""];
|
||||
|
||||
_buy5 = player addAction ["Buy Sniper Rifle", "\z\addons\dayz_code\actions\buy_db.sqf",[16], 89, true, false, "",""];
|
||||
_sell5 = player addAction ["Sell Sniper Rifle", "\z\addons\dayz_code\actions\sell_db.sqf",[16], 88, true, false, "",""];
|
||||
|
||||
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy1];
|
||||
s_player_parts set [count s_player_parts,_sell1];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy];
|
||||
s_player_parts set [count s_player_parts,_sell];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy2];
|
||||
s_player_parts set [count s_player_parts,_sell2];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy3];
|
||||
s_player_parts set [count s_player_parts,_sell3];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy4];
|
||||
s_player_parts set [count s_player_parts,_sell4];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy5];
|
||||
s_player_parts set [count s_player_parts,_sell5];
|
||||
|
||||
s_player_parts_crtl = 1;
|
||||
};
|
||||
@@ -277,11 +332,26 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
// [_trader_id, _category, ];
|
||||
_buy = player addAction ["Buy Food", "\z\addons\dayz_code\actions\buy_db.sqf",[5,"Food"], 99, true, false, "",""];
|
||||
_sell = player addAction ["Sell Food", "\z\addons\dayz_code\actions\sell_db.sqf",[5,"Food"], 98, true, false, "",""];
|
||||
_buy = player addAction ["Buy Food", "\z\addons\dayz_code\actions\buy_db.sqf",[51], 99, true, false, "",""];
|
||||
_sell = player addAction ["Sell Food", "\z\addons\dayz_code\actions\sell_db.sqf",[51], 98, true, false, "",""];
|
||||
|
||||
_buy2 = player addAction ["Buy Backpacks", "\z\addons\dayz_code\actions\buy_db.sqf",[52], 97, true, false, "",""];
|
||||
_sell2 = player addAction ["Sell Backpacks", "\z\addons\dayz_code\actions\sell_db.sqf",[52], 96, true, false, "",""];
|
||||
|
||||
_buy3 = player addAction ["Buy Toolbelt", "\z\addons\dayz_code\actions\buy_db.sqf",[53], 95, true, false, "",""];
|
||||
_sell3 = player addAction ["Sell Toolbelt", "\z\addons\dayz_code\actions\sell_db.sqf",[53], 94, true, false, "",""];
|
||||
|
||||
_buy4 = player addAction ["Buy Clothes", "\z\addons\dayz_code\actions\buy_db.sqf",[54], 93, true, false, "",""];
|
||||
_sell4 = player addAction ["Sell Clothes", "\z\addons\dayz_code\actions\sell_db.sqf",[54], 92, true, false, "",""];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy];
|
||||
s_player_parts set [count s_player_parts,_sell];
|
||||
s_player_parts set [count s_player_parts,_buy2];
|
||||
s_player_parts set [count s_player_parts,_sell2];
|
||||
s_player_parts set [count s_player_parts,_buy3];
|
||||
s_player_parts set [count s_player_parts,_sell3];
|
||||
s_player_parts set [count s_player_parts,_buy4];
|
||||
s_player_parts set [count s_player_parts,_sell4];
|
||||
|
||||
s_player_parts_crtl = 1;
|
||||
};
|
||||
@@ -294,11 +364,43 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
// [_trader_id, _category, ];
|
||||
_buy = player addAction ["Buy Ammo", "\z\addons\dayz_code\actions\buy_db.sqf",[2,"Ammo"], 99, true, false, "",""];
|
||||
_sell = player addAction ["Sell Ammo", "\z\addons\dayz_code\actions\sell_db.sqf",[2,"Ammo"], 98, true, false, "",""];
|
||||
_buy1 = player addAction ["Buy Sidearm Ammo", "\z\addons\dayz_code\actions\buy_db.sqf",[1], 99, true, false, "",""];
|
||||
_sell1 = player addAction ["Sell Sidearm Ammo", "\z\addons\dayz_code\actions\sell_db.sqf",[1], 98, true, false, "",""];
|
||||
|
||||
_buy = player addAction ["Buy Rifle Ammo", "\z\addons\dayz_code\actions\buy_db.sqf",[2], 97, true, false, "",""];
|
||||
_sell = player addAction ["Sell Rifle Ammo", "\z\addons\dayz_code\actions\sell_db.sqf",[2], 96, true, false, "",""];
|
||||
|
||||
_buy2 = player addAction ["Buy Shotgun Ammo", "\z\addons\dayz_code\actions\buy_db.sqf",[3], 95, true, false, "",""];
|
||||
_sell2 = player addAction ["Sell Shotgun Ammo", "\z\addons\dayz_code\actions\sell_db.sqf",[3], 94, true, false, "",""];
|
||||
|
||||
_buy3 = player addAction ["Buy Assault Rifle Ammo", "\z\addons\dayz_code\actions\buy_db.sqf",[4], 93, true, false, "",""];
|
||||
_sell3 = player addAction ["Sell Assault Rifle Ammo", "\z\addons\dayz_code\actions\sell_db.sqf",[4], 92, true, false, "",""];
|
||||
|
||||
_buy4 = player addAction ["Buy Machine Gun Ammo", "\z\addons\dayz_code\actions\buy_db.sqf",[5], 91, true, false, "",""];
|
||||
_sell4 = player addAction ["Sell Machine Gun Ammo", "\z\addons\dayz_code\actions\sell_db.sqf",[5], 90, true, false, "",""];
|
||||
|
||||
_buy5 = player addAction ["Buy Sniper Rifle Ammo", "\z\addons\dayz_code\actions\buy_db.sqf",[6], 89, true, false, "",""];
|
||||
_sell5 = player addAction ["Sell Sniper Rifle Ammo", "\z\addons\dayz_code\actions\sell_db.sqf",[6], 88, true, false, "",""];
|
||||
|
||||
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy1];
|
||||
s_player_parts set [count s_player_parts,_sell1];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy];
|
||||
s_player_parts set [count s_player_parts,_sell];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy2];
|
||||
s_player_parts set [count s_player_parts,_sell2];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy3];
|
||||
s_player_parts set [count s_player_parts,_sell3];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy4];
|
||||
s_player_parts set [count s_player_parts,_sell4];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy5];
|
||||
s_player_parts set [count s_player_parts,_sell5];
|
||||
|
||||
s_player_parts_crtl = 1;
|
||||
};
|
||||
@@ -311,8 +413,8 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
// [_trader_id, _category, ];
|
||||
_buy = player addAction ["Buy Vehicle", "\z\addons\dayz_code\actions\buy_db.sqf",[6,"Vehicle"], 99, true, false, "",""];
|
||||
_sell = player addAction ["Sell Vehicle", "\z\addons\dayz_code\actions\sell_db.sqf",[6,"Vehicle"], 98, true, false, "",""];
|
||||
_buy = player addAction ["Buy Vehicle", "\z\addons\dayz_code\actions\buy_db.sqf",[41], 99, true, false, "",""];
|
||||
_sell = player addAction ["Sell Vehicle", "\z\addons\dayz_code\actions\sell_db.sqf",[41], 98, true, false, "",""];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy];
|
||||
s_player_parts set [count s_player_parts,_sell];
|
||||
@@ -328,13 +430,44 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
// [part_out, part_in, qty_out, qty_in,];
|
||||
_zparts1 = player addAction ["Trade Zombie Parts for Bio Meat", "\z\addons\dayz_code\actions\trade_items.sqf",["FoodBioMeat","ItemZombieParts",1,1], 99, true, true, "",""];
|
||||
_zparts2 = player addAction ["Buy Medical", "\z\addons\dayz_code\actions\buy_db.sqf",[3,"Medical"], 97, true, false, "",""];
|
||||
_zparts3 = player addAction ["Sell Medical", "\z\addons\dayz_code\actions\sell_db.sqf",[3,"Medical"], 96, true, false, "",""];
|
||||
_zparts1 = player addAction ["Trade Zombie Parts for Bio Meat", "\z\addons\dayz_code\actions\trade_items.sqf",["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat"], 99, true, true, "",""];
|
||||
_zparts2 = player addAction ["Buy Medical", "\z\addons\dayz_code\actions\buy_db.sqf",[31], 97, true, false, "",""];
|
||||
_zparts3 = player addAction ["Sell Medical", "\z\addons\dayz_code\actions\sell_db.sqf",[31], 96, true, false, "",""];
|
||||
|
||||
_zparts4 = player addAction ["Buy Chem-lites/Flares", "\z\addons\dayz_code\actions\buy_db.sqf",[32], 95, true, false, "",""];
|
||||
_zparts5 = player addAction ["Sell Chem-lites/Flares", "\z\addons\dayz_code\actions\sell_db.sqf",[32], 94, true, false, "",""];
|
||||
|
||||
_zparts6 = player addAction ["Buy Smoke Grenades", "\z\addons\dayz_code\actions\buy_db.sqf",[33], 93, true, false, "",""];
|
||||
_zparts7 = player addAction ["Sell Smoke Grenades", "\z\addons\dayz_code\actions\sell_db.sqf",[33], 92, true, false, "",""];
|
||||
|
||||
s_player_parts set [count s_player_parts,_zparts1];
|
||||
s_player_parts set [count s_player_parts,_zparts2];
|
||||
s_player_parts set [count s_player_parts,_zparts3];
|
||||
s_player_parts set [count s_player_parts,_zparts4];
|
||||
s_player_parts set [count s_player_parts,_zparts5];
|
||||
s_player_parts set [count s_player_parts,_zparts6];
|
||||
s_player_parts set [count s_player_parts,_zparts7];
|
||||
s_player_parts_crtl = 1;
|
||||
};
|
||||
};
|
||||
|
||||
// metals_trader
|
||||
if (_isMan and _traderType == metals_trader) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
// [part_out, part_in, qty_out, qty_in,];
|
||||
_metals1 = player addAction ["Trade 6 Copper for 1 Silver", "\z\addons\dayz_code\actions\trade_items.sqf",["ItemSilverBar","ItemCopperBar",1,6,"buy","Copper","Silver"], 99, true, true, "",""];
|
||||
_metals2 = player addAction ["Trade 1 Silver for 6 Copper", "\z\addons\dayz_code\actions\trade_items.sqf",["ItemCopperBar","ItemSilverBar",6,1,"buy","Silver","Copper"], 98, true, true, "",""];
|
||||
_metals4 = player addAction ["Trade 6 Silver for 1 Gold", "\z\addons\dayz_code\actions\trade_items.sqf",["ItemGoldBar","ItemSilverBar",1,6,"buy","Silver","Gold"], 97, true, true, "",""];
|
||||
_metals3 = player addAction ["Trade 1 Gold for 6 Silver", "\z\addons\dayz_code\actions\trade_items.sqf",["ItemSilverBar","ItemGoldBar",6,1,"buy","Gold","Silver"], 97, true, true, "",""];
|
||||
|
||||
|
||||
s_player_parts set [count s_player_parts,_metals1];
|
||||
s_player_parts set [count s_player_parts,_metals2];
|
||||
s_player_parts set [count s_player_parts,_metals3];
|
||||
s_player_parts set [count s_player_parts,_metals4];
|
||||
;
|
||||
s_player_parts_crtl = 1;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ if ((!r_player_handler1) and (r_handlerCount == 0)) then {
|
||||
disableUserInput true;
|
||||
//waitUntil{USEC_MotherInbox == ""};
|
||||
//["MED001",0,"Unconscious"] call fnc_usec_recordEventClient;
|
||||
localize "CLIENT: Unconscious...";
|
||||
diag_log "CLIENT: Unconscious...";
|
||||
while {(r_player_unconscious)} do {
|
||||
_ctrl1 ctrlSetPosition [(_ctrl1Pos select 0),(_ctrl1Pos select 1),(_ctrl1Pos select 2),((0.136829 * safezoneH) * (1 -(r_player_timeout / _totalTimeout)))];
|
||||
_ctrl1 ctrlCommit 1;
|
||||
@@ -86,7 +86,7 @@ if ((!r_player_handler1) and (r_handlerCount == 0)) then {
|
||||
};
|
||||
};
|
||||
4 cutRsc ["default", "PLAIN",1];
|
||||
localize "CLIENT: Conscious...";
|
||||
diag_log "CLIENT: Conscious...";
|
||||
disableUserInput false;
|
||||
//waitUntil{USEC_MotherInbox == ""};
|
||||
//["MED001",0,"Conscious"] call fnc_usec_recordEventClient;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
private ["_objects"];
|
||||
_objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage"], 10];
|
||||
_objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage","VaultStorage"], 10];
|
||||
{
|
||||
dayzUpdateVehicle = [_x,"all"];
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
|
||||
75
dayz_code/compile/player_packVault.sqf
Normal file
75
dayz_code/compile/player_packVault.sqf
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
[_obj] spawn player_packVault;
|
||||
*/
|
||||
private["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_bag","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr"];
|
||||
_obj = _this;
|
||||
_ownerID = _obj getVariable["CharacterID","0"];
|
||||
_objectID = _obj getVariable["ObjectID","0"];
|
||||
_objectUID = _obj getVariable["ObjectUID","0"];
|
||||
player playActionNow "Medic";
|
||||
|
||||
player removeAction s_player_packvault;
|
||||
s_player_packvault = -1;
|
||||
|
||||
if(_ownerID == dayz_characterID) then {
|
||||
_alreadyPacking = _obj getVariable["packing",0];
|
||||
|
||||
if (_alreadyPacking == 1) exitWith {cutText ["That vault is already being packed." , "PLAIN DOWN"]};
|
||||
|
||||
_obj setVariable["packing",1];
|
||||
|
||||
_dir = direction _obj;
|
||||
_pos = getposATL _obj;
|
||||
[player,"tentpack",0,false] call dayz_zombieSpeak;
|
||||
sleep 3;
|
||||
|
||||
//place tent (local)
|
||||
_bag = createVehicle ["WeaponHolder_ItemVault",_pos,[], 0, "CAN_COLLIDE"];
|
||||
_bag setdir _dir;
|
||||
player reveal _bag;
|
||||
|
||||
_holder = "WeaponHolder" createVehicle _pos;
|
||||
|
||||
_weapons = getWeaponCargo _obj;
|
||||
_magazines = getMagazineCargo _obj;
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
if (isServer) then {
|
||||
dayzDeleteObj call local_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 ["Your vault has been packed", "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText ["You cannot pack this vault, it is not yours", "PLAIN DOWN"];
|
||||
};
|
||||
@@ -3,13 +3,13 @@ _position = _this select 0;
|
||||
_doLoiter = _this select 1;
|
||||
_unitTypes = _this select 2;
|
||||
|
||||
_isNoone = {isPlayer _x} count (_position nearEntities ["CAManBase",30]) == 0;
|
||||
_isNoone = {isPlayer _x} count (_position nearEntities ["AllVehicles",30]) == 0;
|
||||
_loot = "";
|
||||
_array = [];
|
||||
_agent = objNull;
|
||||
|
||||
//Exit if a player is nearby
|
||||
if (!isNoone) exitWith {};
|
||||
if (!_isNoone) exitWith {};
|
||||
|
||||
if (count _unitTypes == 0) then {
|
||||
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
|
||||
@@ -33,7 +33,7 @@ class CfgMods
|
||||
hidePicture = 0;
|
||||
hideName = 0;
|
||||
action = "http://www.dayzmod.com";
|
||||
version = "1.7.4-D8";
|
||||
version = "1.7.4.3";
|
||||
hiveVersion = 0.96; //0.93
|
||||
};
|
||||
};
|
||||
|
||||
@@ -27,6 +27,7 @@ if (!isDedicated) then {
|
||||
building_monitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\building_monitor.sqf";
|
||||
player_fired = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_fired.sqf"; //Runs when player fires. Alerts nearby Zeds depending on calibre and audial rating
|
||||
player_packTent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_packTent.sqf";
|
||||
player_packVault = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_packVault.sqf";
|
||||
control_zombieAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\control_zombieAgent.sqf";
|
||||
player_updateGui = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGui.sqf";
|
||||
player_crossbowBolt = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_crossbowBolt.sqf";
|
||||
@@ -68,6 +69,7 @@ if (!isDedicated) then {
|
||||
player_SplitBars = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_SplitBars.sqf";
|
||||
player_reloadMag = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_reloadMags.sqf";
|
||||
player_tentPitch = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\tent_pitch.sqf";
|
||||
player_vaultPitch = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\vault_pitch.sqf";
|
||||
player_drink = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_drink.sqf";
|
||||
player_eat = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_eat.sqf";
|
||||
player_useMeds = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_useMeds.sqf";
|
||||
|
||||
@@ -25,20 +25,20 @@ if (isServer) then {
|
||||
"dayzDeath" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerDied};
|
||||
"dayzDiscoAdd" addPublicVariableEventHandler {dayz_disco set [count dayz_disco,(_this select 1)];};
|
||||
"dayzDiscoRem" addPublicVariableEventHandler {dayz_disco = dayz_disco - [(_this select 1)];};
|
||||
"dayzPlayerSave" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerSync;};
|
||||
"dayzPlayerSave" addPublicVariableEventHandler {(_this select 1) call server_playerSync;};
|
||||
"dayzPublishObj" addPublicVariableEventHandler {(_this select 1) call server_publishObj};
|
||||
"dayzPublishVeh" addPublicVariableEventHandler {(_this select 1) call server_publishVeh}; // for vehicle traders
|
||||
// "dayzPublishBank" addPublicVariableEventHandler {(_this select 1) call server_publishBank};
|
||||
"dayzTraderMenu" addPublicVariableEventHandler {(_this select 1) call server_traders}; // for all traders
|
||||
"dayzUpdateVehicle" addPublicVariableEventHandler {_id = (_this select 1) spawn server_updateObject};
|
||||
"dayzDeleteObj" addPublicVariableEventHandler {_id = (_this select 1) spawn local_deleteObj};
|
||||
"dayzLogin" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerLogin};
|
||||
"dayzLogin" addPublicVariableEventHandler {(_this select 1) call server_playerLogin};
|
||||
"dayzLogin2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
|
||||
"dayzPlayerMorph" addPublicVariableEventHandler {(_this select 1) call server_playerMorph};
|
||||
"dayzUpdate" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_processUpdate};
|
||||
"dayzLoginRecord" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_recordLogin};
|
||||
"dayzCharSave" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerSync};
|
||||
"dayzCharDisco" addPublicVariableEventHandler {_id = (_this select 1) spawn server_characterSync};
|
||||
"dayzCharSave" addPublicVariableEventHandler {(_this select 1) call server_playerSync};
|
||||
"dayzCharDisco" addPublicVariableEventHandler {(_this select 1) call server_characterSync};
|
||||
};
|
||||
|
||||
//Client only
|
||||
|
||||
@@ -54,6 +54,7 @@ dayz_resetSelfActions = {
|
||||
s_player_fireout = -1;
|
||||
s_player_butcher = -1;
|
||||
s_player_packtent = -1;
|
||||
s_player_packvault = -1;
|
||||
s_player_fillwater = -1;
|
||||
s_player_fillwater2 = -1;
|
||||
s_player_fillfuel = -1;
|
||||
@@ -226,10 +227,6 @@ if(!isDedicated) then {
|
||||
dayz_bodyMonitor = [];
|
||||
dayz_flyMonitor = []; //used for monitor flies
|
||||
|
||||
dayz_buildingMonitor = []; //Buildings to check
|
||||
dayz_bodyMonitor = [];
|
||||
dayz_flyMonitor = []; //used for monitor flies
|
||||
|
||||
dayz_baseTypes = getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
|
||||
//temperature variables
|
||||
|
||||
@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
|
||||
class DAYZ_Version : CA_Version
|
||||
{
|
||||
idc = -1;
|
||||
text = "DayZ 1.7.4-D8";
|
||||
text = "DayZ 1.7.4.2";
|
||||
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
||||
};
|
||||
class CA_TitleMainMenu;
|
||||
|
||||
@@ -869,7 +869,7 @@ class FSM
|
||||
name = "Load_In";
|
||||
init = /*%FSM<STATEINIT""">*/"//Reveal action types" \n
|
||||
"" \n
|
||||
"{player reveal _x} forEach (nearestObjects [getPosATL player, [""AllVehicles"",""WeaponHolder"",""TentStorage"",""BuiltItems""], 50]);" \n
|
||||
"{player reveal _x} forEach (nearestObjects [getPosATL player, [""AllVehicles"",""WeaponHolder"",""TentStorage"",""VaultStorage"",""BuiltItems""], 50]);" \n
|
||||
"" \n
|
||||
"dayz_clientPreload = true;" \n
|
||||
"3 fadeSound 1;" \n
|
||||
|
||||
Reference in New Issue
Block a user