This commit is contained in:
vbawol
2013-02-01 01:47:36 -06:00
parent d69e34617a
commit c4fa47f4d9
18 changed files with 570 additions and 202 deletions

View File

@@ -19,7 +19,9 @@ _hasmuttonRaw = "FoodmuttonRaw" in magazines player;
_haschickenRaw = "FoodchickenRaw" in magazines player;
_hasrabbitRaw = "FoodrabbitRaw" in magazines player;
_hasbaconRaw = "FoodbaconRaw" in magazines player;
_hasRawMeat = _hasSteakRaw or _hasmuttonRaw or _hasrabbitRaw or _hasbaconRaw;
//Define all Raw food
_hasRawMeat = _hasSteakRaw or _hasmuttonRaw or _haschickenRaw or _hasrabbitRaw or _hasbaconRaw;
_hasKnife = "ItemKnife" in items player;
_hasToolbox = "ItemToolbox" in items player;
//_hasTent = "ItemTent" in items player;
@@ -169,7 +171,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
};
};
//Fireplace Actions check
if(inflamed cursorTarget and (_hasSteakRaw or _hasmuttonRaw or _hasrabbitRaw or _hasbaconRaw) and _canDo) then {
if(inflamed cursorTarget and (_hasSteakRaw or _hasmuttonRaw or _haschickenRaw or _hasrabbitRaw or _hasbaconRaw) and _canDo) then {
if (s_player_cook < 0) then {
s_player_cook = player addAction [localize "str_actions_self_05", "\z\addons\dayz_code\actions\cook.sqf",cursorTarget, 3, true, true, "", ""];
};

View File

@@ -0,0 +1,44 @@
private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead"];
disableSerialization;
waitUntil {
_display = findDisplay 49;
!isNull _display;
};
_btnRespawn = _display displayCtrl 1010;
_btnAbort = _display displayCtrl 104;
_btnRespawn ctrlEnable false;
_btnAbort ctrlEnable false;
_timeOut = 0;
_timeMax = 30;
_isDead = !alive player;
if(r_fracture_legs) exitWith {_btnRespawn ctrlEnable true;};
if(_isDead) exitwith {_btnAbort ctrlEnable true;};
sleep 1;
while {!isNull _display} do {
switch true do {
case ({isPlayer _x} count (player nearEntities ["AllVehicles", 6]) > 1) : {
_btnAbort ctrlEnable false;
cutText ["Cannot Abort near another player!", "PLAIN DOWN"];
};
/*
case (_timeOut < _timeMax && count (player nearEntities ["zZombie_Base", 50]) > 0) : {
_btnAbort ctrlEnable false;
cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"];
_timeOut = _timeOut + 1;
};
*/
case (player getVariable["combattimeout", 0] >= time) : {
_btnAbort ctrlEnable false;
cutText ["Cannot Abort while in combat!", "PLAIN DOWN"];
};
default {
_btnAbort ctrlEnable true;
cutText ["", "PLAIN DOWN"];
};
};
sleep 3;
};
cutText ["", "PLAIN DOWN"];