diff --git a/MPMissions/DayZ_Epoch_11.Chernarus/mission.sqm b/MPMissions/DayZ_Epoch_11.Chernarus/mission.sqm index 4941566a0..36ce9278b 100644 --- a/MPMissions/DayZ_Epoch_11.Chernarus/mission.sqm +++ b/MPMissions/DayZ_Epoch_11.Chernarus/mission.sqm @@ -14,7 +14,13 @@ class Mission "glt_m300t", "sigisolda", "suv_col", - "csj_gyroac" + "csj_gyroac", + "cawheeled_acr_octavia", + "CAWheeled_E_ATV", + "CAWheeled_E_LandRover", + "cawheeled_acr_t810", + "cawheeled_acr_hmmwv", + "camisc_acr_pbx" }; addOnsAuto[]= { diff --git a/dayz_code/actions/player_eat.sqf b/dayz_code/actions/player_eat.sqf index eb615a0de..f32ed5cbb 100644 --- a/dayz_code/actions/player_eat.sqf +++ b/dayz_code/actions/player_eat.sqf @@ -11,7 +11,12 @@ if (vehicle player != player) exitWith {cutText ["You may not eat while in a veh _item = _this; _hasfooditem = _this in magazines player; -_rndInfection = (random 15); +if (_item == "FoodBioMeat") then { + _rndInfection = (random 7); +} else { + _rndInfection = (random 15); +}; + _EatInfection = (_rndInfection < 1); _config = configFile >> "CfgMagazines" >> _item; diff --git a/dayz_code/actions/player_tagFriendly.sqf b/dayz_code/actions/player_tagFriendly.sqf index 95aeff3d2..cf8330222 100644 --- a/dayz_code/actions/player_tagFriendly.sqf +++ b/dayz_code/actions/player_tagFriendly.sqf @@ -5,21 +5,18 @@ _action = _this select 2; _caller removeAction _action; -_callerID = _caller getVariable ["characterID", 0]; -_targetID = _target getVariable ["characterID", 0]; +_callerID = _caller getVariable "characterID"; +_targetID = _target getVariable "characterID"; -if (_callerID != 0 && _targetID != 0) then { +_friendlies = _caller getVariable ["friendlies", []]; +_friendlies set [count _friendlies, _targetID]; +_caller setVariable ["friendlies", _friendlies, true]; - _friendlies = _caller getVariable ["friendlies", []]; - _friendlies set [count _friendlies, _targetID]; - _caller setVariable ["friendlies", _friendlies, true]; +_rfriendlies = _target getVariable ["friendlies", []]; - _rfriendlies = _target getVariable ["friendlies", []]; - - if ((isNil "_rfriendlies") or !(_callerID in _rfriendlies)) then { - // caller - titleText [format["You have tagged %1 as friendly. Waiting for %1 to accept that.",(name _target)]]; - // target - [_caller,_target,"loc",rTITLETEXT,format["%1 wants to tag you as friendly. To accept, tag %1 as friendly.", (name _caller)],"PLAIN DOWN"] call RE; - }; +if (!(_callerID in _rfriendlies)) then { + // caller + titleText [format["You have tagged %1 as friendly. Waiting for %1 to accept that.",(name _target)], "PLAIN DOWN"]; + // target + [_caller,_target,"loc",rTITLETEXT,format["%1 wants to tag you as friendly. To accept, tag %1 as friendly.", (name _caller)],"PLAIN DOWN"] call RE; }; \ No newline at end of file diff --git a/dayz_code/actions/player_wearClothes.sqf b/dayz_code/actions/player_wearClothes.sqf index c9d1cfd3d..b6185edbc 100644 --- a/dayz_code/actions/player_wearClothes.sqf +++ b/dayz_code/actions/player_wearClothes.sqf @@ -18,21 +18,15 @@ if (!_hasclothesitem) exitWith {cutText [format[(localize "str_player_31"),_text if (vehicle player != player) exitWith {cutText ["You may not change clothes while in a vehicle", "PLAIN DOWN"]}; -// _isFemale = ((typeOf player == "SurvivorW2_DZ")||(typeOf player == "BanditW1_DZ")); -// if (_isFemale) exitWith {cutText ["Currently Female Characters cannot change to this skin. This will change in a future update.", "PLAIN DOWN"]}; - _myModel = (typeOf player); _itemNew = "Skin_" + _myModel; diag_log ("Debug Clothes: model In: " + str(_itemNew) + " Out: " + str(_item)); - if ( (isClass(_config >> _itemNew)) ) then { if ( (isClass(_config >> _item)) ) then { // Current sex of player skin - - _currentSex = getText (configFile >> "CfgSurvival" >> "Skins" >> _itemNew >> "sex"); // Sex of new skin _newSex = getText (configFile >> "CfgSurvival" >> "Skins" >> _item >> "sex"); diff --git a/dayz_code/compile/fn_selfActions.sqf b/dayz_code/compile/fn_selfActions.sqf index 1198cb0ce..42b5e52c8 100644 --- a/dayz_code/compile/fn_selfActions.sqf +++ b/dayz_code/compile/fn_selfActions.sqf @@ -285,20 +285,31 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) }; }; + _humanity = player getVariable ["humanity",0]; + // Parts Trader #1 if (_isMan and !_isPZombie and _traderType == parts_trader) then { if (s_player_parts_crtl < 0) then { - _parts_trader_menu = [["Car Parts",21],["Building Supplies",22],["Explosives",23]]; - { - // _title = _x select 0; - // _traderid = _x select 1; - // buy_or_sell.sqf [_trader_id, _category, ]; - _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; - s_player_parts set [count s_player_parts,_buy]; + if(_humanity < -2000) then { - } forEach _parts_trader_menu; + _cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; + s_player_parts set [count s_player_parts,_cancel]; + + } else { + + _parts_trader_menu = [["Car Parts",21],["Building Supplies",22],["Explosives",23]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _parts_trader_menu; + + }; s_player_parts_crtl = 1; }; }; @@ -308,15 +319,24 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (s_player_parts_crtl < 0) then { - _parts_trader_2_menu = [["Car Parts",2121],["Building Supplies",2222],["Explosives",2323]]; - { - // _title = _x select 0; - // _traderid = _x select 1; - // buy_or_sell.sqf [_trader_id, _category, ]; - _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; - s_player_parts set [count s_player_parts,_buy]; + if(_humanity < -2000) then { - } forEach _parts_trader_2_menu; + _cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; + s_player_parts set [count s_player_parts,_cancel]; + + } else { + + _parts_trader_2_menu = [["Car Parts",2121],["Building Supplies",2222],["Explosives",2323]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _parts_trader_2_menu; + + }; s_player_parts_crtl = 1; }; }; @@ -326,15 +346,24 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (s_player_parts_crtl < 0) then { - _weapon_trader_menu = [["Sidearm",11],["Rifle",12],["Shotgun",13],["Assault Rifle",14],["Machine Gun",15],["Sniper Rifle",16]]; - { - // _title = _x select 0; - // _traderid = _x select 1; - // buy_or_sell.sqf [_trader_id, _category, ]; - _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; - s_player_parts set [count s_player_parts,_buy]; + if(_humanity < -2000) then { - } forEach _weapon_trader_menu; + _cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; + s_player_parts set [count s_player_parts,_cancel]; + + } else { + + _weapon_trader_menu = [["Sidearm",11],["Rifle",12],["Shotgun",13],["Assault Rifle",14],["Machine Gun",15],["Sniper Rifle",16]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _weapon_trader_menu; + + }; s_player_parts_crtl = 1; }; }; @@ -343,16 +372,24 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (_isMan and !_isPZombie and _traderType == weapon_trader_2) then { if (s_player_parts_crtl < 0) then { + + if(_humanity < -2000) then { - _weapon_trader_2_menu = [["Sidearm",1111],["Rifle",1212],["Shotgun",1313],["Assault Rifle",1414],["Machine Gun",1515],["Sniper Rifle",1616]]; - { - // _title = _x select 0; - // _traderid = _x select 1; - // buy_or_sell.sqf [_trader_id, _category, ]; - _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; - s_player_parts set [count s_player_parts,_buy]; + _cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; + s_player_parts set [count s_player_parts,_cancel]; - } forEach _weapon_trader_2_menu; + } else { + _weapon_trader_2_menu = [["Sidearm",1111],["Rifle",1212],["Shotgun",1313],["Assault Rifle",1414],["Machine Gun",1515],["Sniper Rifle",1616]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _weapon_trader_2_menu; + + }; s_player_parts_crtl = 1; }; }; @@ -362,23 +399,32 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (s_player_parts_crtl < 0) then { - // [_trader_id, _category, ]; - _cantrader = player addAction ["Trade 3 Empty Soda Cans for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","ItemSodaEmpty",1,3,"buy","Empty Soda Cans","Copper Bar"], 99, true, true, "",""]; - _cantrader1 = player addAction ["Trade 3 Empty Tin Cans for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","TrashTinCan",1,3,"buy","Empty Tin Cans","Copper Bar"], 99, true, true, "",""]; - _cantrader2 = player addAction ["Trade 1 Empty Wiskey Bottle for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","TrashJackDaniels",1,1,"buy","Empty Wiskey Bottle","Copper Bar"], 99, true, true, "",""]; - s_player_parts set [count s_player_parts,_cantrader]; - s_player_parts set [count s_player_parts,_cantrader1]; - s_player_parts set [count s_player_parts,_cantrader2]; + if(_humanity < -2000) then { - _can_trader_menu = [["Food and Drinks",51],["Backpacks",52],["Toolbelt",53],["Clothes",54]]; - { - // _title = _x select 0; - // _traderid = _x select 1; - // buy_or_sell.sqf [_trader_id, _category, ]; - _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 98, true, false, "",""]; - s_player_parts set [count s_player_parts,_buy]; + _cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; + s_player_parts set [count s_player_parts,_cancel]; - } forEach _can_trader_menu; + } else { + + // [_trader_id, _category, ]; + _cantrader = player addAction ["Trade 3 Empty Soda Cans for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","ItemSodaEmpty",1,3,"buy","Empty Soda Cans","Copper Bar"], 99, true, true, "",""]; + _cantrader1 = player addAction ["Trade 3 Empty Tin Cans for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","TrashTinCan",1,3,"buy","Empty Tin Cans","Copper Bar"], 99, true, true, "",""]; + _cantrader2 = player addAction ["Trade 1 Empty Wiskey Bottle for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","TrashJackDaniels",1,1,"buy","Empty Wiskey Bottle","Copper Bar"], 99, true, true, "",""]; + s_player_parts set [count s_player_parts,_cantrader]; + s_player_parts set [count s_player_parts,_cantrader1]; + s_player_parts set [count s_player_parts,_cantrader2]; + + _can_trader_menu = [["Food and Drinks",51],["Backpacks",52],["Toolbelt",53],["Clothes",54]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 98, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _can_trader_menu; + + }; s_player_parts_crtl = 1; }; @@ -388,24 +434,33 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (_isMan and !_isPZombie and _traderType == can_trader_2) then { if (s_player_parts_crtl < 0) then { + + if(_humanity < -2000) then { - // [_trader_id, _category, ]; - _cantrader = player addAction ["Trade 3 Empty Soda Cans for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","ItemSodaEmpty",1,3,"buy","Empty Soda Cans","Copper Bar"], 99, true, true, "",""]; - _cantrader1 = player addAction ["Trade 3 Empty Tin Cans for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","TrashTinCan",1,3,"buy","Empty Tin Cans","Copper Bar"], 99, true, true, "",""]; - _cantrader2 = player addAction ["Trade 1 Empty Wiskey Bottle for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","TrashJackDaniels",1,1,"buy","Empty Wiskey Bottle","Copper Bar"], 99, true, true, "",""]; - s_player_parts set [count s_player_parts,_cantrader]; - s_player_parts set [count s_player_parts,_cantrader1]; - s_player_parts set [count s_player_parts,_cantrader2]; + _cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; + s_player_parts set [count s_player_parts,_cancel]; - _can_trader_2_menu = [["Food and Drinks",5151],["Backpacks",5252],["Toolbelt",5353],["Clothes",5454]]; - { - // _title = _x select 0; - // _traderid = _x select 1; - // buy_or_sell.sqf [_trader_id, _category, ]; - _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 98, true, false, "",""]; - s_player_parts set [count s_player_parts,_buy]; + } else { - } forEach _can_trader_2_menu; + // [_trader_id, _category, ]; + _cantrader = player addAction ["Trade 3 Empty Soda Cans for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","ItemSodaEmpty",1,3,"buy","Empty Soda Cans","Copper Bar"], 99, true, true, "",""]; + _cantrader1 = player addAction ["Trade 3 Empty Tin Cans for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","TrashTinCan",1,3,"buy","Empty Tin Cans","Copper Bar"], 99, true, true, "",""]; + _cantrader2 = player addAction ["Trade 1 Empty Wiskey Bottle for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","TrashJackDaniels",1,1,"buy","Empty Wiskey Bottle","Copper Bar"], 99, true, true, "",""]; + s_player_parts set [count s_player_parts,_cantrader]; + s_player_parts set [count s_player_parts,_cantrader1]; + s_player_parts set [count s_player_parts,_cantrader2]; + + _can_trader_2_menu = [["Food and Drinks",5151],["Backpacks",5252],["Toolbelt",5353],["Clothes",5454]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 98, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _can_trader_2_menu; + + }; s_player_parts_crtl = 1; }; @@ -415,16 +470,25 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (_isMan and !_isPZombie and _traderType == ammo_trader) then { if (s_player_parts_crtl < 0) then { + + if(_humanity < -2000) then { - _ammo_trader_menu = [["Sidearm Ammo",1],["Rifle Ammo",2],["Shotgun and Crossbow Ammo",3],["Assault Rifle Ammo",4],["Machine Gun Ammo",5],["Sniper Rifle Ammo",6]]; - { - // _title = _x select 0; - // _traderid = _x select 1; - // buy_or_sell.sqf [_trader_id, _category, ]; - _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; - s_player_parts set [count s_player_parts,_buy]; + _cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; + s_player_parts set [count s_player_parts,_cancel]; - } forEach _ammo_trader_menu; + } else { + + _ammo_trader_menu = [["Sidearm Ammo",1],["Rifle Ammo",2],["Shotgun and Crossbow Ammo",3],["Assault Rifle Ammo",4],["Machine Gun Ammo",5],["Sniper Rifle Ammo",6]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _ammo_trader_menu; + + }; s_player_parts_crtl = 1; }; @@ -435,15 +499,25 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (s_player_parts_crtl < 0) then { - _ammo_trader_2_menu = [["Sidearm Ammo",1001],["Rifle Ammo",2002],["Shotgun and Crossbow Ammo",3003],["Assault Rifle Ammo",4004],["Machine Gun Ammo",5005],["Sniper Rifle Ammo",6006]]; - { - // _title = _x select 0; - // _traderid = _x select 1; - // buy_or_sell.sqf [_trader_id, _category, ]; - _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; - s_player_parts set [count s_player_parts,_buy]; + + if(_humanity < -2000) then { - } forEach _ammo_trader_2_menu; + _cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; + s_player_parts set [count s_player_parts,_cancel]; + + } else { + + _ammo_trader_2_menu = [["Sidearm Ammo",1001],["Rifle Ammo",2002],["Shotgun and Crossbow Ammo",3003],["Assault Rifle Ammo",4004],["Machine Gun Ammo",5005],["Sniper Rifle Ammo",6006]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _ammo_trader_2_menu; + + }; s_player_parts_crtl = 1; }; @@ -454,17 +528,27 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (_isMan and !_isPZombie and _traderType == boat_trader) then { if (s_player_parts_crtl < 0) then { + + if(_humanity < -2000) then { - _boat_trader_menu = [["Boats Unarmed",49],["Boats Armed",499],["Wholesale",999]]; - { - // _title = _x select 0; - // _traderid = _x select 1; - // buy_or_sell.sqf [_trader_id, _category, ]; - _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; - s_player_parts set [count s_player_parts,_buy]; + _cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; + s_player_parts set [count s_player_parts,_cancel]; - } forEach _boat_trader_menu; + } else { + + _boat_trader_menu = [["Boats Unarmed",49],["Boats Armed",499],["Wholesale",999]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _boat_trader_menu; + + }; s_player_parts_crtl = 1; + }; }; @@ -474,16 +558,25 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (_isMan and !_isPZombie and _traderType == auto_trader) then { if (s_player_parts_crtl < 0) then { + + if(_humanity < -2000) then { - _auto_trader_menu = [["Cars",41],["Trucks Unarmed",42],["SUV",466],["Buses and Vans",467],["Offroad",43],["Helicopter Unarmed",44],["Military Unarmed",45]]; - { - // _title = _x select 0; - // _traderid = _x select 1; - // buy_or_sell.sqf [_trader_id, _category, ]; - _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; - s_player_parts set [count s_player_parts,_buy]; + _cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; + s_player_parts set [count s_player_parts,_cancel]; - } forEach _auto_trader_menu; + } else { + + + _auto_trader_menu = [["Cars",41],["Trucks Unarmed",42],["SUV",466],["Buses and Vans",467],["Offroad",43],["Helicopter Unarmed",44],["Military Unarmed",45]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _auto_trader_menu; + }; s_player_parts_crtl = 1; }; @@ -494,16 +587,24 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (_isMan and !_isPZombie and _traderType == auto_trader_2) then { if (s_player_parts_crtl < 0) then { + + if(_humanity < -2000) then { - _auto_trader_2_menu = [["Trucks Armed",422],["Utility",46],["Helicopter Armed",444],["Military Armed",455],["Fuel Trucks",47],["Heavy Armor Unarmed",48]]; - { - // _title = _x select 0; - // _traderid = _x select 1; - // buy_or_sell.sqf [_trader_id, _category, ]; - _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; - s_player_parts set [count s_player_parts,_buy]; + _cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; + s_player_parts set [count s_player_parts,_cancel]; - } forEach _auto_trader_2_menu; + } else { + + _auto_trader_2_menu = [["Trucks Armed",422],["Utility",46],["Helicopter Armed",444],["Military Armed",455],["Fuel Trucks",47],["Heavy Armor Unarmed",48]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _auto_trader_2_menu; + }; s_player_parts_crtl = 1; }; @@ -514,19 +615,28 @@ 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_wo_db.sqf",["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat"], 99, true, true, "",""]; - s_player_parts set [count s_player_parts,_zparts1]; + if(_humanity < -2000) then { - _mad_sci_menu = [["Medical Supplies",31],["Chem-lites/Flares",32],["Smoke Grenades",33]]; - { - // _title = _x select 0; - // _traderid = _x select 1; - // buy_or_sell.sqf [_trader_id, _category, ]; - _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; - s_player_parts set [count s_player_parts,_buy]; + _cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; + s_player_parts set [count s_player_parts,_cancel]; - } forEach _mad_sci_menu; + } else { + + // [part_out, part_in, qty_out, qty_in,]; + _zparts1 = player addAction ["Trade Zombie Parts for Bio Meat", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat"], 99, true, true, "",""]; + s_player_parts set [count s_player_parts,_zparts1]; + + + _mad_sci_menu = [["Medical Supplies",31],["Chem-lites/Flares",32],["Smoke Grenades",33]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _mad_sci_menu; + }; s_player_parts_crtl = 1; }; }; @@ -536,19 +646,27 @@ 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_wo_db.sqf",["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat"], 99, true, true, "",""]; - s_player_parts set [count s_player_parts,_zparts1]; + if(_humanity < -2000) then { - _mad_sci_2_menu = [["Medical Supplies",3131],["Chem-lites/Flares",3232],["Smoke Grenades",3333]]; - { - // _title = _x select 0; - // _traderid = _x select 1; - // buy_or_sell.sqf [_trader_id, _category, ]; - _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; - s_player_parts set [count s_player_parts,_buy]; + _cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; + s_player_parts set [count s_player_parts,_cancel]; - } forEach _mad_sci_2_menu; + } else { + + // [part_out, part_in, qty_out, qty_in,]; + _zparts1 = player addAction ["Trade Zombie Parts for Bio Meat", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat"], 99, true, true, "",""]; + s_player_parts set [count s_player_parts,_zparts1]; + + _mad_sci_2_menu = [["Medical Supplies",3131],["Chem-lites/Flares",3232],["Smoke Grenades",3333]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _mad_sci_2_menu; + }; s_player_parts_crtl = 1; }; }; diff --git a/dayz_code/compile/player_friendliesCheck.sqf b/dayz_code/compile/player_friendliesCheck.sqf index daf57749e..3ff993a78 100644 --- a/dayz_code/compile/player_friendliesCheck.sqf +++ b/dayz_code/compile/player_friendliesCheck.sqf @@ -13,10 +13,10 @@ _tagList = player getVariable ["tagList", []]; if (!(_charID in _rfriendlyTo)) then { _position = [0,0,0]; _tag = "Sign_sphere10cm_EP1" createVehicleLocal _position; - _tag attachTo [_x,[0,0,2]]; + _tag attachTo [_x,[0,0,0],"lwrist"]; _tag setVariable ["belongsTo", _rcharID]; _rfriendlyTo set [count _rfriendlyTo, _charID]; - _x setVariable ["friendlyTo", _rfriendlyTo]; + _x setVariable ["friendlyTo", _rfriendlyTo, true]; _tagList set [count _tagList, [_x, _tag]]; player setVariable ["tagList", _tagList]; titleText [format["You and %1 are now tagged as friendlies.", (name _x)], "PLAIN DOWN"]; diff --git a/dayz_code/compile/player_humanityChange.sqf b/dayz_code/compile/player_humanityChange.sqf index a480e0529..7bb29a798 100644 --- a/dayz_code/compile/player_humanityChange.sqf +++ b/dayz_code/compile/player_humanityChange.sqf @@ -10,15 +10,14 @@ if (_object == player) then { if (_change < 0) then { _wait = _this select 2; player setVariable["humanity",_humanity,true]; - if ((typeOf player != "Bandit1_DZ") && (typeOf player != "BanditW1_DZ")) then { - if (player getVariable ["freeTarget",false]) then { - waitUntil{!(player getVariable ["freeTarget",false])}; - }; - player setVariable ["freeTarget",true,true]; - _timeStart = time; - sleep _wait; - player setVariable ["freeTarget",false,true]; + if (player getVariable ["freeTarget",false]) then { + waitUntil{!(player getVariable ["freeTarget",false])}; }; + player setVariable ["freeTarget",true,true]; + _timeStart = time; + sleep _wait; + player setVariable ["freeTarget",false,true]; + } else { player setVariable["humanity",_humanity,true]; }; diff --git a/dayz_code/config.cpp b/dayz_code/config.cpp index c12d0e785..1a3bec68d 100644 --- a/dayz_code/config.cpp +++ b/dayz_code/config.cpp @@ -281,6 +281,10 @@ class CfgSurvival { sex = "female"; playerModel = "BanditW1_DZ"; }; + class Skin_BanditW2_DZ: Default { + sex = "female"; + playerModel = "BanditW2_DZ"; + }; class Skin_SurvivorW2_DZ: Default { sex = "female"; playerModel = "SurvivorW2_DZ"; diff --git a/dayz_code/gui/dayz_logo_ca.paa b/dayz_code/gui/dayz_logo_ca.paa index f2152b3cc..51a5b21f7 100644 Binary files a/dayz_code/gui/dayz_logo_ca.paa and b/dayz_code/gui/dayz_logo_ca.paa differ diff --git a/dayz_code/init/variables.sqf b/dayz_code/init/variables.sqf index f1070607d..97918018e 100644 --- a/dayz_code/init/variables.sqf +++ b/dayz_code/init/variables.sqf @@ -3,6 +3,7 @@ disableSerialization; //Model Variables Bandit1_DZ = "Bandit1_DZ"; BanditW1_DZ = "BanditW1_DZ"; +BanditW2_DZ = "BanditW2_DZ"; Survivor1_DZ = "Survivor2_DZ"; Survivor2_DZ = "Survivor2_DZ"; SurvivorW2_DZ = "SurvivorW2_DZ"; @@ -12,8 +13,8 @@ Camo1_DZ = "Camo1_DZ"; Soldier1_DZ = "Soldier1_DZ"; Rocket_DZ = "Rocket_DZ"; -AllPlayers = ["SurvivorW3_DZ","Bandit1_DZ","BanditW1_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest"]; -AllPlayersVehicles = ["SurvivorW3_DZ","Bandit1_DZ","BanditW1_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","AllVehicles"]; +AllPlayers = ["SurvivorW3_DZ","Bandit1_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest"]; +AllPlayersVehicles = ["SurvivorW3_DZ","Bandit1_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","AllVehicles"]; PZombie_VB = "PZombie_VB"; diff --git a/dayz_code/rscTitles.hpp b/dayz_code/rscTitles.hpp index 07faad65d..3c67ec774 100644 --- a/dayz_code/rscTitles.hpp +++ b/dayz_code/rscTitles.hpp @@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay class DAYZ_Version : CA_Version { idc = -1; - text = "DayZ Epoch 0.7 (1.7.5.M1D21)"; + text = "DayZ Epoch 0.78 (1.7.5.M1D21)"; y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)"; }; class CA_TitleMainMenu; diff --git a/dayz_equip/config.cpp b/dayz_equip/config.cpp index 4d02420c6..825d55f57 100644 --- a/dayz_equip/config.cpp +++ b/dayz_equip/config.cpp @@ -1097,11 +1097,17 @@ class CfgMagazines displayName = "Bandit (female)"; descriptionShort = "Bandit (female)"; }; + class Skin_BanditW2_DZ: SkinBase + { + scope = 2; + displayName = "Bandit Camo (female)"; + descriptionShort = "Bandit Camo (female)"; + }; class Skin_SurvivorW3_DZ: SkinBase { scope = 2; - displayName = "European (female)"; - descriptionShort = "European (female)"; + displayName = "Camo Pants (female)"; + descriptionShort = "Camo Pants (female)"; }; class Skin_SurvivorW2_DZ: SkinBase { diff --git a/dayz_server/compile/server_playerLogin.sqf b/dayz_server/compile/server_playerLogin.sqf index 78e175bab..34dab9ae4 100644 --- a/dayz_server/compile/server_playerLogin.sqf +++ b/dayz_server/compile/server_playerLogin.sqf @@ -79,15 +79,9 @@ if (!_isNew) then { _model = _primary select 7; _hiveVer = _primary select 8; - if ( !(isClass(configFile >> "CfgVehicles" >> _model)) ) then { + if (!(_model in AllPlayers)) then { _model = "Survivor2_DZ"; }; - - /* - if (!(_model in ["SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Soldier1_DZ","Rocket_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","SurvivorW2_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","PZombie_VB"])) then { - _model = "Survivor2_DZ"; - }; - */ } else { _isInfected = _primary select 3; diff --git a/dayz_server/compile/server_playerSetup.sqf b/dayz_server/compile/server_playerSetup.sqf index 7f989c5d4..b92732f5d 100644 --- a/dayz_server/compile/server_playerSetup.sqf +++ b/dayz_server/compile/server_playerSetup.sqf @@ -236,7 +236,7 @@ _playerObj setVariable["humanity_CHK",_humanity]; //_playerObj setVariable["worldspace",_worldspace,true]; //_playerObj setVariable["state",_state,true]; _playerObj setVariable["lastPos",getPosATL _playerObj]; -_playerObj setVariable["friendlies",_friendlies]; +_playerObj setVariable["friendlies",_friendlies,true]; dayzPlayerLogin2 = [_worldspace,_state]; _clientID = owner _playerObj; diff --git a/dayz_weapons/config.cpp b/dayz_weapons/config.cpp index 1b412f5a9..6ce3361e3 100644 --- a/dayz_weapons/config.cpp +++ b/dayz_weapons/config.cpp @@ -1574,6 +1574,11 @@ class CfgVehicles { side = 1; model = "\dayz\characters\woman_bandit"; + hiddenSelections[] = {"Camo"}; + hiddenSelectionsTextures[] = {"\ca\characters_e\woman\baker\data\baker_co.paa"}; + }; + class BanditW2_DZ: BanditW1_DZ + { hiddenSelections[] = {"Camo"}; hiddenSelectionsTextures[] = {"\ca\characters_e\woman\baker\data\european_woman_01_co.paa"}; };