mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Update private tags
From
e69f8d5306
Moved dog files to the \dog\ folder and pzombie files to the \pzombie\
folder. Also removed some legacy files that are no longer used.
The actions\ and compile\ folders are fully up to date now
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
achievementClientMsg = {
|
achievementClientMsg = {
|
||||||
private ["_achievement","_player","_AchievementText","_text","_display"];
|
private ["_achievement","_player","_AchievementText","_text","_display","_achievementID","_serverEvent"];
|
||||||
|
|
||||||
/* Only call this from the server
|
/* Only call this from the server
|
||||||
achievementClientPV = [_achievementID];
|
achievementClientPV = [_achievementID];
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
achievementServer = {
|
achievementServer = {
|
||||||
private ["_playerOwnerID","_player","_achievementID","_achievements"];
|
private ["_playerOwnerID","_player","_achievementID","_achievements"];
|
||||||
|
|
||||||
_achievementID = (_this select 0) select 0;
|
_achievementID = (_this select 0) select 0;
|
||||||
_player = (_this select 0) select 1;
|
_player = (_this select 0) select 1;
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
_object_type = typeOf cursorTarget;
|
|
||||||
_fuellevels = fuel cursorTarget;
|
|
||||||
_dmglevels = damage cursorTarget;
|
|
||||||
|
|
||||||
//remove action menu
|
|
||||||
player removeAction s_player_debugCheck;
|
|
||||||
s_player_debugCheck = -1;
|
|
||||||
|
|
||||||
hintSilent format ["Object: %1, Fuel: %2, Damage: %3", _object_type, _fuellevels, _dmglevels];
|
|
||||||
diag_log format ["Object: %1, Fuel: %2, Damage: %3", _object_type, _fuellevels, _dmglevels];
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
private["_bombData","_vehicle","_owner","_bombar"];
|
private ["_bombData","_vehicle","_owner","_bombar","_bombCar","_bomb"];
|
||||||
|
|
||||||
_bombData = _this select 0;
|
_bombData = _this select 0;
|
||||||
|
|
||||||
_vehicle = _bombData select 0;
|
_vehicle = _bombData select 0;
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
private["_location","_isOk","_dir","_classname"];
|
|
||||||
_location = player modeltoworld [0,1,0];
|
|
||||||
_location set [2,0];
|
|
||||||
_isOk = count (_location isFlatEmpty [0.5,0,0,4,0,false,player]) > 0;
|
|
||||||
|
|
||||||
if (_isOk) then {
|
|
||||||
_dir = getDir player;
|
|
||||||
_classname = "Land_Fire";
|
|
||||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
|
||||||
player playActionNow "Medic";
|
|
||||||
uiSleep 6;
|
|
||||||
dayz_hasFire = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
|
||||||
dayz_hasFire setDir _dir;
|
|
||||||
player reveal dayz_hasFire;
|
|
||||||
cutText [localize "str_fireplace_01", "PLAIN DOWN"];
|
|
||||||
} else {
|
|
||||||
cutText [localize "str_fireplace_02", "PLAIN DOWN"];
|
|
||||||
};
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
private["_flare"];
|
private ["_flare"];
|
||||||
|
|
||||||
_flare = _this select 3;
|
_flare = _this select 3;
|
||||||
player removeAction s_player_dropflare;
|
player removeAction s_player_dropflare;
|
||||||
detach _flare;
|
detach _flare;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
private ["_flare","_text"];
|
private["_flare","_text"];
|
||||||
|
|
||||||
_flare = _this select 3;
|
_flare = _this select 3;
|
||||||
player playActionNow "PutDown";
|
player playActionNow "PutDown";
|
||||||
uiSleep 2;
|
uiSleep 2;
|
||||||
@@ -14,7 +15,7 @@ dayz_hasLight = true;
|
|||||||
_text = getText (configFile >> "CfgAmmo" >> (typeOf _flare) >> "displayName");
|
_text = getText (configFile >> "CfgAmmo" >> (typeOf _flare) >> "displayName");
|
||||||
s_player_dropflare = player addAction [format[localize "str_actions_medical_16",_text], "\z\addons\dayz_code\actions\flare_drop.sqf",_flare, 1, false, true, "", ""];
|
s_player_dropflare = player addAction [format[localize "str_actions_medical_16",_text], "\z\addons\dayz_code\actions\flare_drop.sqf",_flare, 1, false, true, "", ""];
|
||||||
|
|
||||||
while {(alive _flare) && dayz_hasLight} do {
|
while {(alive _flare) and dayz_hasLight} do {
|
||||||
uiSleep 0.1;
|
uiSleep 0.1;
|
||||||
};
|
};
|
||||||
if (dayz_hasLight) then {
|
if (dayz_hasLight) then {
|
||||||
|
|||||||
@@ -1,91 +1,65 @@
|
|||||||
private ["_qty","_started","_finished","_animState","_isMedic","_abort","_fillCounter","_dis","_sfx","_displayName","_fuelCans"];
|
|
||||||
|
|
||||||
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_34","PLAIN DOWN"];};
|
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_34","PLAIN DOWN"];};
|
||||||
DZE_ActionInProgress = true;
|
DZE_ActionInProgress = true;
|
||||||
|
private ["_qty","_dis","_sfx","_started","_finished","_animState","_isRefuel","_fuelcans","_qty20","_qty5","_qty40"];
|
||||||
|
|
||||||
player removeAction s_player_fillfuel;
|
player removeAction s_player_fillfuel;
|
||||||
s_player_fillfuel = 1;
|
//s_player_fillfuel = -1;
|
||||||
|
|
||||||
_fillCounter = 0;
|
_fuelcans = ["ItemFuelcanEmpty","ItemJerrycanEmpty","ItemFuelBarrelEmpty"];
|
||||||
_abort = false;
|
|
||||||
|
|
||||||
_fuelCans = [];
|
_qty = 0;
|
||||||
|
_qty = {_x in _fuelcans} count magazines player;
|
||||||
|
|
||||||
{
|
_qty20 = {_x == "ItemJerrycanEmpty"} count magazines player;
|
||||||
if(_x == "ItemJerrycanEmpty" || _x == "ItemFuelBarrelEmpty") then {
|
_qty5 = {_x == "ItemFuelcanEmpty"} count magazines player;
|
||||||
_fuelCans set [(count _fuelCans),_x];
|
_qty40 = {_x == "ItemFuelBarrelEmpty"} count magazines player;
|
||||||
};
|
|
||||||
} count magazines player;
|
|
||||||
|
|
||||||
_qty = count _fuelCans;
|
if (("ItemJerrycanEmpty" in magazines player) or ("ItemFuelcanEmpty" in magazines player) or ("ItemFuelBarrelEmpty" in magazines player)) then {
|
||||||
|
|
||||||
{
|
|
||||||
_displayName = getText (configFile >> "cfgMagazines" >> _x >> "displayName");
|
|
||||||
|
|
||||||
_fillCounter = _fillCounter + 1;
|
|
||||||
|
|
||||||
cutText [format[(localize "str_siphon_preparing"),_displayName], "PLAIN DOWN"];
|
|
||||||
|
|
||||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
|
||||||
// force animation
|
|
||||||
player playActionNow "Medic";
|
player playActionNow "Medic";
|
||||||
// Play sound && alert zombies
|
|
||||||
|
|
||||||
_dis=10;
|
|
||||||
_sfx = "refuel";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
|
||||||
|
|
||||||
r_interrupt = false;
|
_dis=5;
|
||||||
_animState = animationState player;
|
_sfx = "refuel";
|
||||||
|
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||||
|
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
||||||
|
|
||||||
|
// Added Nutrition-Factor for work
|
||||||
|
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
||||||
|
|
||||||
r_doLoop = true;
|
r_doLoop = true;
|
||||||
_started = false;
|
_started = false;
|
||||||
_finished = false;
|
_finished = false;
|
||||||
|
|
||||||
while {r_doLoop} do {
|
while {r_doLoop} do {
|
||||||
_animState = animationState player;
|
_animState = animationState player;
|
||||||
_isMedic = ["medic",_animState] call fnc_inString;
|
_isRefuel = ["medic",_animState] call fnc_inString;
|
||||||
if (_isMedic) then {
|
if (_isRefuel) then {
|
||||||
_started = true;
|
_started = true;
|
||||||
};
|
};
|
||||||
if (_started && !_isMedic) then {
|
if (_started and !_isRefuel) then {
|
||||||
r_doLoop = false;
|
r_doLoop = false;
|
||||||
_finished = true;
|
_finished = true;
|
||||||
};
|
};
|
||||||
if (r_interrupt) then {
|
|
||||||
r_doLoop = false;
|
|
||||||
};
|
|
||||||
uiSleep 0.1;
|
uiSleep 0.1;
|
||||||
};
|
};
|
||||||
|
|
||||||
r_doLoop = false;
|
r_doLoop = false;
|
||||||
|
|
||||||
if (!_finished) exitWith {
|
if (_finished) then {
|
||||||
r_interrupt = false;
|
for "_x" from 1 to _qty20 do {
|
||||||
if (vehicle player == player) then {
|
player removeMagazine "ItemJerrycanEmpty";
|
||||||
[objNull, player, rSwitchMove,""] call RE;
|
player addMagazine "ItemJerrycan";
|
||||||
player playActionNow "stop";
|
};
|
||||||
|
for "_x" from 1 to _qty5 do {
|
||||||
|
player removeMagazine "ItemFuelcanEmpty";
|
||||||
|
player addMagazine "ItemFuelcan";
|
||||||
|
};
|
||||||
|
for "_x" from 1 to _qty40 do {
|
||||||
|
player removeMagazine "ItemFuelBarrelEmpty";
|
||||||
|
player addMagazine "ItemFuelBarrel";
|
||||||
};
|
};
|
||||||
cutText [localize "str_siphon_canceled","PLAIN DOWN"];
|
|
||||||
_abort = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_finished) then {
|
cutText [format [localize "str_player_09",_qty], "PLAIN DOWN"];
|
||||||
if(([player,_x] call BIS_fnc_invRemove) == 1) then {
|
} else {
|
||||||
if (_x == "ItemFuelBarrelEmpty") then {
|
cutText [localize "str_player_10", "PLAIN DOWN"];
|
||||||
player addMagazine "ItemFuelBarrel";
|
};
|
||||||
} else {
|
|
||||||
player addMagazine "ItemJerrycan";
|
|
||||||
};
|
|
||||||
cutText [format[(localize "str_epoch_player_134"),_displayName], "PLAIN DOWN"];
|
|
||||||
} else {
|
|
||||||
_abort = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
uiSleep 1;
|
|
||||||
if(_abort) exitWith {};
|
|
||||||
|
|
||||||
} count _fuelCans;
|
|
||||||
|
|
||||||
s_player_fillfuel = -1;
|
|
||||||
DZE_ActionInProgress = false;
|
DZE_ActionInProgress = false;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
//Code developed by Axe Cop - Massiv improvments && performance tunes by Skaronator
|
//Code developed by Axe Cop - Massiv improvments and performance tunes by Skaronator
|
||||||
private ["_missing","_missingQty","_proceed","_itemIn","_countIn","_qty","_num_removed","_uniqueID","_removed","_removed_total","_tobe_removed_total","_obj","_objectID","_objectUID","_classname","_location","_dir","_objectCharacterID","_object","_temp_removed_array","_textMissing","_target","_objectClasses","_range","_objects","_requirements","_count","_cost","_itemText","_option"];
|
private ["_missing","_missingQty","_proceed","_itemIn","_countIn","_qty","_num_removed","_uniqueID","_removed","_removed_total","_tobe_removed_total","_obj","_objectID","_objectUID","_classname","_location","_dir","_objectCharacterID","_object","_temp_removed_array","_textMissing","_target","_objectClasses","_range","_objects","_requirements","_count","_cost","_itemText","_option"];
|
||||||
|
|
||||||
if (DZE_ActionInProgress) exitWith {cutText [localize "STR_EPOCH_ACTIONS_2","PLAIN DOWN"];};
|
if (DZE_ActionInProgress) exitWith {cutText [localize "STR_EPOCH_ACTIONS_2","PLAIN DOWN"];};
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
private ["_status","_array","_object","_items","_classname","_text","_build","_inside","_location","_nearObjects","_dis","_sfx", "_variables"];
|
private ["_status","_array","_object","_items","_classname","_text","_build","_inside","_location","_nearObjects","_dis","_sfx","_variables","_ghost","_keepOnSlope","_direction","_passcode"];
|
||||||
|
|
||||||
_array = _this select 3;
|
_array = _this select 3;
|
||||||
|
|
||||||
_ghost = _array select 0;
|
_ghost = _array select 0;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
private ["_cursorTarget","_onLadder","_isWater","_alreadyRemoving","_characterID","_objectID","_objectUID","_ownerArray","_dir",
|
private ["_cursorTarget","_onLadder","_isWater","_alreadyRemoving","_characterID","_objectID","_objectUID","_ownerArray","_dir",
|
||||||
"_realObjectStillThere","_upgrade","_entry","_parent","_requiredParts","_requiredTools","_model","_toolsOK","_displayname",
|
"_realObjectStillThere","_upgrade","_entry","_parent","_requiredParts","_requiredTools","_model","_toolsOK","_displayname",
|
||||||
"_whpos","_i","_wh","_object"];
|
"_whpos","_i","_wh","_object","_msg","_vector","_dis","__FILE__","_puid","_variables"];
|
||||||
|
|
||||||
|
|
||||||
_cursorTarget = _this select 3;
|
_cursorTarget = _this select 3;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private ["_object","_proceed","_pos","_rndattemps","_limit","_dismantleToo","_pos","_ownerID","_objectID","_objectUID","_playerID","_claimedBy","_tools"];
|
private ["_object","_proceed","_rndattemps","_limit","_dismantleToo","_ownerID","_objectID","_objectUID","_playerID","_claimedBy","_tools","_exit","_end","_onLadder","_isWater","_isOk","_counter","_text","_dis","_sfx","_animState","_started","_finished","_isMedic","_holder"];
|
||||||
|
|
||||||
_object = _this;
|
_object = _this;
|
||||||
_proceed = false;
|
_proceed = false;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#define MAINTENANCE_NUTRITION_VALUES [20,40,15,0]
|
#define MAINTENANCE_NUTRITION_VALUES [20,40,15,0]
|
||||||
|
|
||||||
|
|
||||||
private ["_isMedic","_cursorTarget"];
|
private ["_isMedic","_cursorTarget","_item","_classname","_displayname","_requiredTools","_requiredParts","_onLadder","_isWater","_upgradeParts","_startMaintenance","_dis","_sfx","_started","_finished","_animState","_isRefuel"];
|
||||||
|
|
||||||
_cursorTarget = _this select 3;
|
_cursorTarget = _this select 3;
|
||||||
|
|
||||||
|
|||||||
@@ -9,39 +9,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
*/
|
*/
|
||||||
private
|
private ["_objclass","_cursorTarget","_item","_classname","_requiredTools","_requiredParts","_upgrade","_upgradeConfig",
|
||||||
[
|
"_upgradeDisplayname","_onLadder","_isWater","_upgradeParts","_startUpgrade","_missingPartsConfig","_textMissingParts","_dis",
|
||||||
"_objclass",
|
"_sfx","_ownerID","_objectID","_objectUID","_alreadyupgrading","_dir","_weapons","_magazines","_backpacks",
|
||||||
"_cursorTarget",
|
"_object","_objWpnTypes","_objWpnQty","_countr","_itemName","_msg","_vector"];
|
||||||
"_item",
|
|
||||||
"_classname",
|
|
||||||
"_requiredTools",
|
|
||||||
"_requiredParts",
|
|
||||||
"_upgrade",
|
|
||||||
"_upgradeConfig",
|
|
||||||
"_upgradeDisplayname",
|
|
||||||
"_onLadder",
|
|
||||||
"_isWater",
|
|
||||||
"_upgradeParts",
|
|
||||||
"_startUpgrade",
|
|
||||||
"_missingPartsConfig",
|
|
||||||
"_textMissingParts",
|
|
||||||
"_dis",
|
|
||||||
"_sfx",
|
|
||||||
"_ownerID",
|
|
||||||
"_objectID",
|
|
||||||
"_objectUID",
|
|
||||||
"_alreadyupgrading",
|
|
||||||
"_pos",
|
|
||||||
"_dir",
|
|
||||||
"_weapons",
|
|
||||||
"_magazines",
|
|
||||||
"_backpacks",
|
|
||||||
"_object",
|
|
||||||
"_objWpnTypes",
|
|
||||||
"_objWpnQty",
|
|
||||||
"_countr"
|
|
||||||
];
|
|
||||||
|
|
||||||
_cursorTarget = _this select 0;
|
_cursorTarget = _this select 0;
|
||||||
|
|
||||||
|
|||||||
@@ -9,39 +9,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
*/
|
*/
|
||||||
private
|
private ["_objclass","_cursorTarget","_item","_classname","_requiredTools","_requiredParts","_upgrade","_upgradeConfig",
|
||||||
[
|
"_upgradeDisplayname","_onLadder","_isWater","_upgradeParts","_startUpgrade","_missingPartsConfig","_textMissingParts","_dis",
|
||||||
"_objclass",
|
"_sfx","_ownerID","_objectID","_objectUID","_alreadyupgrading","_dir","_weapons","_magazines","_backpacks","_object",
|
||||||
"_cursorTarget",
|
"_objWpnTypes","_objWpnQty","_countr","_itemName","_msg","_vector"];
|
||||||
"_item",
|
|
||||||
"_classname",
|
|
||||||
"_requiredTools",
|
|
||||||
"_requiredParts",
|
|
||||||
"_upgrade",
|
|
||||||
"_upgradeConfig",
|
|
||||||
"_upgradeDisplayname",
|
|
||||||
"_onLadder",
|
|
||||||
"_isWater",
|
|
||||||
"_upgradeParts",
|
|
||||||
"_startUpgrade",
|
|
||||||
"_missingPartsConfig",
|
|
||||||
"_textMissingParts",
|
|
||||||
"_dis",
|
|
||||||
"_sfx",
|
|
||||||
"_ownerID",
|
|
||||||
"_objectID",
|
|
||||||
"_objectUID",
|
|
||||||
"_alreadyupgrading",
|
|
||||||
"_pos",
|
|
||||||
"_dir",
|
|
||||||
"_weapons",
|
|
||||||
"_magazines",
|
|
||||||
"_backpacks",
|
|
||||||
"_object",
|
|
||||||
"_objWpnTypes",
|
|
||||||
"_objWpnQty",
|
|
||||||
"_countr"
|
|
||||||
];
|
|
||||||
|
|
||||||
_objclass = _this;
|
_objclass = _this;
|
||||||
_cursorTarget = _this select 3;
|
_cursorTarget = _this select 3;
|
||||||
|
|||||||
@@ -11,6 +11,10 @@
|
|||||||
debugged by facoptere@gmail.com
|
debugged by facoptere@gmail.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
private ["_cursorTarget","_type","_class","_requiredTools","_requiredParts","_upgradeType","_producedParts","_randomCreate",
|
||||||
|
"_upgradeClass","_msg","_onLadder","_isWater","_ok","_missing","_upgradeParts","_dis","_characterID","_objectID","_objectUID",
|
||||||
|
"_ownerArray","_ownerPasscode","_dir","_vector","_object","_puid","_clanArray","_wh","_variables"];
|
||||||
|
|
||||||
//systemchat str _this;
|
//systemchat str _this;
|
||||||
if (!isnil "faco_object_upgradeBuilding") exitWith { _this call faco_object_upgradeBuilding };
|
if (!isnil "faco_object_upgradeBuilding") exitWith { _this call faco_object_upgradeBuilding };
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
private ["_unit","_unconcious","_inVeh","_alive"];
|
private ["_unit","_unconcious","_inVeh","_alive"];
|
||||||
|
|
||||||
call fnc_usec_medic_removeActions;
|
call fnc_usec_medic_removeActions;
|
||||||
_unit = _this select 3;
|
_unit = _this select 3;
|
||||||
_unconcious = _unit getVariable ["NORRN_unconscious", false];
|
_unconcious = _unit getVariable ["NORRN_unconscious", false];
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
private ["_array","_object","_type"];
|
private ["_array","_object","_type"];
|
||||||
|
|
||||||
_array = _this select 3;
|
_array = _this select 3;
|
||||||
_object = _array select 0;
|
_object = _array select 0;
|
||||||
_type = TypeOf(_object);
|
_type = TypeOf(_object);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Please request permission to use/alter from Alby.
|
Please request permission to use/alter from Alby.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace"];
|
private ["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace","_overwrite","_orignalClass","_index","_entry","_avail","_selection","_item","_amount","_itemName","_freeSlots","_slotType","_i","_j"];
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
["close"] call fn_updateCraftUI;
|
["close"] call fn_updateCraftUI;
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (dayZ_OnBack != "") exitWith {closeDialog 0; cutText [format [localize "str_p
|
|||||||
|
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
|
|
||||||
if (_item in ["ItemHatchet","ItemHatchet_DZE","ItemCrowbar","ItemMachete","ItemFishingPole","ItemSledge"]) then {
|
if (_item in ["ItemHatchet","ItemCrowbar","ItemMachete","ItemFishingPole","ItemHatchet_DZE","ItemSledge"]) then {
|
||||||
//free primary slot for new melee (remember item to add after)
|
//free primary slot for new melee (remember item to add after)
|
||||||
switch (_item) do {
|
switch (_item) do {
|
||||||
case "ItemHatchet": {player removeWeapon "ItemHatchet"; dayz_onBack = "MeleeHatchet";};
|
case "ItemHatchet": {player removeWeapon "ItemHatchet"; dayz_onBack = "MeleeHatchet";};
|
||||||
|
|||||||
@@ -11,15 +11,7 @@
|
|||||||
|
|
||||||
#include "\z\addons\dayz_code\util\Player.hpp"
|
#include "\z\addons\dayz_code\util\Player.hpp"
|
||||||
|
|
||||||
private
|
private ["_attachment","_weapon","_config","_newWeapon","_weaponInUse","_muzzle"];
|
||||||
[
|
|
||||||
"_attachment",
|
|
||||||
"_weapon",
|
|
||||||
"_config",
|
|
||||||
"_newWeapon",
|
|
||||||
"_weaponInUse",
|
|
||||||
"_muzzle"
|
|
||||||
];
|
|
||||||
|
|
||||||
//check if player is on a ladder and if so, exit
|
//check if player is on a ladder and if so, exit
|
||||||
if (Player_IsOnLadder()) exitWith
|
if (Player_IsOnLadder()) exitWith
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
private["_theBomb","_vehicle","_curFuel","_newFuel","_timeLeft","_hasToolbox","_hasCarBomb","_dis","_sfx","_alreadyBombed","_hasCrowbar"];
|
private ["_theBomb","_vehicle","_curFuel","_newFuel","_timeLeft","_hasToolbox","_hasCarBomb","_dis","_sfx","_alreadyBombed","_hasCrowbar"];
|
||||||
|
|
||||||
_vehicle = _this select 3;
|
_vehicle = _this select 3;
|
||||||
_hasToolbox = "ItemToolbox" in items player;
|
_hasToolbox = "ItemToolbox" in items player;
|
||||||
_hasCrowbar = "ItemCrowbar" in items player;
|
_hasCrowbar = "ItemCrowbar" in items player;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
private ["_target", "_pos", "_gps", "_vars", "_hasToolbox", "_hasCrowbar", "_limit", "_proceed", "_counter", "_dis", "_sfx", "_roll", "_animState", "_started", "_finished", "_animState", "_isMedic","_isGate"];
|
private ["_brokein","_isOk","_hasSledgeHammer","_gps","_vars","_hasToolbox","_hasCrowbar","_limit","_proceed","_counter",
|
||||||
|
"_dis","_sfx","_roll","_animState","_started","_finished","_isMedic","_isGate"];
|
||||||
_target = _this select 3;
|
_target = _this select 3;
|
||||||
_pos = getPos _target;
|
_pos = getPos _target;
|
||||||
_isGate = (typeOf cursorTarget) in ["WoodenGate_2","WoodenGate_3","WoodenGate_4"];
|
_isGate = (typeOf cursorTarget) in ["WoodenGate_2","WoodenGate_3","WoodenGate_4"];
|
||||||
@@ -148,6 +148,6 @@ if (_proceed and _brokein) then {
|
|||||||
titleText ["Break in attempt successful.", "PLAIN DOWN", 0.3];
|
titleText ["Break in attempt successful.", "PLAIN DOWN", 0.3];
|
||||||
|
|
||||||
//Open Gate.
|
//Open Gate.
|
||||||
_target animate ["DoorR", 0];
|
_target animate ["DoorR", 1];
|
||||||
_target animate ["DoorL", 0];
|
_target animate ["DoorL", 1];
|
||||||
};
|
};
|
||||||
@@ -1,6 +1,11 @@
|
|||||||
// (c) facoptere@gmail.com, licensed to DayZMod for the community
|
// (c) facoptere@gmail.com, licensed to DayZMod for the community
|
||||||
private ["_classType","_item","_action","_missingTools","_missingItem","_emergingLevel","_isClass","_classname","_requiredTools","_requiredParts ","_ghost","_placement","_text","_onLadder","_isWater","_object","_string","_actionBuildHidden","_getBeams","_o","_offset","_rot","_r","_p","_bn","_bb","_h","_bx","_by","_minElevation","_maxElevation","_insideCheck","_building","_unit","_bbb","_ubb","_check","_min","_max","_myX","_myY","_checkBuildingCollision","_objColliding","_inside","_checkOnRoad","_roadCollide","_checkBeam2Magnet","_a","_beams","_best","_b","_d","_checkNotBuried","_elevation","_position","_delta","_overElevation","_maxplanting","_safeDistance","_dir","_angleRef","_tmp","_actionCancel","_sfx","_actionBuild"];
|
private ["_classType","_item","_action","_missingTools","_missingItem","_emergingLevel","_isClass","_classname","_requiredTools",
|
||||||
|
"_requiredParts","_ghost","_placement","_text","_onLadder","_isWater","_object","_string","_actionBuildHidden","_getBeams",
|
||||||
|
"_o","_offset","_rot","_r","_p","_bn","_bb","_h","_bx","_by","_minElevation","_maxElevation","_insideCheck","_building",
|
||||||
|
"_unit","_bbb","_ubb","_check","_min","_max","_myX","_myY","_checkBuildingCollision","_objColliding","_inside","_checkOnRoad",
|
||||||
|
"_roadCollide","_checkBeam2Magnet","_a","_beams","_best","_b","_d","_checkNotBuried","_elevation","_position","_delta","_overElevation",
|
||||||
|
"_maxplanting","_safeDistance","_dir","_angleRef","_tmp","_actionCancel","_sfx","_actionBuild","_byPassChecks","_keepOnSlope","_msg",
|
||||||
|
"_ok","_missing","_upgradeParts","_ownerID","_posReference"];
|
||||||
/*
|
/*
|
||||||
Needs a full rewrite to keep up with the demand of everything we plan to add.
|
Needs a full rewrite to keep up with the demand of everything we plan to add.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Please request permission to use/alter from Alby.
|
Please request permission to use/alter from Alby.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private ["_items","_counts","_config","_isRecipe","_item","_index","_amount","_count","_entry","_input","_array"];
|
private ["_items","_counts","_config","_isRecipe","_item","_index","_amount","_count","_entry","_input","_array","_overwrite","_i","_inputIndex","_inputItems"];
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
|
|
||||||
_array = _this select 0;
|
_array = _this select 0;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Please request permission to use/alter from Alby.
|
Please request permission to use/alter from Alby.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private ["_items","_counts","_config","_isRecipe","_item","_index","_amount","_count","_entry","_input","_array"];
|
private ["_items","_counts","_config","_isRecipe","_item","_index","_amount","_count","_entry","_input","_array","_overwrite","_i","_inputIndex","_inputItems"];
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
|
|
||||||
_array = _this select 0;
|
_array = _this select 0;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
private["_item","_result","_dis","_sfx","_num", "_breaking"];
|
private ["_item","_result","_dis","_sfx","_num","_breaking","_countOut","_woodCutting","_trees","_findNearestTree","_objInfo","_lenInfo","_objName","_i","_k","_counter","_isOk","_proceed","_animState","_started","_finished","_isMedic","_itemOut"];
|
||||||
|
|
||||||
//if (!isnil "faco_player_chopWood") exitWith { _this call faco_player_chopWood };
|
//if (!isnil "faco_player_chopWood") exitWith { _this call faco_player_chopWood };
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
private ["_create","_config","_create_magsize","_type","_name","_magCount","_slotstart","_slotend","_dialog","_qty_total_ammo","_control","_mag","_qtynew_create_mags_full","_qtynew_create_ammo_rest","_magFull","_magFullSingular","_magAmmunition"];
|
private ["_create","_config","_create_magsize","_type","_magCount","_slotstart","_slotend","_dialog","_qty_total_ammo","_control","_mag","_qtynew_create_mags_full","_qtynew_create_ammo_rest","_magFull","_magFullSingular","_magAmmunition","_i"];
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
|
|||||||
@@ -11,15 +11,7 @@
|
|||||||
#define PILE_SEARCH_RADIUS 2
|
#define PILE_SEARCH_RADIUS 2
|
||||||
#define PILE_PLAYER_OFFSET [0,1,0]
|
#define PILE_PLAYER_OFFSET [0,1,0]
|
||||||
|
|
||||||
private
|
private ["_cfg","_nutrition","_bloodRegen","_infectionChance","_sound","_output","_hungerCount","_thirstCount","_soundDistance"];
|
||||||
[
|
|
||||||
"_cfg",
|
|
||||||
"_nutrition",
|
|
||||||
"_bloodRegen",
|
|
||||||
"_infectionChance",
|
|
||||||
"_sound",
|
|
||||||
"_output"
|
|
||||||
];
|
|
||||||
|
|
||||||
_cfg = (ConfigFile >> "CfgMagazines" >> _this);
|
_cfg = (ConfigFile >> "CfgMagazines" >> _this);
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
failChance = 1;
|
failChance = 1;
|
||||||
*/
|
*/
|
||||||
//diag_log("crafting system");
|
//diag_log("crafting system");
|
||||||
private["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace"];
|
private ["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace","_classname","_isClass","_onLadder","_hasTools","_avail","_selection","_item","_amount","_itemName","_freeSlots","_slotType","_i","_j","_dis","_sfx"];
|
||||||
|
|
||||||
//diag_log(str(isnil "r_player_crafting"));
|
//diag_log(str(isnil "r_player_crafting"));
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Please request permission to use/alter from Alby.
|
Please request permission to use/alter from Alby.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace"];
|
private ["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace","_overwrite","_nearByPile","_index","_entry","_nearByTable","_weaps","_mags","_objMagTypes","_objMagQty","_i","_obj","_return","_inArray","_avail","_selection","_item","_amount","_itemName","_freeSlots","_slotType","_j"];
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
["close"] call fn_updateCraftUI;
|
["close"] call fn_updateCraftUI;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private["_qty_arrows","_qty_quivers","_qty_quiverarrows"];
|
private ["_qty_arrows","_qty_quivers","_qty_quiverarrows"];
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
|
|
||||||
_qty_arrows = {_x == "WoodenArrow"} count magazines player;
|
_qty_arrows = {_x == "WoodenArrow"} count magazines player;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private ["_cantype","_emptycan","_intensity","_objectID", "_objectUID"];
|
private ["_cantype","_emptycan","_intensity","_objectID","_objectUID","_obj","_fuelArray","_matchArray","_alreadyDestorying","_randomJerryCan","_fireIntensity","_randomBoxMatches","_qtyRemaining","_dis","_sfx"];
|
||||||
|
|
||||||
//Tent Object
|
//Tent Object
|
||||||
_obj = _this select 3;
|
_obj = _this select 3;
|
||||||
|
|||||||
@@ -8,15 +8,7 @@
|
|||||||
Foxy
|
Foxy
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private
|
private ["_cfg","_nutrition","_bloodRegen","_infectionChance","_sound","_output"];
|
||||||
[
|
|
||||||
"_cfg",
|
|
||||||
"_nutrition",
|
|
||||||
"_bloodRegen",
|
|
||||||
"_infectionChance",
|
|
||||||
"_sound",
|
|
||||||
"_output"
|
|
||||||
];
|
|
||||||
|
|
||||||
_cfg = (ConfigFile >> "CfgMagazines" >> _this);
|
_cfg = (ConfigFile >> "CfgMagazines" >> _this);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private["_qty_arrows","_qty_quivers","_control","_qty_quiverarrows","_qty_quiverfreeslots","_qty_arrows2add"];
|
private ["_qty_arrows","_qty_quivers","_control","_qty_quiverarrows","_qty_quiverfreeslots","_qty_arrows2add"];
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//fixHatchet old file
|
//fixHatchet old file
|
||||||
private ["_tool","_tape","_fixedItem"];
|
private ["_tool","_tape","_fixedItem","_config","_dName","_handle"];
|
||||||
|
|
||||||
_tool = _this;
|
_tool = _this;
|
||||||
_config = configFile >> "CfgWeapons" >> _tool;
|
_config = configFile >> "CfgWeapons" >> _tool;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
private ["_plant", "_originalCount"];
|
private ["_plant","_originalCount","_xx_leaf","_mags","_weps","_item","_magcounts","_forEachIndex","_wepcounts","_dis","_sfx"];
|
||||||
|
|
||||||
_plant = _this;
|
_plant = _this;
|
||||||
|
|
||||||
if (_plant getVariable["Gathering",false]) exitWith {};
|
if (_plant getVariable["Gathering",false]) exitWith {};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
private ["_item","_result","_dis","_sfx","_num","_breaking","_counter","_rocks","_findNearestRock","_objInfo","_lenInfo","_objName","_i","_k","_countOut","_isOk","_proceed","_animState","_started","_finished","_isMedic","_itemOut","_wpPos","_nearByPile"];
|
private ["_item","_result","_dis","_sfx","_num","_breaking","_counter","_rocks","_findNearestRock","_objInfo","_lenInfo",
|
||||||
|
"_objName","_i","_k","_countOut","_isOk","_proceed","_animState","_started","_finished","_isMedic","_itemOut","_wpPos","_nearByPile"];
|
||||||
|
|
||||||
_item = _this;
|
_item = _this;
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
@@ -38,7 +38,7 @@ if (!isNull _findNearestRock) then {
|
|||||||
_countOut = 2 + floor(random 3);
|
_countOut = 2 + floor(random 3);
|
||||||
|
|
||||||
//Remove melee magazines (BIS_fnc_invAdd fix) (add new melee ammo to array if needed)
|
//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"];
|
{player removeMagazines _x} forEach ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Fishing_Swing","Sledge_Swing"];
|
||||||
|
|
||||||
// Start stone mining loop
|
// Start stone mining loop
|
||||||
_counter = 0;
|
_counter = 0;
|
||||||
@@ -121,7 +121,7 @@ if (!isNull _findNearestRock) then {
|
|||||||
};
|
};
|
||||||
_isOk = false;
|
_isOk = false;
|
||||||
_proceed = true;
|
_proceed = true;
|
||||||
uisleep 1;
|
uiSleep 1;
|
||||||
};
|
};
|
||||||
cutText [format[localize "str_mining_progress", _counter,(_countOut - _counter)], "PLAIN DOWN"];
|
cutText [format[localize "str_mining_progress", _counter,(_countOut - _counter)], "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
@@ -143,6 +143,8 @@ if (!isNull _findNearestRock) then {
|
|||||||
case "MeleeCrowbar": {player addMagazine 'Crowbar_Swing';};
|
case "MeleeCrowbar": {player addMagazine 'Crowbar_Swing';};
|
||||||
case "MeleeMachete": {player addMagazine 'Machete_Swing';};
|
case "MeleeMachete": {player addMagazine 'Machete_Swing';};
|
||||||
case "MeleeFishingPole": {player addMagazine 'Fishing_Swing';};
|
case "MeleeFishingPole": {player addMagazine 'Fishing_Swing';};
|
||||||
|
case "MeleeHatchet_DZE": {player addMagazine 'Hatchet_Swing';};
|
||||||
|
case "MeleeSledge": {player addMagazine 'Sledge_Swing';};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
cutText [localize "str_mining_no_rocks", "PLAIN DOWN"];
|
cutText [localize "str_mining_no_rocks", "PLAIN DOWN"];
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private ["_target","_type","_fn_Lock","_fn_UnLock","_fn_Open","_fn_Closed"];
|
private ["_type","_fn_Lock","_fn_UnLock","_fn_Open","_fn_Closed","_fn_Set","_fn_Lockold","_fn_UnLockold","_fn_BuildLock","_fn_BuildUnLock"];
|
||||||
|
|
||||||
_target = ((_this select 3) select 0);
|
_target = ((_this select 3) select 0);
|
||||||
_type = ((_this select 3) select 1);
|
_type = ((_this select 3) select 1);
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
private ["_item","_config","_consume","_create","_item_ammo","_consume_magsize","_create_magsize","_consume_type","_slotstart","_slotend","_dialog","_qty_total_ammo","_qty_consume_ammo","_qty_create_ammo","_qty_consume_mags","_qty_create_mags","_qty_free_slots","_control","_mag","_qtynew_create_ammo","_qtynew_consume_ammo","_qtynew_create_mags","_qtynew_consume_mags","_qtynew_consume_mags_full","_qtynew_create_mags_full","_qtynew_consume_ammo_rest","_qtynew_create_ammo_rest"];
|
private ["_item","_config","_consume","_create","_item_ammo","_consume_magsize","_create_magsize","_consume_type","_slotstart",
|
||||||
|
"_slotend","_dialog","_qty_total_ammo","_qty_consume_ammo","_qty_create_ammo","_qty_consume_mags","_qty_create_mags",
|
||||||
|
"_qty_free_slots","_control","_mag","_qtynew_create_ammo","_qtynew_consume_ammo","_qtynew_create_mags","_qtynew_consume_mags",
|
||||||
|
"_qtynew_consume_mags_full","_qtynew_create_mags_full","_qtynew_consume_ammo_rest","_qtynew_create_ammo_rest","_mags","_i"];
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
private ["_item","_config","_consume","_create","_item_ammo","_consume_magsize","_create_magsize","_consume_type","_slotstart","_slotend","_dialog","_qty_total_ammo","_qty_consume_ammo","_qty_create_ammo","_qty_consume_mags","_qty_create_mags","_qty_free_slots","_control","_mag","_qtynew_create_ammo","_qtynew_consume_ammo","_qtynew_create_mags","_qtynew_consume_mags","_qtynew_consume_mags_full","_qtynew_create_mags_full","_qtynew_consume_ammo_rest","_qtynew_create_ammo_rest"];
|
private ["_item","_config","_consume","_create","_item_ammo","_consume_magsize","_create_magsize","_consume_type","_slotstart",
|
||||||
|
"_slotend","_dialog","_qty_total_ammo","_qty_consume_ammo","_qty_create_ammo","_qty_consume_mags","_qty_create_mags","_qty_free_slots",
|
||||||
|
"_control","_mag","_qtynew_create_ammo","_qtynew_consume_ammo","_qtynew_create_mags","_qtynew_consume_mags","_qtynew_consume_mags_full",
|
||||||
|
"_qtynew_create_mags_full","_qtynew_consume_ammo_rest","_qtynew_create_ammo_rest","_mags","_i"];
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
|
|
||||||
|
|||||||
@@ -12,15 +12,7 @@
|
|||||||
|
|
||||||
#include "\z\addons\dayz_code\util\Player.hpp"
|
#include "\z\addons\dayz_code\util\Player.hpp"
|
||||||
|
|
||||||
private
|
private ["_attachment","_weapon","_newWeapon","_weaponInUse","_newWeaponConfig","_muzzle"];
|
||||||
[
|
|
||||||
"_attachment",
|
|
||||||
"_weapon",
|
|
||||||
"_newWeapon",
|
|
||||||
"_weaponInUse",
|
|
||||||
"_newWeaponConfig",
|
|
||||||
"_muzzle"
|
|
||||||
];
|
|
||||||
|
|
||||||
//check if player is on a ladder and if so, exit
|
//check if player is on a ladder and if so, exit
|
||||||
if (Player_IsOnLadder()) exitWith
|
if (Player_IsOnLadder()) exitWith
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private ["_item","_use","_repair","_waterUsed"];
|
private ["_item","_use","_repair","_waterUsed","_displayName","_msg"];
|
||||||
|
|
||||||
//['ItemKnifeBlunt','ItemKnife']
|
//['ItemKnifeBlunt','ItemKnife']
|
||||||
_item = _this select 0; //Item to be sharpened
|
_item = _this select 0; //Item to be sharpened
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private["_qty_quivers","_control","_qty_quiverarrows","_empty","_emptymagslotcount"];
|
private ["_qty_quivers","_control","_qty_quiverarrows","_empty","_emptymagslotcount"];
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private ["_skin","_rnd","_rounded","_itemtocreate","_i"];
|
private ["_skin","_rnd","_rounded","_itemtocreate","_i","_config","_infoText","_result","_nearByPile","_pile","__FILE__"];
|
||||||
|
|
||||||
_skin = _this;
|
_skin = _this;
|
||||||
_config = configFile >> "CfgMagazines" >> _skin;
|
_config = configFile >> "CfgMagazines" >> _skin;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private["_item","_onLadder","_hasmeditem","_config","_text","_id"];
|
private ["_item","_onLadder","_hasmeditem","_config","_text","_removeWeapon","_addWeapon","_hasitem","_display"];
|
||||||
|
|
||||||
//Old System
|
//Old System
|
||||||
|
|
||||||
|
|||||||
@@ -1,37 +1,35 @@
|
|||||||
/*
|
if (_this in DZE_RestrictSkins) exitWith { cutText [format[localize "str_epoch_player_315",_this], "PLAIN DOWN"] };
|
||||||
_item spawn player_wearClothes;
|
|
||||||
Added Female skin changes - DayZ Epoch - vbawol
|
|
||||||
*/
|
|
||||||
private ["_item","_onLadder","_hasclothesitem","_config","_text","_myModel","_itemNew","_currentSex","_newSex","_model","_playerNear"];
|
|
||||||
|
|
||||||
if (_this in DZE_RestrictSkins) exitWith { cutText [format[(localize "str_epoch_player_315"),_this], "PLAIN DOWN"] };
|
|
||||||
|
|
||||||
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_83","PLAIN DOWN"]};
|
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_83","PLAIN DOWN"]};
|
||||||
DZE_ActionInProgress = true;
|
DZE_ActionInProgress = true;
|
||||||
|
/*
|
||||||
|
_item call player_wearClothes;
|
||||||
|
Added Female skin changes - DayZ Epoch - vbawol
|
||||||
|
*/
|
||||||
|
private ["_item","_onLadder","_hasclothesitem","_config","_text","_isFemale","_myModel","_humanity","_isBandit","_isHero",
|
||||||
|
"_itemNew","_model","_skinToArray","_finalArray","_skinToModel"];
|
||||||
|
|
||||||
_item = _this;
|
_item = _this;
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
r_action_count = 0; //reset for strange glitch
|
r_action_count = 0; //reset for strange glitch
|
||||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||||
if (_onLadder) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_21","PLAIN DOWN"]};
|
if (_onLadder) exitWith {cutText [localize "str_player_21", "PLAIN DOWN"]; DZE_ActionInProgress = false;};
|
||||||
|
|
||||||
_hasclothesitem = _this in magazines player;
|
_hasclothesitem = _this in magazines player;
|
||||||
_config = configFile >> "CfgMagazines";
|
_config = configFile >> "CfgMagazines";
|
||||||
_text = getText (_config >> _item >> "displayName");
|
_text = getText (_config >> _item >> "displayName");
|
||||||
|
|
||||||
if (!_hasclothesitem) exitWith { DZE_ActionInProgress = false; cutText [format[(localize "str_player_31"),_text,"wear"] , "PLAIN DOWN"]};
|
if (!_hasclothesitem) exitWith {cutText [format [localize "str_player_31",_text,localize "str_player_31_wear"] , "PLAIN DOWN"]; DZE_ActionInProgress = false;};
|
||||||
|
|
||||||
if (vehicle player != player) exitWith {DZE_ActionInProgress = false; cutText [localize "str_epoch_player_85","PLAIN DOWN"]};
|
|
||||||
|
|
||||||
|
if (vehicle player != player) exitWith {cutText [localize "str_player_fail_wear1", "PLAIN DOWN"]; DZE_ActionInProgress = false;};
|
||||||
//if (!isNull (unitBackpack player)) exitWith {DZE_ActionInProgress = false; cutText [localize "STR_EPOCH_ACTIONS_9","PLAIN DOWN"]};
|
//if (!isNull (unitBackpack player)) exitWith {DZE_ActionInProgress = false; cutText [localize "STR_EPOCH_ACTIONS_9","PLAIN DOWN"]};
|
||||||
|
|
||||||
if ("CSGAS" in (magazines player)) exitWith {DZE_ActionInProgress = false; cutText [localize "STR_EPOCH_ACTIONS_10","PLAIN DOWN"]};
|
if ("CSGAS" in (magazines player)) exitWith {DZE_ActionInProgress = false; cutText [localize "STR_EPOCH_ACTIONS_10","PLAIN DOWN"]};
|
||||||
|
|
||||||
_myModel = (typeOf player);
|
_myModel = (typeOf player);
|
||||||
|
_humanity = player getVariable ["humanity",0];
|
||||||
|
_isBandit = _humanity < -2000;
|
||||||
|
_isHero = _humanity > 5000;
|
||||||
_itemNew = "Skin_" + _myModel;
|
_itemNew = "Skin_" + _myModel;
|
||||||
|
|
||||||
//diag_log ("Debug Clothes: model In: " + str(_itemNew) + " Out: " + str(_item));
|
|
||||||
|
|
||||||
if ( (isClass(_config >> _itemNew)) ) then {
|
if ( (isClass(_config >> _itemNew)) ) then {
|
||||||
if ( (isClass(_config >> _item)) ) then {
|
if ( (isClass(_config >> _item)) ) then {
|
||||||
// Current sex of player skin
|
// Current sex of player skin
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
//********************************************************************************************************************/
|
//********************************************************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
private ["_h_human_disp","_top_value","_bot_value","_card_details","_h","_blank","_bandit_pic","_bandit_pic","_b_human_disp","_b_spades_top_suit","_b_spades_bot_suit","_b_clubs_top_suit","_b_clubs_bot_suit","_survivor_pic","_survivor_pic","_s_human_disp","_s_top_joker_b","_s_bot_joker_b","_s_top_joker_r","_s_bot_joker_r","_hero_pic","_hero_pic","_h_hearts_top_suit","_h_hearts_bot_suit","_h_diamonds_top_suit","_h_diamonds_bot_suit"];
|
private ["_h_human_disp","_top_value","_bot_value","_card_details","_h","_blank","_bandit_pic","_b_human_disp","_b_spades_top_suit","_b_spades_bot_suit","_b_clubs_top_suit","_b_clubs_bot_suit","_survivor_pic","_s_human_disp","_s_top_joker_b","_s_bot_joker_b","_s_top_joker_r","_s_bot_joker_r","_hero_pic","_h_hearts_top_suit","_h_hearts_bot_suit","_h_diamonds_top_suit","_h_diamonds_bot_suit","_pl_pic","_humanity_readout","_top_joker","_bot_joker","_top_suit","_bot_suit"];_h = (_this select 0) / 37037.037037;
|
||||||
_h = (_this select 0) / 37037.037037;
|
|
||||||
|
|
||||||
// we need to return these
|
// we need to return these
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
private ["_ys","_ms","_ds","_b","_2","_6","_7","_8","_9","_10","_str_left_text","_1","_3","_4","_5","_blood_in_pack","_blood_in_inv","_mag_arr","_backpack","_11","_mags_for_weap","_mssv_cnt","_weapon","_config"];
|
private ["_ys","_ms","_ds","_b","_2","_6","_7","_8","_9","_10","_str_left_text","_1","_3","_4","_5","_blood_in_pack","_blood_in_inv","_mag_arr","_backpack","_11","_mags_for_weap","_mssv_cnt","_weapon","_config","_survivors","_moon","_spawnselection","_disabledTemperature"];
|
||||||
|
|
||||||
_survivors = playersNumber west;
|
_survivors = playersNumber west;
|
||||||
|
|
||||||
_str_left_text = "
|
_str_left_text = "
|
||||||
@@ -251,9 +250,9 @@ _disabledTemperature = switch (dayz_temperature_override) do {
|
|||||||
|
|
||||||
// left page
|
// left page
|
||||||
((uiNamespace getVariable "horde_myDisplay") displayCtrl 1800) ctrlSetStructuredText parseText format ["
|
((uiNamespace getVariable "horde_myDisplay") displayCtrl 1800) ctrlSetStructuredText parseText format ["
|
||||||
|
<t size='2' font='Zeppelin33' color = '#000000' align='center'>Survival Type: %14</t><br/>
|
||||||
<br/>
|
<br/>
|
||||||
<t size='2' font='Zeppelin33' color = '#000000' align='left'>Health: </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%1</t><br/>
|
<t size='2' font='Zeppelin33' color = '#000000' align='left'>Health: </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%1</t><br/>
|
||||||
<br/>
|
|
||||||
<t size='2' font='Zeppelin33' color = '#000000' align='left'>Hunger: </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%2%</t><br/>
|
<t size='2' font='Zeppelin33' color = '#000000' align='left'>Hunger: </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%2%</t><br/>
|
||||||
<t size='2' font='Zeppelin33' color = '#000000' align='left'>Thirst: </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%3%</t><br/>
|
<t size='2' font='Zeppelin33' color = '#000000' align='left'>Thirst: </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%3%</t><br/>
|
||||||
<br/>
|
<br/>
|
||||||
@@ -287,7 +286,8 @@ _disabledTemperature = switch (dayz_temperature_override) do {
|
|||||||
(round diag_fps),
|
(round diag_fps),
|
||||||
(round diag_fpsmin),
|
(round diag_fpsmin),
|
||||||
(_moon),
|
(_moon),
|
||||||
(_disabledTemperature)
|
(_disabledTemperature),
|
||||||
|
(dayz_presets)
|
||||||
];
|
];
|
||||||
|
|
||||||
// right page - blank until humanity is checked
|
// right page - blank until humanity is checked
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ disableSerialization;
|
|||||||
player removeAction s_player_butcher;
|
player removeAction s_player_butcher;
|
||||||
s_player_butcher = 1;
|
s_player_butcher = 1;
|
||||||
|
|
||||||
if(!(alive _item)) then {
|
if !(alive _item) then {
|
||||||
|
|
||||||
_rnd = (round(random 4)) + 1;
|
_rnd = (round(random 4)) + 1;
|
||||||
_move = "ZombieFeed" + str(_rnd);
|
_move = "ZombieFeed" + str(_rnd);
|
||||||
@@ -68,7 +68,7 @@ if(!(alive _item)) then {
|
|||||||
|
|
||||||
[player,"eat",0,false] call dayz_zombieSpeak;
|
[player,"eat",0,false] call dayz_zombieSpeak;
|
||||||
|
|
||||||
// todo: dump loot on ground && then remove
|
// todo: dump loot on ground and then remove
|
||||||
|
|
||||||
//Ensure Control is visible
|
//Ensure Control is visible
|
||||||
_display = uiNamespace getVariable 'DAYZ_GUI_display';
|
_display = uiNamespace getVariable 'DAYZ_GUI_display';
|
||||||
|
|||||||
@@ -1,19 +1,16 @@
|
|||||||
|
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_88","PLAIN DOWN"];};
|
||||||
|
DZE_ActionInProgress = true;
|
||||||
/*
|
/*
|
||||||
delete object from db with extra waiting by [VB]AWOL
|
delete object from db with extra waiting by [VB]AWOL
|
||||||
parameters: _obj
|
parameters: _obj
|
||||||
*/
|
*/
|
||||||
private ["_activatingPlayer","_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle","_isModular"];
|
private ["_activatingPlayer","_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle","_isModular"];
|
||||||
|
|
||||||
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_88","PLAIN DOWN"];};
|
|
||||||
DZE_ActionInProgress = true;
|
|
||||||
|
|
||||||
player removeAction s_player_deleteBuild;
|
player removeAction s_player_deleteBuild;
|
||||||
s_player_deleteBuild = 1;
|
s_player_deleteBuild = 1;
|
||||||
|
|
||||||
_obj = _this select 3;
|
_obj = _this select 3;
|
||||||
|
|
||||||
_activatingPlayer = player;
|
_activatingPlayer = player;
|
||||||
|
|
||||||
_objOwnerID = _obj getVariable["CharacterID","0"];
|
_objOwnerID = _obj getVariable["CharacterID","0"];
|
||||||
_isOwnerOfObj = (_objOwnerID == dayz_characterID);
|
_isOwnerOfObj = (_objOwnerID == dayz_characterID);
|
||||||
|
|
||||||
@@ -248,3 +245,5 @@ if (_proceed) then {
|
|||||||
};
|
};
|
||||||
DZE_ActionInProgress = false;
|
DZE_ActionInProgress = false;
|
||||||
s_player_deleteBuild = -1;
|
s_player_deleteBuild = -1;
|
||||||
|
|
||||||
|
_obj
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
private [];
|
|
||||||
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
|
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
|
||||||
s_player_repair_crtl = -1;
|
s_player_repair_crtl = -1;
|
||||||
dayz_myCursorTarget = objNull;
|
dayz_myCursorTarget = objNull;
|
||||||
104
SQF/dayz_code/actions/tent_pitch.sqf
Normal file
104
SQF/dayz_code/actions/tent_pitch.sqf
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
private ["_item","_config","_text","_booleans","_worldspace","_dir","_location","_dis","_sfx","_tent","_classname","_object","_boundingBox","_maxPoint","_actionBuild","_actionCancel"];
|
||||||
|
/*
|
||||||
|
private ["_item", "_config", "_text", "_booleans", "_worldspace", "_dir", "_location", "_dis", "_sfx", "_tent"];
|
||||||
|
|
||||||
|
call gear_ui_init;
|
||||||
|
|
||||||
|
_item = _this;
|
||||||
|
|
||||||
|
_config = configFile >> "CfgMagazines" >> _item;
|
||||||
|
_text = getText (_config >> "displayName");
|
||||||
|
_classname = getText (_config >> "tentmodel");
|
||||||
|
|
||||||
|
//diag_log ("Classname: "+str(_classname));
|
||||||
|
//diag_log ("Item: "+str(_item));
|
||||||
|
|
||||||
|
if (r_action_count != 1) exitWith { cutText [localize "str_player_actionslimit", "PLAIN DOWN"]; };
|
||||||
|
|
||||||
|
// item is missing or tools are missing
|
||||||
|
if ((!(_item IN magazines player))) exitWith {
|
||||||
|
r_action_count = 0;
|
||||||
|
cutText [format [localize "str_player_31",_text,localize "str_player_31_pitch"] , "PLAIN DOWN"];
|
||||||
|
};
|
||||||
|
|
||||||
|
_booleans = []; //testonLadder, testSea, testPond, testBuilding, testSlope, testDistance
|
||||||
|
|
||||||
|
//remove tentbag
|
||||||
|
player removeMagazine _item;
|
||||||
|
//_dir = _worldspace select 0;
|
||||||
|
//_location = _worldspace select 1;
|
||||||
|
|
||||||
|
//wait a bit
|
||||||
|
//player playActionNow "Medic";
|
||||||
|
sleep 1;
|
||||||
|
// tent location may not be in front of player
|
||||||
|
//player setDir _dir;
|
||||||
|
//player setPosATL (getPosATL player);
|
||||||
|
|
||||||
|
_dis=20;
|
||||||
|
_sfx = "tentunpack";
|
||||||
|
|
||||||
|
//sleep 5;
|
||||||
|
|
||||||
|
cutText [localize "str_player_build_rotate", "PLAIN DOWN"];
|
||||||
|
_location = getMarkerpos "respawn_west";
|
||||||
|
_object = createVehicle [_classname, _location, [], 0, "NONE"];
|
||||||
|
|
||||||
|
// Attach item
|
||||||
|
_boundingBox = boundingBox _object;
|
||||||
|
_maxPoint = ((_boundingBox select 1) select 0) max ((_boundingBox select 1) select 1);
|
||||||
|
_object setPosATL [getPosATL _object select 0, getPosATL _object select 1, 0.01];
|
||||||
|
_object attachTo [player, [0, _maxPoint + 1, 0.3]];
|
||||||
|
|
||||||
|
//Vars
|
||||||
|
player setVariable ["constructionObject", _object];
|
||||||
|
_object setVariable ["characterID",dayz_characterID,true];
|
||||||
|
|
||||||
|
//Actions
|
||||||
|
_actionBuild = player addAction [localize "str_player_build_complete", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _item, _classname, _text, true, _booleans, _dis, _sfx], 1, true];
|
||||||
|
_actionCancel = player addAction [localize "str_player_build_cancel", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _item, _classname, _text, false, _booleans, _dis, _sfx], 1, true];
|
||||||
|
|
||||||
|
sleep 0.01;
|
||||||
|
|
||||||
|
while {!isNull (player getVariable "constructionObject")} do {
|
||||||
|
if (vehicle player != player) then {
|
||||||
|
player action ["eject", vehicle player];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (speed player > 10 or speed player <= -8) then {
|
||||||
|
cutText [localize "str_player_build_movingfast", "PLAIN DOWN"];
|
||||||
|
player playMove "amovpercmstpssurwnondnon";
|
||||||
|
};
|
||||||
|
|
||||||
|
sleep 0.2;
|
||||||
|
|
||||||
|
if (!alive player) then {
|
||||||
|
[[],[],[],[_object, _item, _classname, _text, false, _booleans, _dis, _sfx]] call object_build;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
player removeAction _actionBuild;
|
||||||
|
player removeAction _actionCancel;
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
sleep 5;
|
||||||
|
|
||||||
|
_tent = createVehicle ["TentStorage", getMarkerpos "respawn_west", [], 0, "CAN_COLLIDE"];
|
||||||
|
_tent setDir _dir;
|
||||||
|
_tent setPos _location; // follow terrain slope (works above sea level)
|
||||||
|
player reveal _tent;
|
||||||
|
_location = getPosATL _tent;
|
||||||
|
|
||||||
|
_tent setVariable ["characterID",dayz_characterID,true];
|
||||||
|
PVDZ_obj_Publish = [dayz_characterID,_tent,[_dir,_location],_classname];
|
||||||
|
publicVariableServer "PVDZ_obj_Publish";
|
||||||
|
|
||||||
|
cutText [localize "str_success_tent_pitch", "PLAIN DOWN"];
|
||||||
|
sleep 1;
|
||||||
|
r_action_count = 0;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
r_action_count = 0;
|
||||||
|
cutText [localize "str_fail_tent_pitch", "PLAIN DOWN"];
|
||||||
|
};
|
||||||
|
*/
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
private ["_array","_location","_dir","_classname","_weapon"];
|
|
||||||
_array = _this select 3;
|
|
||||||
_location = player modeltoworld [0,1,0];
|
|
||||||
_dir = getDir player;
|
|
||||||
_classname = _array select 0;
|
|
||||||
removeBackpack player;
|
|
||||||
player playActionNow "Medic";
|
|
||||||
uiSleep 8;
|
|
||||||
player removeAction r_player_action_bag;
|
|
||||||
r_action_bag = false;
|
|
||||||
_weapon = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
|
||||||
_weapon setDir _dir;
|
|
||||||
//_weapon setpos _location;
|
|
||||||
player reveal _weapon;
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Created exclusively for ArmA2:OA - DayZMod && DayZ Epoch. Script by icomrade.
|
Created exclusively for ArmA2:OA - DayZMod and DayZ Epoch. Script by icomrade.
|
||||||
permission is required to use, alter &&/|| distribute from the author || project leader.
|
permission is required to use, alter and/or distribute from the author or project leader.
|
||||||
*/
|
*/
|
||||||
private ["_array","_count","_action","_driver","_vehicle","_vehicleType","_emptySeat","_emptyGun"];
|
private ["_array","_count","_action","_driver","_vehicle","_vehicleType","_emptySeat","_emptyGun"];
|
||||||
_array = _this select 3;
|
_array = _this select 3;
|
||||||
|
|||||||
@@ -1,70 +1,92 @@
|
|||||||
private ["_text","_qty","_canFill","_isWell","_objectsWell","_pondPos","_isPond","_objectsPond","_dis","_sfx","_playerPos","_onLadder","_hasbottleitem","_config"];
|
#include "\z\addons\dayz_code\util\player.hpp"
|
||||||
|
|
||||||
|
private ["_water","_filled","_canFill","_infected","_well"];
|
||||||
|
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
|
closeDialog 0;
|
||||||
|
|
||||||
_playerPos = getPosATL player;
|
if Player_IsOnLadder() exitWith { (localize "str_player_21") call dayz_rollingMessages; };
|
||||||
_canFill = count nearestObjects [_playerPos, ["Land_pumpa","Land_water_tank","Land_Misc_Well_L_EP1","Land_Misc_Well_C_EP1","Land_Barrel_water"], 4] > 0;
|
|
||||||
_isPond = false;
|
|
||||||
_isWell = false;
|
|
||||||
_pondPos = [];
|
|
||||||
_objectsWell = [];
|
|
||||||
|
|
||||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
_water = call
|
||||||
if (_onLadder) exitWith {cutText [localize "str_player_21","PLAIN DOWN"]};
|
{
|
||||||
|
private ["_canFill", "_infected"];
|
||||||
_hasbottleitem = _this in magazines player;
|
|
||||||
|
_canFill = count nearestObjects [player, ["Land_pumpa","Land_water_tank","Land_Barrel_water"], 4] > 0;
|
||||||
_config = configFile >> "CfgMagazines" >> _this;
|
|
||||||
_text = getText (_config >> "displayName");
|
if (_canFill) exitWith { "safe" };
|
||||||
|
|
||||||
if (!_hasbottleitem) exitWith {cutText [format[(localize "str_player_31"),_text,"fill"] , "PLAIN DOWN"]};
|
//Check for wells
|
||||||
|
|
||||||
if (!dayz_isSwimming) then {
|
|
||||||
player playActionNow "PutDown";
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!_canFill) then {
|
|
||||||
_objectsWell = nearestObjects [_playerPos, [], 4];
|
|
||||||
{
|
{
|
||||||
//Check for Well
|
if (["_well", str _x, false] call fnc_inString) exitWith
|
||||||
_isWell = ["_well",str(_x),false] call fnc_inString;
|
{
|
||||||
if (_isWell) then {_canFill = true};
|
_canFill = true;
|
||||||
} count _objectsWell;
|
};
|
||||||
};
|
}
|
||||||
|
foreach nearestObjects [player, [], 4];
|
||||||
if (!_canFill) then {
|
|
||||||
_objectsPond = nearestObjects [_playerPos, [], 50];
|
if (_canFill) exitWith { "safe" };
|
||||||
|
|
||||||
|
_infected = false;
|
||||||
|
|
||||||
|
//Check for ponds and corpses
|
||||||
{
|
{
|
||||||
//Check for pond
|
if (!_canFill) then
|
||||||
_isPond = ["pond",str(_x),false] call fnc_inString;
|
{
|
||||||
if (_isPond) then {
|
if (["pond", str _x, false] call fnc_inString && {((getPosASL player) select 2) < ((GetPosASL _x) select 2)}) then
|
||||||
_pondPos = (_x worldToModel _playerPos) select 2;
|
{
|
||||||
if (_pondPos < 0) then {
|
|
||||||
_canFill = true;
|
_canFill = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} count _objectsPond;
|
|
||||||
};
|
if (!_infected) then
|
||||||
|
{
|
||||||
if (_canFill) then {
|
if (["dead", str _x, false] call fnc_inString || {["massgrave", str _x, false] call fnc_inString}) then
|
||||||
_qty = {_x == "ItemWaterbottleUnfilled"} count magazines player;
|
{
|
||||||
|
_infected = true;
|
||||||
if ("ItemWaterbottleUnfilled" in magazines player) then {
|
|
||||||
for "_x" from 1 to _qty do {
|
|
||||||
if(([player,"ItemWaterbottleUnfilled"] call BIS_fnc_invRemove) == 1) then {
|
|
||||||
player addMagazine "ItemWaterbottle";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_dis=5;
|
|
||||||
_sfx = "fillwater";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
|
||||||
|
|
||||||
cutText [format[(localize "str_player_01"),_qty], "PLAIN DOWN"];
|
if (_canFill && {_infected}) exitWith {};
|
||||||
} else {
|
}
|
||||||
cutText [localize "str_player_02","PLAIN DOWN"];
|
foreach nearestObjects [player, [], 50];
|
||||||
|
|
||||||
|
if (!_canFill) exitWith { nil };
|
||||||
|
|
||||||
|
if (_infected) exitWith { "infected" };
|
||||||
|
|
||||||
|
""
|
||||||
|
};
|
||||||
|
|
||||||
|
if (isNil "_water") exitWith
|
||||||
|
{
|
||||||
|
(localize "str_player_20") call dayz_rollingMessages;
|
||||||
|
};
|
||||||
|
|
||||||
|
_water = "containerwater" + _water;
|
||||||
|
_filled = 0;
|
||||||
|
|
||||||
|
{
|
||||||
|
if (isText (configFile >> "CfgMagazines" >> _x >> _water)) then
|
||||||
|
{
|
||||||
|
if (_filled < 1) then
|
||||||
|
{
|
||||||
|
if (!dayz_isSwimming) then
|
||||||
|
{
|
||||||
|
player playActionNow "PutDown";
|
||||||
|
};
|
||||||
|
|
||||||
|
[player, "fillwater", 0, false, 5] call dayz_zombieSpeak;
|
||||||
|
[player, 5, true, getPosATL player] call player_alertZombies;
|
||||||
|
};
|
||||||
|
|
||||||
|
_filled = _filled + 1;
|
||||||
|
|
||||||
|
player removeMagazine _x;
|
||||||
|
player addMagazine getText (configFile >> "CfgMagazines" >> _x >> _water);
|
||||||
};
|
};
|
||||||
} else {
|
}
|
||||||
cutText [localize "str_player_20","PLAIN DOWN"];
|
foreach magazines player;
|
||||||
};
|
|
||||||
|
if (_filled > 0)
|
||||||
|
then { (format [localize "str_player_01", _filled]) call dayz_rollingMessages; }
|
||||||
|
else { (localize "str_player_02") call dayz_rollingMessages; };
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
private ["_items","_b"];
|
|
||||||
_items = _this;
|
|
||||||
_b = _items call player_checkItems;
|
|
||||||
if (_b) then {
|
|
||||||
_b = _items call player_removeItems;
|
|
||||||
};
|
|
||||||
_b
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
scriptName "Functions\misc\fn_damageActions.sqf";
|
scriptName "Functions\misc\fn_damageActions.sqf";
|
||||||
|
if (DZE_ActionInProgress) exitWith {};
|
||||||
#include "\z\addons\dayz_code\util\array.hpp";
|
#include "\z\addons\dayz_code\util\array.hpp";
|
||||||
|
|
||||||
/***********************************************************
|
/***********************************************************
|
||||||
@@ -7,8 +7,8 @@ scriptName "Functions\misc\fn_damageActions.sqf";
|
|||||||
- Function
|
- Function
|
||||||
- [] call fnc_usec_damageActions;
|
- [] call fnc_usec_damageActions;
|
||||||
************************************************************/
|
************************************************************/
|
||||||
if (DZE_ActionInProgress) exitWith {};
|
|
||||||
private ["_action","_weaponName","_turret","_weapons","_assignedRole","_driver","_action1","_action2","_vehicle","_unit","_vehType","_vehClose","_hasVehicle","_unconscious","_lowBlood","_injured","_inPain","_legsBroke","_armsBroke","_charID","_friendlies","_playerMagazines","_hasBandage","_hasEpi","_hasMorphine","_hasPainkillers","_unconscious_crew","_patients","_crew","_menClose","_hasPatient","_inVehicle","_isClose","_transfuse"];
|
private ["_menClose","_hasPatient","_vehicle","_inVehicle","_isClose","_assignedRole","_driver","_action","_turret","_weapons","_weaponName","_crew","_unconscious_crew","_patients","_vehType","_unit","_antibiotics","_bloodBags","_unconscious","_lowBlood","_injured","_hasSepsis","_inPain","_legsBroke","_armsBroke","_infected","_hasBandage","_hasSepsisBandage","_hasEpi","_hasMorphine","_hasSplint","_hasPainkillers","_hasEmptyBag","_hasTester","_hasAntibiotics","_hasBloodBag","_vehClose","_hasVehicle","_action1","_action2","_action3","_y","_playerMagazines"];
|
||||||
|
|
||||||
_menClose = cursorTarget;
|
_menClose = cursorTarget;
|
||||||
_hasPatient = alive _menClose;
|
_hasPatient = alive _menClose;
|
||||||
@@ -135,7 +135,7 @@ if (isPlayer cursorTarget) then {
|
|||||||
|
|
||||||
if (_hasPatient) then {
|
if (_hasPatient) then {
|
||||||
//Allow player to drag
|
//Allow player to drag
|
||||||
if (_unconscious) then {
|
if(_unconscious) then {
|
||||||
r_action = true;
|
r_action = true;
|
||||||
_action1 = _unit addAction [localize "STR_UI_GEAR", "\z\addons\dayz_code\actions\openGear.sqf",_unit, 0, true, true];
|
_action1 = _unit addAction [localize "STR_UI_GEAR", "\z\addons\dayz_code\actions\openGear.sqf",_unit, 0, true, true];
|
||||||
_action2 = _unit addAction [localize "str_actions_medical_01", "\z\addons\dayz_code\medical\drag.sqf",_unit, 0, true, true];
|
_action2 = _unit addAction [localize "str_actions_medical_01", "\z\addons\dayz_code\medical\drag.sqf",_unit, 0, true, true];
|
||||||
@@ -161,43 +161,43 @@ if (isPlayer cursorTarget) then {
|
|||||||
r_player_actions set [count r_player_actions,_action];
|
r_player_actions set [count r_player_actions,_action];
|
||||||
};
|
};
|
||||||
//Allow player to bandage
|
//Allow player to bandage
|
||||||
if (_injured && _hasBandage) then {
|
if(_injured && _hasBandage) then {
|
||||||
r_action = true;
|
r_action = true;
|
||||||
_action = _unit addAction [localize "str_actions_medical_04", "\z\addons\dayz_code\medical\bandage.sqf",[_unit,"ItemBandage"], 0, true, true, "", "'ItemBandage' in magazines player"];
|
_action = _unit addAction [localize "str_actions_medical_04", "\z\addons\dayz_code\medical\bandage.sqf",[_unit,"ItemBandage"], 0, true, true, "", "'ItemBandage' in magazines player"];
|
||||||
r_player_actions set [count r_player_actions,_action];
|
r_player_actions set [count r_player_actions,_action];
|
||||||
};
|
};
|
||||||
//Sepsis
|
//Sepsis
|
||||||
if (_hasSepsis && _hasSepsisBandage) then {
|
if(_hasSepsis && _hasSepsisBandage) then {
|
||||||
r_action = true;
|
r_action = true;
|
||||||
_action = _unit addAction [localize "str_actions_medical_04", "\z\addons\dayz_code\medical\bandage.sqf",[_unit,"ItemSepsisBandage"], 0, true, true, "", "'ItemBandage' in magazines player"];
|
_action = _unit addAction [localize "str_actions_medical_04", "\z\addons\dayz_code\medical\bandage.sqf",[_unit,"ItemSepsisBandage"], 0, true, true, "", "'ItemBandage' in magazines player"];
|
||||||
r_player_actions set [count r_player_actions,_action];
|
r_player_actions set [count r_player_actions,_action];
|
||||||
};
|
};
|
||||||
//Allow player to give Epinephrine
|
//Allow player to give Epinephrine
|
||||||
if (_unconscious && _hasEpi) then {
|
if(_unconscious && _hasEpi) then {
|
||||||
r_action = true;
|
r_action = true;
|
||||||
_action = _unit addAction [localize "str_actions_medical_05", "\z\addons\dayz_code\medical\epinephrine.sqf",[_unit], 0, true, true];
|
_action = _unit addAction [localize "str_actions_medical_05", "\z\addons\dayz_code\medical\epinephrine.sqf",[_unit], 0, true, true];
|
||||||
r_player_actions set [count r_player_actions,_action];
|
r_player_actions set [count r_player_actions,_action];
|
||||||
};
|
};
|
||||||
//Allow player to give Morphine
|
//Allow player to give Morphine
|
||||||
if ((_legsBroke or _armsBroke) && _hasMorphine) then {
|
if((_legsBroke or _armsBroke) && _hasMorphine) then {
|
||||||
r_action = true;
|
r_action = true;
|
||||||
_action = _unit addAction [localize "str_actions_medical_06", "\z\addons\dayz_code\medical\brokeBones.sqf",[_unit,"ItemMorphine"], 0, true, true, "", "'ItemMorphine' in magazines player"];
|
_action = _unit addAction [localize "str_actions_medical_06", "\z\addons\dayz_code\medical\brokeBones.sqf",[_unit,"ItemMorphine"], 0, true, true, "", "'ItemMorphine' in magazines player"];
|
||||||
r_player_actions set [count r_player_actions,_action];
|
r_player_actions set [count r_player_actions,_action];
|
||||||
};
|
};
|
||||||
//Allow player to give equip_woodensplint
|
//Allow player to give equip_woodensplint
|
||||||
if ((_legsBroke or _armsBroke) && _hasSplint) then {
|
if((_legsBroke or _armsBroke) && _hasSplint) then {
|
||||||
r_action = true;
|
r_action = true;
|
||||||
_action = _unit addAction [localize "str_actions_medical_06_splint", "\z\addons\dayz_code\medical\brokeBones.sqf",[_unit,"equip_woodensplint"], 0, true, true, "", "'equip_woodensplint' in magazines player"];
|
_action = _unit addAction [localize "str_actions_medical_06_splint", "\z\addons\dayz_code\medical\brokeBones.sqf",[_unit,"equip_woodensplint"], 0, true, true, "", "'equip_woodensplint' in magazines player"];
|
||||||
r_player_actions set [count r_player_actions,_action];
|
r_player_actions set [count r_player_actions,_action];
|
||||||
};
|
};
|
||||||
//Allow player to give Painkillers
|
//Allow player to give Painkillers
|
||||||
if (_inPain && _hasPainkillers) then {
|
if(_inPain && _hasPainkillers) then {
|
||||||
r_action = true;
|
r_action = true;
|
||||||
_action = _unit addAction [localize "str_actions_medical_07", "\z\addons\dayz_code\medical\painkiller.sqf",[_unit], 0, true, true, "", "'ItemPainkiller' in magazines player"];
|
_action = _unit addAction [localize "str_actions_medical_07", "\z\addons\dayz_code\medical\painkiller.sqf",[_unit], 0, true, true, "", "'ItemPainkiller' in magazines player"];
|
||||||
r_player_actions set [count r_player_actions,_action];
|
r_player_actions set [count r_player_actions,_action];
|
||||||
};
|
};
|
||||||
//Allow player to transfuse blood
|
//Allow player to transfuse blood
|
||||||
if (_lowBlood && _hasBloodBag) then {
|
if(_lowBlood && _hasBloodBag) then {
|
||||||
_transfuse = if (DZE_UseBloodTypes) then {"\z\addons\dayz_code\medical\transfusion.sqf"} else {"\z\addons\dayz_code\medical\transfusion_NoBloodTypes.sqf"};
|
_transfuse = if (DZE_UseBloodTypes) then {"\z\addons\dayz_code\medical\transfusion.sqf"} else {"\z\addons\dayz_code\medical\transfusion_NoBloodTypes.sqf"};
|
||||||
r_action = true;
|
r_action = true;
|
||||||
_action = _unit addAction [localize "str_actions_medical_08",_transfuse,[_unit], 0, true, true];
|
_action = _unit addAction [localize "str_actions_medical_08",_transfuse,[_unit], 0, true, true];
|
||||||
|
|||||||
@@ -3,28 +3,36 @@ private ["_item","_pos","_nearByPile","_holder"];
|
|||||||
//Radius to search for holder
|
//Radius to search for holder
|
||||||
#define PILE_SEARCH_RADIUS 2
|
#define PILE_SEARCH_RADIUS 2
|
||||||
//Location to offset the holder
|
//Location to offset the holder
|
||||||
#define PILE_PLAYER_OFFSET [0,0,0]
|
#define PILE_OFFSET [0,0,0]
|
||||||
|
|
||||||
_item = _this;
|
_item = _this;
|
||||||
_holder = objNull;
|
_holder = objNull;
|
||||||
|
|
||||||
//Lets get the location of the player in the world
|
//Lets get the location of the player in the world
|
||||||
_pos = player modeltoWorld PILE_PLAYER_OFFSET;
|
_pos = player modeltoWorld PILE_OFFSET;
|
||||||
|
|
||||||
//Check if a holder is close by the player.
|
//Check if a holder is close by the player.
|
||||||
_nearByPile= nearestObjects [_pos, ["WeaponHolder","WeaponHolderBase"],PILE_SEARCH_RADIUS];
|
_nearByPile= nearestObjects [_pos, ["WeaponHolder","WeaponHolderBase"],PILE_SEARCH_RADIUS];
|
||||||
|
|
||||||
if (count _nearByPile == 0) then {
|
if (count _nearByPile == 0) then {
|
||||||
|
//No weapon holders found in the radius, spawn a new one
|
||||||
_holder = createVehicle ["WeaponHolder", _pos, [], 0, "CAN_COLLIDE"];
|
_holder = createVehicle ["WeaponHolder", _pos, [], 0, "CAN_COLLIDE"];
|
||||||
} else {
|
} else {
|
||||||
|
//Found a near by weapon holder lets select it.
|
||||||
_holder = _nearByPile select 0;
|
_holder = _nearByPile select 0;
|
||||||
|
|
||||||
|
//check to make sure the player can see the selected weapon holder.
|
||||||
|
_objects = lineIntersectsWith [(_holder modeltoWorld PILE_OFFSET), _pos, player, _holder, true];
|
||||||
|
|
||||||
|
//Can you see the current selected weapon holder
|
||||||
|
if ((count _objects) > 0) then {
|
||||||
|
//Unable to see the current selected weapon holder within the radius lets create a new one.
|
||||||
|
_holder = createVehicle ["WeaponHolder", _pos, [], 0, "CAN_COLLIDE"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//Add the item to the newly created holder or to the new holder.
|
//Add the item to the holder or to the newly created holder.
|
||||||
_holder addMagazineCargoGlobal [_item,1];
|
_holder addMagazineCargoGlobal [_item,1];
|
||||||
|
|
||||||
//Make sure the holder spawns behind the physical location of the player
|
|
||||||
_holder setPosATL (player modeltoWorld PILE_PLAYER_OFFSET);
|
|
||||||
|
|
||||||
//Revel the item
|
//Revel the item
|
||||||
player reveal _holder;
|
player reveal _holder;
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
//
|
//
|
||||||
/*
|
/*
|
||||||
Returns true if <position> lies within the sector defined by <center position>,
|
Returns true if <position> lies within the sector defined by <center position>,
|
||||||
<center angle of sector> && <sector width>. Use this function to determine if
|
<center angle of sector> and <sector width>. Use this function to determine if
|
||||||
a position lies within a certain angle from another position (ie the <center position>).
|
a position lies within a certain angle from another position (ie the <center position>).
|
||||||
Example:
|
Example:
|
||||||
[position player,getdir player,30,position enemy_tank] call BIS_fnc_inAngleSector
|
[position player,getdir player,30,position enemy_tank] call BIS_fnc_inAngleSector
|
||||||
will return true if the vehicle named enemy_tank is within 30 degrees of where the player is pointing.
|
will return true if the vehicle named enemy_tank is within 30 degrees of where the player is pointing.
|
||||||
@@ -15,19 +15,17 @@
|
|||||||
// Revision History:
|
// Revision History:
|
||||||
// 09/01/08 0.1 - First cut VBS2
|
// 09/01/08 0.1 - First cut VBS2
|
||||||
//------------------
|
//------------------
|
||||||
|
private["_r","_dir1"];
|
||||||
|
|
||||||
private["_dir1","_dir2","_dir3","_small","_large","_x","_y","_r"];
|
|
||||||
|
|
||||||
_r = false;
|
_r = false;
|
||||||
|
|
||||||
_small = (_this select 1) - ((_this select 2) / 2);
|
_small = (_this select 1) - ((_this select 2) / 2);
|
||||||
_large = (_this select 1) + ((_this select 2) / 2);
|
_large = (_this select 1) + ((_this select 2) / 2);
|
||||||
|
|
||||||
_x = ((_this select 3) select 0) - ((_this select 0) select 0);
|
_xpos = ((_this select 3) select 0) - ((_this select 0) select 0);
|
||||||
_y = ((_this select 3) select 1) - ((_this select 0) select 1);
|
_ypos = ((_this select 3) select 1) - ((_this select 0) select 1);
|
||||||
|
|
||||||
_dir1 = _x atan2 _y;
|
_dir1 = _xpos atan2 _ypos;
|
||||||
|
|
||||||
if (_dir1 < 0) then {_dir1 = _dir1 + 360};
|
if (_dir1 < 0) then {_dir1 = _dir1 + 360};
|
||||||
|
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ if (DZE_NameTags > 0) then {
|
|||||||
|
|
||||||
if (_isPZombie) then {
|
if (_isPZombie) then {
|
||||||
if (s_player_callzombies < 0) then {
|
if (s_player_callzombies < 0) then {
|
||||||
s_player_callzombies = player addAction [localize "STR_EPOCH_ACTIONS_RAISEHORDE", "\z\addons\dayz_code\actions\call_zombies.sqf",player, 5, true, false];
|
s_player_callzombies = player addAction [localize "STR_EPOCH_ACTIONS_RAISEHORDE", "\z\addons\dayz_code\actions\pzombie\call_zombies.sqf",player, 5, true, false];
|
||||||
};
|
};
|
||||||
if (DZE_PZATTACK) then {
|
if (DZE_PZATTACK) then {
|
||||||
call pz_attack;
|
call pz_attack;
|
||||||
@@ -949,7 +949,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
|||||||
//Dog
|
//Dog
|
||||||
if (_isDog && {_hasRawMeat} && {_isAlive} && {_ownerID == "0"} && {player getVariable ["dogID",0] == 0}) then {
|
if (_isDog && {_hasRawMeat} && {_isAlive} && {_ownerID == "0"} && {player getVariable ["dogID",0] == 0}) then {
|
||||||
if (s_player_tamedog < 0) then {
|
if (s_player_tamedog < 0) then {
|
||||||
s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\tame_dog.sqf", _cursorTarget, 1, false, true];
|
s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\dog\tame_dog.sqf", _cursorTarget, 1, false, true];
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
player removeAction s_player_tamedog;
|
player removeAction s_player_tamedog;
|
||||||
|
|||||||
@@ -10,11 +10,12 @@
|
|||||||
Returns:
|
Returns:
|
||||||
Sun's rise in hours, in the same format as engine's [daytime] command (16.5 == 16:30)
|
Sun's rise in hours, in the same format as engine's [daytime] command (16.5 == 16:30)
|
||||||
To obtain sun's set, just subtract the result from 24.
|
To obtain sun's set, just subtract the result from 24.
|
||||||
|
|
||||||
Reference:
|
Reference:
|
||||||
http://forums.bistudio.com/showthread.php?107476-How-do-I-detect-sundown-sunrise
|
http://forums.bistudio.com/showthread.php?107476-How-do-I-detect-sundown-sunrise
|
||||||
*/
|
*/
|
||||||
private ["_lat","_day","_hour","_daytime"];
|
private["_daytime"];
|
||||||
|
|
||||||
_lat = -1 * getNumber(configFile >> "CfgWorlds" >> worldName >> "latitude");
|
_lat = -1 * getNumber(configFile >> "CfgWorlds" >> worldName >> "latitude");
|
||||||
_day = 360 * (dateToNumber date);
|
_day = 360 * (dateToNumber date);
|
||||||
_hour = acos ((24 * sin(_lat) * cos(_day)) / ((12 * cos(_day) - 78) * cos(_lat)));
|
_hour = acos ((24 * sin(_lat) * cos(_day)) / ((12 * cos(_day) - 78) * cos(_lat)));
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
private ["_markerstr","_class","_name","_type","_position","_radiusA","_radiusB","_maptype","_config"];
|
|
||||||
|
|
||||||
if ("ItemMap_Debug" in items player) then {
|
|
||||||
// _world = toUpper(worldName);
|
|
||||||
|
|
||||||
_maptype = ["NameCityCapital","NameCity","NameVillage","NameLocal"];
|
|
||||||
_config = configFile >> "CfgWorlds" >> worldName >> "Names";
|
|
||||||
|
|
||||||
for "_i" from 0 to (count _config -1) do {
|
|
||||||
|
|
||||||
_class = _config select _i; //Returns a conif
|
|
||||||
_name = getText (_class >> "name");
|
|
||||||
_type = getText (_class >> "type");
|
|
||||||
_position = getArray (_class >> "position");
|
|
||||||
_radiusA = getNumber (_class >> "radiusA");
|
|
||||||
_radiusB = getNumber (_class >> "radiusB");
|
|
||||||
|
|
||||||
if (_type in _maptype) then {
|
|
||||||
|
|
||||||
//diag_log(format["Config Type, Name: %1 / Type: %2 / Position: %3, Passed",_name,_type,_position]);
|
|
||||||
|
|
||||||
// _rnd = random 1;
|
|
||||||
@@ -1,19 +1,14 @@
|
|||||||
//[unit, selectionName, damage, source, projectile]
|
//[unit, selectionName, damage, source, projectile]
|
||||||
//will only run when local to the created object
|
//will only run when local to the created object
|
||||||
//record any key hits to the required selection
|
//record any key hits to the required selection
|
||||||
private ["_zed","_killer","_kills","_array","_type","_humanity"];
|
private["_killer"];
|
||||||
|
|
||||||
_array = _this select 0;
|
_array = _this select 0;
|
||||||
_zed = _array select 0;
|
_zed = _array select 0;
|
||||||
_killer = _array select 1;
|
_killer = _array select 1;
|
||||||
_type = _this select 1;
|
_type = _this select 1;
|
||||||
|
|
||||||
if (local _zed) then {
|
if (local _zed) then {
|
||||||
_kills = _killer getVariable[_type,0];
|
_kills = _killer getVariable[_type,0];
|
||||||
_killer setVariable[_type,(_kills + 1),true];
|
_killer setVariable[_type,(_kills + 1),true];
|
||||||
|
|
||||||
//increase players humanity when zed killed
|
|
||||||
_humanity = _killer getVariable["humanity",0];
|
|
||||||
_humanity = _humanity + 5;
|
|
||||||
_killer setVariable["humanity",_humanity,true];
|
|
||||||
};
|
};
|
||||||
@@ -40,4 +40,4 @@ if (local _animalbody) then {
|
|||||||
deleteVehicle _body;
|
deleteVehicle _body;
|
||||||
true
|
true
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
private ["_currentObjects","_currentTypes","_currentQty","_previousTypes","_previousQty","_serial","_itemVal","_itemQty","_oldSerial","_oldQty","_change","_checkObjects"];
|
|
||||||
//_newObjects = [_previous,weapons player] call player_weaponCheck;
|
//_newObjects = [_previous,weapons player] call player_weaponCheck;
|
||||||
_currentObjects = _this select 0;
|
private["_change","_currentTypes","_currentQty","_previousTypes","_previousQty","_serial"];
|
||||||
_checkObjects = _this select 1;
|
|
||||||
|
_currentObjects = _this select 0;
|
||||||
|
_checkObjects = _this select 1;
|
||||||
|
|
||||||
_change = false;
|
_change = false;
|
||||||
|
|
||||||
if (count _currentObjects > 1) then {
|
if (count _currentObjects > 1) then {
|
||||||
_currentTypes = _currentObjects select 0;
|
_currentTypes = _currentObjects select 0;
|
||||||
_currentQty = _currentObjects select 1;
|
_currentQty = _currentObjects select 1;
|
||||||
} else {
|
} else {
|
||||||
_currentTypes = [];
|
_currentTypes = [];
|
||||||
_currentQty = [];
|
_currentQty = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (count _checkObjects > 1) then {
|
if (count _checkObjects > 1) then {
|
||||||
_previousTypes = _checkObjects select 0;
|
_previousTypes = _checkObjects select 0;
|
||||||
_previousQty = _checkObjects select 1;
|
_previousQty = _checkObjects select 1;
|
||||||
} else {
|
} else {
|
||||||
_previousTypes = [];
|
_previousTypes = [];
|
||||||
_previousQty = [];
|
_previousQty = [];
|
||||||
@@ -27,31 +28,31 @@ _serial = 0;
|
|||||||
{
|
{
|
||||||
_itemVal = _x;
|
_itemVal = _x;
|
||||||
_itemQty = _currentQty select _serial;
|
_itemQty = _currentQty select _serial;
|
||||||
|
|
||||||
_oldSerial = _previousTypes find _itemVal;
|
_oldSerial = _previousTypes find _itemVal;
|
||||||
_oldQty = 0;
|
_oldQty = 0;
|
||||||
if (_oldSerial >= 0) then {
|
if (_oldSerial >= 0) then {
|
||||||
_oldQty = _previousQty select _oldSerial;
|
_oldQty = _previousQty select _oldSerial;
|
||||||
};
|
};
|
||||||
if (_itemQty != _oldQty) then {_change = true};
|
if (_itemQty != _oldQty) then {_change = true};
|
||||||
|
|
||||||
_serial = _serial + 1;
|
_serial = _serial + 1;
|
||||||
} count _currentTypes;
|
} forEach _currentTypes;
|
||||||
|
|
||||||
//Review old loadout
|
//Review old loadout
|
||||||
_serial = 0;
|
_serial = 0;
|
||||||
{
|
{
|
||||||
_itemVal = _x;
|
_itemVal = _x;
|
||||||
_itemQty = _previousQty select _serial;
|
_itemQty = _previousQty select _serial;
|
||||||
|
|
||||||
_oldSerial = _currentTypes find _itemVal;
|
_oldSerial = _currentTypes find _itemVal;
|
||||||
_oldQty = 0;
|
_oldQty = 0;
|
||||||
if (_oldSerial >= 0) then {
|
if (_oldSerial >= 0) then {
|
||||||
_oldQty = _currentQty select _oldSerial;
|
_oldQty = _currentQty select _oldSerial;
|
||||||
};
|
};
|
||||||
if (_itemQty != _oldQty) then {_change = true};
|
if (_itemQty != _oldQty) then {_change = true};
|
||||||
|
|
||||||
_serial = _serial + 1;
|
|
||||||
} count _previousTypes;
|
|
||||||
|
|
||||||
_change
|
_serial = _serial + 1;
|
||||||
|
} forEach _previousTypes;
|
||||||
|
|
||||||
|
_change;
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
private["_unit","_hp","_selection","_strH","_dam"];
|
_unit = _this select 0;
|
||||||
_unit = _this select 0;
|
_hp = _this select 1;
|
||||||
_hp = _this select 1;
|
|
||||||
_selection = getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "HitPoints" >> _hp >> "name");
|
_selection = getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "HitPoints" >> _hp >> "name");
|
||||||
_strH = "hit_" + (_selection);
|
_strH = "hit_" + (_selection);
|
||||||
_dam = _unit getVariable [_strH,0];
|
_dam = _unit getVariable [_strH,0];
|
||||||
|
|
||||||
_dam
|
_dam
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
private ["_flare","_lightArea","_lightSpark","_type","_color"];
|
|
||||||
_flare = _this select 0;
|
_flare = _this select 0;
|
||||||
_type = _this select 1;
|
_type = _this select 1;
|
||||||
//_sfx = objNull;
|
//_sfx = objNull;
|
||||||
@@ -12,14 +11,14 @@ if (!isNull _flare) then {
|
|||||||
_lightArea setLightAmbient [0.2,0.01,0.01];
|
_lightArea setLightAmbient [0.2,0.01,0.01];
|
||||||
_lightArea setLightBrightness 0.2;
|
_lightArea setLightBrightness 0.2;
|
||||||
_lightArea lightAttachObject [_flare, [0,0,0]];
|
_lightArea lightAttachObject [_flare, [0,0,0]];
|
||||||
|
|
||||||
//Spark Light
|
//Spark Light
|
||||||
_lightSpark = "#lightpoint" createVehicleLocal (getPosATL _flare);
|
_lightSpark = "#lightpoint" createVehicleLocal (getPosATL _flare);
|
||||||
_lightSpark setLightColor [0.1,0.1,0.1];
|
_lightSpark setLightColor [0.1,0.1,0.1];
|
||||||
_lightSpark setLightAmbient [0.05,0.05,0.05];
|
_lightSpark setLightAmbient [0.05,0.05,0.05];
|
||||||
_lightSpark setLightBrightness 0.05;
|
_lightSpark setLightBrightness 0.05;
|
||||||
_lightSpark lightAttachObject [_flare, [0,0,0]];
|
_lightSpark lightAttachObject [_flare, [0,0,0]];
|
||||||
|
|
||||||
while {alive _flare} do {
|
while {alive _flare} do {
|
||||||
_lightArea setLightAmbient [((random 0.2) + 0.2),0.01,0.01];
|
_lightArea setLightAmbient [((random 0.2) + 0.2),0.01,0.01];
|
||||||
//_lightArea setLightColor [((random 0.1) + 0.1),0.005,0.005];
|
//_lightArea setLightColor [((random 0.1) + 0.1),0.005,0.005];
|
||||||
@@ -30,7 +29,7 @@ if (!isNull _flare) then {
|
|||||||
};
|
};
|
||||||
case 1: {
|
case 1: {
|
||||||
//Spark Light
|
//Spark Light
|
||||||
_color = getArray(configFile >> "cfgAmmo" >> (typeOf _flare) >> "lightColor");
|
_color = getArray(configFile >> "cfgAmmo" >> (typeOf _flare) >> "lightColor");
|
||||||
_lightSpark = "#lightpoint" createVehicleLocal (getPosATL _flare);
|
_lightSpark = "#lightpoint" createVehicleLocal (getPosATL _flare);
|
||||||
_lightSpark setLightColor _color;
|
_lightSpark setLightColor _color;
|
||||||
_lightSpark setLightAmbient _color;
|
_lightSpark setLightAmbient _color;
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
private ["_unit","_selection","_strH","_dam","_damage"];
|
// this function name is "object_setHit", but it's used to set character limb damages back during a skin change (player_humanityMorph.sqf)
|
||||||
_unit = _this select 0;
|
|
||||||
_selection = _this select 1;
|
private ["_damage"];
|
||||||
_damage = _this select 2;
|
_unit = _this select 0;
|
||||||
|
_selection = _this select 1;
|
||||||
|
_damage = _this select 2;
|
||||||
if (_selection != "") then {
|
if (_selection != "") then {
|
||||||
_strH = "hit_" + (_selection);
|
_strH = "hit_" + (_selection);
|
||||||
_dam = _unit getVariable [_strH,0];
|
_dam = _unit getVariable [_strH,0];
|
||||||
_unit setVariable [_strH,(_dam + _damage)];
|
_unit setVariable [_strH,(_dam + _damage)];
|
||||||
if (_selection in USEC_MinorWounds) then {
|
if (_selection in USEC_MinorWounds) then {
|
||||||
_unit setHit[_selection,(_dam + _damage)];
|
_unit setHit[_selection,(_dam + _damage)];
|
||||||
|
diag_log(format["%1: %2 setHit %3 %4", __FILE__, _unit, _selection, (_dam + _damage)]);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
_damage;
|
_damage
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
private ["_unit","_selection","_strH","_dam","_total","_damage"];
|
// private["_unit","_selection","_strH","_dam","_total"];
|
||||||
_unit = _this select 0;
|
// _unit = _this select 0;
|
||||||
_selection = _this select 1;
|
// _selection = _this select 1;
|
||||||
_damage = _this select 2;
|
// _damage = _this select 2;
|
||||||
if ((_selection != "")) then {
|
// if ((_selection != "")) then {
|
||||||
_strH = "hit_" + (_selection);
|
// _strH = "hit_" + (_selection);
|
||||||
_dam = _unit getVariable [_strH,0];
|
// _dam = _unit getVariable [_strH,0];
|
||||||
_total = (_dam + _damage);
|
// _total = (_dam + _damage);
|
||||||
if (_total > 1) then {
|
// if (_total > 1) then {
|
||||||
_total = 1;
|
// _total = 1;
|
||||||
};
|
// };
|
||||||
_unit setVariable [_strH,_total];
|
// _unit setVariable [_strH,_total];
|
||||||
} else {
|
// } else {
|
||||||
_damage = 0;
|
// _damage = 0;
|
||||||
};
|
// };
|
||||||
_damage;
|
// _damage
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
private["_object","_updateObj"];
|
// private["_object","_updateObj"];
|
||||||
//check if can pitch here
|
// //check if can pitch here
|
||||||
_object = _this;
|
// _object = _this;
|
||||||
|
//
|
||||||
if (_object getVariable ["ObjectID",0] > 0) then {
|
// if (_object getVariable ["ObjectID",0] > 0) then {
|
||||||
_updateObj = _object getVariable["update",[false,false,false]];
|
// _updateObj = _object getVariable["update",[false,false,false]];
|
||||||
_updateObj set [1,true];
|
// _updateObj set [1,true];
|
||||||
_object setVariable ["update",_updateObj,true];
|
// _object setVariable ["update",_updateObj,true];
|
||||||
_object setVariable ["position",(getPosATL _object),true];
|
// _object setVariable ["position",(getPosATL _object),true];
|
||||||
};
|
// };
|
||||||
@@ -1,47 +1,58 @@
|
|||||||
private ["_animalssupported","_type","_agent","_favouritezones","_randrefpoint","_PosList","_PosSelect","_Pos","_list"];
|
private ["_type"];
|
||||||
_list = (getposATL player) nearEntities [["CAAnimalBase"],dayz_animalDistance];
|
_list = getposATL player nearEntities [["CAAnimalBase"],dayz_animalDistance];
|
||||||
if ((count _list) < dayz_maxAnimals) then {
|
|
||||||
_animalssupported = ["Chicken","Cow","Sheep","WildBoar","WildBoar","WildBoar","Goat","Rabbit","Rabbit","Dog"];
|
if ((count _list < dayz_maxAnimals) and (dayz_currentGlobalAnimals < dayz_maxGlobalAnimals)) then {
|
||||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
//Find where animal likes
|
||||||
Switch (_type) do {
|
_amount = (dayz_maxAnimals - (count _list)) min (dayz_maxGlobalAnimals - dayz_currentGlobalAnimals);
|
||||||
case "Cow" : {
|
for "_i" from 0 to _amount do {
|
||||||
_animalssupported = ["Cow01","Cow02","Cow03","Cow04","Cow01_EP1"];
|
_animalssupported = ["Chicken","Chicken","Chicken","Cow","Sheep","WildBoar","WildBoar","WildBoar","Goat","Rabbit","Rabbit","Dog"];
|
||||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
_type = (_animalssupported select floor(random(count _animalssupported)));
|
||||||
|
switch (_type) do {
|
||||||
|
case "Cow" : {
|
||||||
|
_animalssupported = ["Cow01","Cow02","Cow03","Cow04","Cow01_EP1"];
|
||||||
|
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||||
|
};
|
||||||
|
case "Goat" : {
|
||||||
|
_animalssupported = ["Goat01_EP1","Goat02_EP1","Goat"];
|
||||||
|
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||||
|
};
|
||||||
|
case "Sheep" : {
|
||||||
|
_animalssupported = ["Sheep","Sheep02_EP1","Sheep01_EP1"];
|
||||||
|
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||||
|
};
|
||||||
|
case "Chicken" : {
|
||||||
|
_animalssupported = ["Hen","Cock"];
|
||||||
|
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||||
|
};
|
||||||
|
case "Dog" : {
|
||||||
|
_animalssupported = ["DZ_Fin","DZ_Pastor"];
|
||||||
|
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||||
|
};
|
||||||
};
|
};
|
||||||
case "Goat" : {
|
_root = configFile >> "CfgVehicles" >> _type;
|
||||||
_animalssupported = ["Goat01_EP1","Goat02_EP1","Goat"];
|
_favouritezones = getText ( _root >> "favouritezones");
|
||||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
//_randrefpoint = [position player, 10, dayz_animalDistance, 1, 0, 50, 0] call BIS_fnc_findSafePos;
|
||||||
};
|
_randrefpoint = getposATL player;
|
||||||
case "Sheep" : {
|
_PosList = selectbestplaces [_randrefpoint,dayz_animalDistance,_favouritezones,10,5];
|
||||||
_animalssupported = ["Sheep","Sheep02_EP1","Sheep01_EP1"];
|
_PosSelect = _PosList select (floor random (count _PosList));
|
||||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
_Pos = _PosSelect select 0;
|
||||||
};
|
_list = _Pos nearEntities [["CAAnimalBase","Man"],50];
|
||||||
case "Chicken" : {
|
|
||||||
_animalssupported = ["Hen","Cock"];
|
|
||||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
if (player distance _Pos < dayz_animalDistance and NOT surfaceIsWater _Pos and (count _list <= 1)) then {
|
||||||
};
|
if (_type == "DZ_Pastor") then {
|
||||||
case "Dog" : {
|
_agent = createAgent [_type, _Pos, [], 0, "NONE"];
|
||||||
_animalssupported = ["DZ_Fin","DZ_Pastor"];
|
} else {
|
||||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
_agent = createAgent [_type, _Pos, [], 0, "FORM"];
|
||||||
|
};
|
||||||
|
|
||||||
|
//Disable simulation
|
||||||
|
PVDZ_Server_Simulation = [_agent, false];
|
||||||
|
publicVariableServer "PVDZ_Server_Simulation";
|
||||||
|
|
||||||
|
_agent setpos _Pos;
|
||||||
|
_id = [_pos,_agent] execFSM "\z\addons\dayz_code\system\animal_agent.fsm";
|
||||||
};
|
};
|
||||||
|
uiSleep 1;
|
||||||
};
|
};
|
||||||
_favouritezones = getText (configFile >> "CfgVehicles" >> _type >> "favouritezones");
|
};
|
||||||
_randrefpoint = getposATL player;
|
|
||||||
_PosList = selectBestPlaces [_randrefpoint,dayz_animalDistance,_favouritezones,10,5];
|
|
||||||
_PosSelect = _PosList select (floor(random(count _PosList)));
|
|
||||||
_Pos = _PosSelect select 0;
|
|
||||||
_list = _Pos nearEntities [["CAAnimalBase","Man"],50];
|
|
||||||
|
|
||||||
|
|
||||||
if (((player distance _Pos) < dayz_animalDistance) && {!(surfaceIsWater _Pos)} && {(count _list) <= 1}) then {
|
|
||||||
if (_type == "DZ_Pastor") then { _agent = createAgent [_type, _Pos, [], 0, "NONE"]; } else { _agent = createAgent [_type, _Pos, [], 0, "FORM"]; };
|
|
||||||
|
|
||||||
//Disable simulation
|
|
||||||
PVDZ_Server_Simulation = [_agent, false];
|
|
||||||
publicVariableServer "PVDZ_Server_Simulation";
|
|
||||||
|
|
||||||
_agent setPos _Pos;
|
|
||||||
_id = [_pos,_agent] execFSM "\z\addons\dayz_code\system\animal_agent.fsm";
|
|
||||||
};
|
|
||||||
uiSleep 1;
|
|
||||||
};
|
|
||||||
@@ -1,30 +1,23 @@
|
|||||||
private ["_unit","_ammo","_distance","_weapon","_projectile","_vUp","_endPos","_dir","_height","_bolt","_hitArray","_hitObject","_hitSelection","_config","_hitMemoryPt","_variation","_val","_doLoop","_countr","_magazine"];
|
private ["_endPos","_vUp","_doLoop","_hitArray","_countr","_hitObject","_hitSelection","_config","_hitMemoryPt","_variation","_val","_dir","_bolt","_obj","_unit","_ammo","_projectile","_height"];
|
||||||
_unit = _this select 0;
|
_obj = _this select 0;
|
||||||
_weapon = _this select 1;
|
_unit = _obj select 0;
|
||||||
_ammo = _this select 4;
|
//_weapon = _obj select 1;
|
||||||
_magazine = _this select 5;
|
_ammo = _obj select 4;
|
||||||
_projectile = _this select 6;
|
//_magazine = _obj select 5;
|
||||||
|
_projectile = _obj select 6;
|
||||||
|
|
||||||
_projectile = nearestObject [_unit, _ammo];
|
_projectile = nearestObject [_unit,_ammo];
|
||||||
_vUp = vectorUp _projectile;
|
_vUp = vectorUp _projectile;
|
||||||
_endPos = getPosATL _projectile;
|
_endPos = getPosATL _projectile;
|
||||||
_dir = 0;
|
_dir = 0;
|
||||||
|
|
||||||
if (_magazine == "Quiver") then {
|
|
||||||
_ammo = player ammo "Crossbow_DZ";
|
|
||||||
if (_ammo > 0) then {
|
|
||||||
player removeMagazines "Quiver";
|
|
||||||
player addMagazine ["Quiver", _ammo];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
while {alive _projectile} do {
|
while {alive _projectile} do {
|
||||||
_endPos = getPosATL _projectile;
|
_endPos = getPosATL _projectile;
|
||||||
_vUp = vectorUp _projectile;
|
_vUp = vectorUp _projectile;
|
||||||
uiSleep 0.01;
|
sleep 0.01;
|
||||||
};
|
};
|
||||||
|
|
||||||
_distance = _unit distance _endPos;
|
//_distance = _unit distance _endPos;
|
||||||
_height = _endPos select 2;
|
_height = _endPos select 2;
|
||||||
_doLoop = true;
|
_doLoop = true;
|
||||||
_countr = 0;
|
_countr = 0;
|
||||||
@@ -34,27 +27,27 @@ if (_height < 100) then {
|
|||||||
_bolt setPosATL _endPos;
|
_bolt setPosATL _endPos;
|
||||||
_bolt setDir (getDir _unit);
|
_bolt setDir (getDir _unit);
|
||||||
_bolt setVectorUp _vUp;
|
_bolt setVectorUp _vUp;
|
||||||
|
|
||||||
_hitArray = _unit getVariable["firedHit",[]];
|
_hitArray = _unit getVariable["firedHit",[]];
|
||||||
while {_doLoop} do {
|
while {_doLoop} do {
|
||||||
_hitArray = _unit getVariable["firedHit",[]];
|
_hitArray = _unit getVariable["firedHit",[]];
|
||||||
if (count _hitArray > 0) then {_doLoop = false};
|
if (count _hitArray > 0) then {_doLoop = false};
|
||||||
if (_countr > 50) then {_doLoop = false};
|
if (_countr > 50) then {_doLoop = false};
|
||||||
_countr = _countr + 1;
|
_countr = _countr + 1;
|
||||||
uiSleep 0.1;
|
sleep 0.1;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (count _hitArray > 0) then {
|
if (count _hitArray > 0) then {
|
||||||
_hitObject = _hitArray select 0;
|
_hitObject = _hitArray select 0;
|
||||||
_hitSelection = _hitArray select 1;
|
_hitSelection = _hitArray select 1;
|
||||||
_config = configFile >> "cfgBody" >> _hitSelection;
|
_config = configFile >> "cfgBody" >> _hitSelection;
|
||||||
_hitMemoryPt = getText(_config >> "memoryPoint");
|
_hitMemoryPt = getText(_config >> "memoryPoint");
|
||||||
_variation = getNumber(_config >> "variation");
|
_variation = getNumber(_config >> "variation");
|
||||||
_val = [((random (_variation * 2)) - _variation),((random (_variation * 2)) - _variation),((random (_variation * 2)) - _variation)];
|
_val = [((random (_variation * 2)) - _variation),((random (_variation * 2)) - _variation),((random (_variation * 2)) - _variation)];
|
||||||
_bolt attachTo [_hitObject,_val,_hitMemoryPt];
|
_bolt attachTo [_hitObject,_val,_hitMemoryPt];
|
||||||
_dir = ([_hitObject,_unit] call BIS_fnc_relativeDirTo) + 180;
|
_dir = ([_hitObject,_unit] call BIS_fnc_relativeDirTo) + 180;
|
||||||
_bolt setDir (_dir);
|
_bolt setDir (_dir);
|
||||||
[_bolt] call FNC_GetSetPos;
|
_bolt setPos (getPosATL _bolt);
|
||||||
_unit setVariable["firedHit",[]];
|
_unit setVariable["firedHit",[]];
|
||||||
_unit setVariable["firedDamage",0,true];
|
_unit setVariable["firedDamage",0,true];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,49 +1,49 @@
|
|||||||
private ["_unit","_projectile","_isInCombat","_currentNear","_projectilespeed","_projectflight","_listNear","_callCount","_nearVehicle"];
|
private ["_currentNear","_listNear","_callCount"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_projectile = _this select 6;
|
_projectile = _this select 6;
|
||||||
|
|
||||||
//diag_log ("0");
|
diag_log ("0");
|
||||||
|
|
||||||
//_isInComat = _unit getVariable["startcombattimer",0];
|
//_isInComat = _unit getVariable["startcombattimer",0];
|
||||||
|
|
||||||
//diag_log ("Bullit Speed: " +str(Speed _projectile));
|
diag_log ("Bullit Speed: " +str(Speed _projectile));
|
||||||
//diag_log ("Bullit Velocity: " +str(velocity _projectile));
|
diag_log ("Bullit Velocity: " +str(velocity _projectile));
|
||||||
|
|
||||||
_listNear = [];
|
_listNear = [];
|
||||||
_callCount = 0;
|
_callCount = 0;
|
||||||
|
|
||||||
//approx 1020 meters
|
//approx 1020 meters
|
||||||
while {(alive _projectile) && !(isNull _projectile) && _callCount < 85;} do {
|
while {(alive _projectile) && !(isNull _projectile) && (_callCount < 85)} do {
|
||||||
_projectilespeed = Speed _projectile;
|
_projectilespeed = Speed _projectile;
|
||||||
_projectflight = (((_projectilespeed / 60) * 1000));
|
_projectflight = (((_projectilespeed / 60) * 1000));
|
||||||
if (_projectflight > 0) then {
|
if (_projectflight > 0) then {
|
||||||
uiSleep (12 / (_projectflight));
|
uiSleep (12 / (_projectflight));
|
||||||
};
|
};
|
||||||
if (alive _projectile && !(isNull _projectile)) then {_currentNear = ([_projectile] call FNC_GetPos) nearEntities [["CAManBase","AllVehicles"],15];};
|
if (alive _projectile && !(isNull _projectile)) then {_currentNear = (getPosATL _projectile) nearEntities [["CAManBase","AllVehicles"],15];};
|
||||||
_listNear = _listNear + _currentNear;
|
_listNear = _listNear + _currentNear;
|
||||||
_callCount = _callCount + 1;
|
_callCount = _callCount + 1;
|
||||||
};
|
};
|
||||||
//diag_log ("2");
|
diag_log ("2");
|
||||||
{
|
{
|
||||||
_nearVehicle = _x;
|
_nearVehicle = _x;
|
||||||
_listNear = _listNear - [_x];
|
_listNear = _listNear - [_x];
|
||||||
|
|
||||||
//diag_log ("3");
|
diag_log ("3");
|
||||||
|
|
||||||
if (isPlayer _nearVehicle) then {
|
if (isPlayer _nearVehicle) then {
|
||||||
_isInCombat = _nearVehicle getVariable["startcombattimer",0];
|
_isInCombat = _nearVehicle getVariable["startcombattimer",0];
|
||||||
if ((alive _nearVehicle) && _isInCombat == 0) then {
|
if ((alive _nearVehicle) and _isInCombat == 0) then {
|
||||||
_nearVehicle setVariable["startcombattimer", 1];
|
_nearVehicle setVariable["startcombattimer", 1];
|
||||||
//diag_log("Now in Combat (Player): " + name _unit);
|
diag_log("Now in Combat (Player): " + name _unit);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_nearVehicle isKindOf "AllVehicles") then {
|
if (_nearVehicle isKindOf "AllVehicles") then {
|
||||||
{
|
{
|
||||||
_isInCombat = _x getVariable["startcombattimer",0];
|
_isInCombat = _x getVariable["startcombattimer",0];
|
||||||
if (isPlayer _x && _isInCombat == 0 && alive _x) then {
|
if (isPlayer _x and _isInCombat == 0 and alive _x) then {
|
||||||
_x setVariable["startcombattimer", 1];
|
_x setVariable["startcombattimer", 1];
|
||||||
//diag_log("Now in Combat (Crew): " + name _x);
|
diag_log("Now in Combat (Crew): " + name _x);
|
||||||
};
|
};
|
||||||
} forEach (crew _nearVehicle);
|
} forEach (crew _nearVehicle);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -28,4 +28,4 @@ if (_ammo isKindOf "RoadFlare") then {
|
|||||||
_distance = if ((daytime < (24 - dayz_sunRise)) && (daytime > dayz_sunRise)) then {30} else {60};
|
_distance = if ((daytime < (24 - dayz_sunRise)) && (daytime > dayz_sunRise)) then {30} else {60};
|
||||||
};
|
};
|
||||||
|
|
||||||
[_unit,_distance,false,_endPos] call player_alertZombies;
|
[_unit,_distance,false,_endPos] call player_alertZombies;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
private ["_currentObjects","_newObjects","_checkObjects","_type","_qtyNow","_qtyBefore","_change"];
|
private ["_newObjects","_change"];
|
||||||
//_newObjects = [_previous,weapons player] call player_weaponCheck;
|
//_newObjects = [_previous,weapons player] call player_weaponCheck;
|
||||||
_currentObjects = _this select 0;
|
_currentObjects = _this select 0;
|
||||||
_checkObjects = _this select 1;
|
_checkObjects = _this select 1;
|
||||||
|
|
||||||
_change = false;
|
_change = false;
|
||||||
|
|
||||||
@@ -10,8 +10,8 @@ _newObjects = [];
|
|||||||
{
|
{
|
||||||
if (!(_x in _newObjects)) then {
|
if (!(_x in _newObjects)) then {
|
||||||
_type = _x;
|
_type = _x;
|
||||||
_qtyNow = {_x == _type} count _checkObjects;
|
_qtyNow = {_x == _type} count _checkObjects;
|
||||||
_qtyBefore = {_x == _type} count _currentObjects;
|
_qtyBefore = {_x == _type} count _currentObjects;
|
||||||
if (_qtyNow != _qtyBefore) then {
|
if (_qtyNow != _qtyBefore) then {
|
||||||
_change = true;
|
_change = true;
|
||||||
};
|
};
|
||||||
@@ -24,8 +24,8 @@ _newObjects = [];
|
|||||||
{
|
{
|
||||||
if (!(_x in _newObjects)) then {
|
if (!(_x in _newObjects)) then {
|
||||||
_type = _x;
|
_type = _x;
|
||||||
_qtyNow = {_x == _type} count _checkObjects;
|
_qtyNow = {_x == _type} count _checkObjects;
|
||||||
_qtyBefore = {_x == _type} count _currentObjects;
|
_qtyBefore = {_x == _type} count _currentObjects;
|
||||||
if (_qtyNow != _qtyBefore) then {
|
if (_qtyNow != _qtyBefore) then {
|
||||||
_change = true;
|
_change = true;
|
||||||
};
|
};
|
||||||
@@ -33,4 +33,4 @@ _newObjects = [];
|
|||||||
};
|
};
|
||||||
} forEach _checkObjects;
|
} forEach _checkObjects;
|
||||||
|
|
||||||
_change;
|
_change
|
||||||
@@ -91,4 +91,4 @@ private ["_handled"];
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
//Launcher Handler
|
//Launcher Handler
|
||||||
|
|||||||
@@ -330,4 +330,4 @@ if (_isVehicle) then {
|
|||||||
}; // fi player by foot
|
}; // fi player by foot
|
||||||
};
|
};
|
||||||
//_stop = diag_tickTime;
|
//_stop = diag_tickTime;
|
||||||
//diag_log format ["%2 Execution Time: %1",_stop - _start, __FILE__];
|
//diag_log format ["%2 Execution Time: %1",_stop - _start, __FILE__];
|
||||||
|
|||||||
@@ -139,4 +139,4 @@ if (_attacked) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// return true if attacked or near. if so, player_monitor will perform its ridiculous 'while true' loop faster.
|
// return true if attacked or near. if so, player_monitor will perform its ridiculous 'while true' loop faster.
|
||||||
(_attacked OR _near)
|
(_attacked OR _near)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ if( (!isNull cursorTarget) && (player distance cursorTarget < 5) && (vehicle pla
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/*Player doesn't have a cursor target, || its too far away, || they are in a vehicle.
|
/*Player doesn't have a cursor target, or its too far away, or they are in a vehicle.
|
||||||
else{
|
else{
|
||||||
if ( (vehicle player != player) && (vehicle player isKindOf "AllVehicles") ) then {
|
if ( (vehicle player != player) && (vehicle player isKindOf "AllVehicles") ) then {
|
||||||
//Player is in a vehicle, placeholder for vehicle trunk sounds(if added)
|
//Player is in a vehicle, placeholder for vehicle trunk sounds(if added)
|
||||||
|
|||||||
@@ -1,24 +1,14 @@
|
|||||||
private["_unit","_hitPoints","_selection","_killer"];
|
|
||||||
|
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_killer = _this select 1;
|
//_killer = _this select 1;
|
||||||
|
|
||||||
_hitPoints = _unit call vehicle_getHitpoints;
|
|
||||||
{
|
|
||||||
_selection = getText (configFile >> "CfgVehicles" >> (typeof _unit) >> "HitPoints" >> _x >> "name");
|
|
||||||
_unit setVariable [_selection, 1, true];
|
|
||||||
} count _hitPoints;
|
|
||||||
|
|
||||||
// ask server to set global damage to 1, save to the hive
|
// ask server to set global damage to 1, save to the hive
|
||||||
if (isServer) then {
|
if (local _unit) then {
|
||||||
[_unit, "killed"] call server_updateObject;
|
if (isServer) then {
|
||||||
} else {
|
[_unit, "killed"] call server_updateObject;
|
||||||
if (DZE_Debug_Damage && ((!isPlayer _unit) || ((isPlayer _unit) && (vehicle _unit != _unit) && (_unit != _killer)))) then {
|
|
||||||
PVDZ_veh_Save = [_unit, "killed",_killer];
|
|
||||||
} else {
|
} else {
|
||||||
PVDZ_veh_Save = [_unit, "killed"];
|
PVDZ_veh_Save = [_unit, "killed"];
|
||||||
|
publicVariableServer "PVDZ_veh_Save";
|
||||||
};
|
};
|
||||||
publicVariableServer "PVDZ_veh_Save";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// everyone removes their EH for this vehicle
|
// everyone removes their EH for this vehicle
|
||||||
|
|||||||
@@ -1,79 +0,0 @@
|
|||||||
private ["_group","_target","_targetMen","_targetDis","_c","_man","_manDis","_targets","_lead","_rnd","_assigned","_fires","_range"];
|
|
||||||
_group = _this;
|
|
||||||
_target = objNull;
|
|
||||||
_lead = leader _group;
|
|
||||||
_targetMen = [];
|
|
||||||
_targetDis = [];
|
|
||||||
_range = 500;
|
|
||||||
|
|
||||||
_assigned = _group getVariable ["targets",[]];
|
|
||||||
{
|
|
||||||
_group reveal [_x,4];
|
|
||||||
} count _assigned;
|
|
||||||
|
|
||||||
//Find targets
|
|
||||||
_targets = _lead nearTargets _range;
|
|
||||||
{
|
|
||||||
private["_obj","_dis"];
|
|
||||||
_obj = _x select 4;
|
|
||||||
_dis = _obj distance _lead;
|
|
||||||
if (_obj isKindOf "Man" && ((speed _obj) < 15)) then {
|
|
||||||
if (!(_obj isKindOf "zZombie_Base") && !(_obj in _targetMen)) then {
|
|
||||||
//process man targets
|
|
||||||
_targetMen set [count _targetMen,_obj];
|
|
||||||
_targetDis set [count _targetDis,_dis];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} count _targets;
|
|
||||||
|
|
||||||
//Search for fires
|
|
||||||
if (count _targetMen == 0) then {
|
|
||||||
_fires = nearestObjects [_lead,["Land_Fire","SmokeShell","Generator_DZ"],_range];
|
|
||||||
{
|
|
||||||
private["_dis"];
|
|
||||||
_dis = _x distance _lead;
|
|
||||||
if ((_dis < _range) && !(_x in _targetMen)) then {
|
|
||||||
_rnd = random 1;
|
|
||||||
if (_rnd < 0.5) then {
|
|
||||||
if ((inflamed _x) || (_x isKindOf "SmokeShell")) then {
|
|
||||||
_targetMen set [count _targetMen,_x];
|
|
||||||
_targetDis set [count _targetDis,_dis];
|
|
||||||
} else {
|
|
||||||
if (_x isKindOf "Generator_DZ") then {
|
|
||||||
if (alive _x && (_x getVariable ["GeneratorRunning", false])) then {
|
|
||||||
_targetMen set [count _targetMen,_x];
|
|
||||||
_targetDis set [count _targetDis,_dis];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} count _fires;
|
|
||||||
};
|
|
||||||
|
|
||||||
//Find best target
|
|
||||||
if (count _targetMen > 0) then {
|
|
||||||
_man = _targetMen select 0;
|
|
||||||
_manDis = _targetDis select 0;
|
|
||||||
_c = 0;
|
|
||||||
{
|
|
||||||
private["_dis"];
|
|
||||||
_dis = _targetDis select _c;
|
|
||||||
if (_dis < _manDis) then {
|
|
||||||
_man = _x;
|
|
||||||
_manDis = _dis;
|
|
||||||
};
|
|
||||||
if (_x isKindOf "SmokeShell") then {
|
|
||||||
_man = _x;
|
|
||||||
_manDis = _dis;
|
|
||||||
};
|
|
||||||
_c = _c + 1;
|
|
||||||
} count _targetMen;
|
|
||||||
_target = _man;
|
|
||||||
};
|
|
||||||
|
|
||||||
//Check if too far
|
|
||||||
if (_manDis > _range) then {
|
|
||||||
_target = objNull;
|
|
||||||
};
|
|
||||||
_target;
|
|
||||||
@@ -1,29 +1,18 @@
|
|||||||
private ["_unit","_originalPos","_pos","_chance","_playerpos"];
|
private["_unit","_originalPos","_pos"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_originalPos = _this select 1;
|
_originalPos = _this select 1;
|
||||||
_pos = getPosATL _unit;
|
_pos = getPosATL _unit;
|
||||||
_playerpos = ([player] call FNC_GetPos);
|
|
||||||
|
|
||||||
if (count _this > 2) then {
|
if (count _this > 2) then {
|
||||||
_pos = _this select 2;
|
_pos = _this select 2;
|
||||||
} else {
|
} else {
|
||||||
//_unit enableAI "MOVE";
|
//_unit enableAI "MOVE";
|
||||||
//_unit enableAI "ANIM";
|
//_unit enableAI "ANIM";
|
||||||
|
//_pos = [_originalPos,10,90,4,0,5,0] call BIS_fnc_findSafePos;
|
||||||
_chance = round(random 12);
|
_pos = [_originalPos,10,(10 - (random (90 * 2))),0] call fn_selectRandomLocation;
|
||||||
if ((_chance % 4) == 0) then {
|
|
||||||
//_Offset = [0,0,0];
|
|
||||||
//_playerworldPos = _playerpos modelToWorld _Offset;
|
|
||||||
_pos = [_playerpos,30,120,4,0,5,0] call BIS_fnc_findSafePos;
|
|
||||||
} else {
|
|
||||||
_pos = [_originalPos,10,90,4,0,5,0] call BIS_fnc_findSafePos;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_unit distance player > 250) then {
|
|
||||||
_pos = [_playerpos,120,200,4,0,5,0] call BIS_fnc_findSafePos;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
if(isNull group _unit) then {
|
if(isNull group _unit) then {
|
||||||
_unit moveTo _pos;
|
_unit moveTo _pos;
|
||||||
} else {
|
} else {
|
||||||
@@ -31,3 +20,6 @@ if(isNull group _unit) then {
|
|||||||
};
|
};
|
||||||
_unit forceSpeed 2;
|
_unit forceSpeed 2;
|
||||||
_unit setVariable ["myDest",_pos];
|
_unit setVariable ["myDest",_pos];
|
||||||
|
*/
|
||||||
|
|
||||||
|
_pos
|
||||||
|
|||||||
@@ -176,7 +176,6 @@ if (!isDedicated) then {
|
|||||||
player_unlockVault = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_unlockVault.sqf";
|
player_unlockVault = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_unlockVault.sqf";
|
||||||
player_upgradeVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_upgradeVehicle.sqf";
|
player_upgradeVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_upgradeVehicle.sqf";
|
||||||
player_vaultPitch = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\vault_pitch.sqf";
|
player_vaultPitch = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\vault_pitch.sqf";
|
||||||
player_checkAndRemoveItems = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_checkAndRemoveItems.sqf";
|
|
||||||
pz_attack = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\pzombie\pz_attack.sqf";
|
pz_attack = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\pzombie\pz_attack.sqf";
|
||||||
|
|
||||||
dayz_losChance = {
|
dayz_losChance = {
|
||||||
|
|||||||
@@ -519,7 +519,6 @@ s_player_parts = [];
|
|||||||
if(isNil "DayZ_UseSteamID") then {DayZ_UseSteamID = true;};
|
if(isNil "DayZ_UseSteamID") then {DayZ_UseSteamID = true;};
|
||||||
if(isNil "DZE_SelfTransfuse") then {DZE_SelfTransfuse = false;};
|
if(isNil "DZE_SelfTransfuse") then {DZE_SelfTransfuse = false;};
|
||||||
if(isNil "DZE_GodModeBase") then {DZE_GodModeBase = false;};
|
if(isNil "DZE_GodModeBase") then {DZE_GodModeBase = false;};
|
||||||
if(isNil "DZE_Debug_Damage") then {DZE_Debug_Damage = true;};
|
|
||||||
if(isNil "DZE_TRADER_SPAWNMODE") then {DZE_TRADER_SPAWNMODE = false;};
|
if(isNil "DZE_TRADER_SPAWNMODE") then {DZE_TRADER_SPAWNMODE = false;};
|
||||||
if(isNil "dayz_paraSpawn") then {dayz_paraSpawn = false;};
|
if(isNil "dayz_paraSpawn") then {dayz_paraSpawn = false;};
|
||||||
if(isNil "DZE_BuildingLimit") then {DZE_BuildingLimit = 150;};
|
if(isNil "DZE_BuildingLimit") then {DZE_BuildingLimit = 150;};
|
||||||
|
|||||||
@@ -7417,6 +7417,7 @@
|
|||||||
<Spanish>No puedes cambiar de ropa mientras estás en un vehículo</Spanish>
|
<Spanish>No puedes cambiar de ropa mientras estás en un vehículo</Spanish>
|
||||||
<French>Vous ne pouvez pas vous changer dans un véhicule</French>
|
<French>Vous ne pouvez pas vous changer dans un véhicule</French>
|
||||||
<Czech>Nelze se převléci, když jste ve vozidle.</Czech>
|
<Czech>Nelze se převléci, když jste ve vozidle.</Czech>
|
||||||
|
<Dutch>Je kunt je niet omkleden in een voertuig</Dutch>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="str_player_fail_wear2">
|
<Key ID="str_player_fail_wear2">
|
||||||
<English>Currently Female Characters cannot change to this skin. This will change in a future update.</English>
|
<English>Currently Female Characters cannot change to this skin. This will change in a future update.</English>
|
||||||
|
|||||||
@@ -824,15 +824,6 @@
|
|||||||
<French>\n\nImpossible de changer de vêtements près d'un autre joueur.</French>
|
<French>\n\nImpossible de changer de vêtements près d'un autre joueur.</French>
|
||||||
<Czech>\n\nNemůžete si změnit oblečení, když je poblíž další hráč.</Czech>
|
<Czech>\n\nNemůžete si změnit oblečení, když je poblíž další hráč.</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_EPOCH_PLAYER_85">
|
|
||||||
<English>\n\nYou may not change clothes while in a vehicle</English>
|
|
||||||
<German>\n\nSie können Ihre Kleidung nicht innerhalb eines Fahrzeuges wechseln</German>
|
|
||||||
<Russian>\n\nВы не можете переодеваться, находясь в транспорте</Russian>
|
|
||||||
<!-- <Spanish></Spanish> -->
|
|
||||||
<Dutch>\n\nJe kunt je niet omkleden in een voertuig</Dutch>
|
|
||||||
<French>\n\nVous ne devriez pas changer de vêtements à bord d'un véhicule</French>
|
|
||||||
<Czech>\n\nNemůžete si změnit oblečení, pokud jste v autě.</Czech>
|
|
||||||
</Key>
|
|
||||||
<Key ID="STR_EPOCH_PLAYER_86">
|
<Key ID="STR_EPOCH_PLAYER_86">
|
||||||
<English>\n\nYou cannot wear a skin of the opposite sex.</English>
|
<English>\n\nYou cannot wear a skin of the opposite sex.</English>
|
||||||
<German>\n\nSie können nicht die Kleidung vom anderen Geschlecht tragen.</German>
|
<German>\n\nSie können nicht die Kleidung vom anderen Geschlecht tragen.</German>
|
||||||
@@ -1148,15 +1139,6 @@
|
|||||||
<French>%1 est rempli(e) à %2 pourcents de sa capacité.</French>
|
<French>%1 est rempli(e) à %2 pourcents de sa capacité.</French>
|
||||||
<Czech>%1 je naplněno do %2 procent kapacity.</Czech>
|
<Czech>%1 je naplněno do %2 procent kapacity.</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_EPOCH_PLAYER_134">
|
|
||||||
<English>You have filled %1 with fuel.</English>
|
|
||||||
<German>Sie haben %1 mit Kraftstoff befüllt.</German>
|
|
||||||
<Russian>Вы заполнили %1 топливом.</Russian>
|
|
||||||
<!-- <Spanish></Spanish> -->
|
|
||||||
<Dutch>Je hebt %1 met brandsfof gevuld.</Dutch>
|
|
||||||
<French>Vous avez rempli %1 avec du carburant.</French>
|
|
||||||
<Czech>Naplnili jste %1 palivem.</Czech>
|
|
||||||
</Key>
|
|
||||||
<Key ID="STR_EPOCH_PLAYER_135">
|
<Key ID="STR_EPOCH_PLAYER_135">
|
||||||
<English>\n\nThis building needs a %1 within %2 meters</English>
|
<English>\n\nThis building needs a %1 within %2 meters</English>
|
||||||
<German>\n\nDieses Gebäude benötitgt ein(e) %1 innerhalb von %2 Metern.</German>
|
<German>\n\nDieses Gebäude benötitgt ein(e) %1 innerhalb von %2 Metern.</German>
|
||||||
|
|||||||
Reference in New Issue
Block a user