Files
DayZ-Epoch/dayz_code/compile/player_onPause.sqf
vbawol 320046779b 0.992
+ Added variable pricing to traders. Stock under 5 will be sold at the
buy price and over 50 will be bought at the sell price.
+ Fixed trades not forcing a gear save and added more forced gear saves.
+ Added test for time based UID for purchased vehicles.
+ Reduced humanity gained by using a blood bag to 100 down from 250.
+ Added 5 minute penalty knockout for combat loggers.
+ Added prevention to logging out in a trader city. fixes #171
+ Changed cargo check to only show on alive vehicles. Fixes #176
+ Potential fix for gunner on armored SUV. Fixes #172
+ Fixes for refueling and repairing that was broken by 1.7.61
+ Removed taming of dogs for now. fixes #162
2013-03-03 13:41:35 -06:00

51 lines
1.7 KiB
Plaintext

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;
dayz_lastCheckBit = time;
if(r_player_dead) exitWith {_btnAbort ctrlEnable true;};
if(r_fracture_legs) exitWith {_btnRespawn ctrlEnable true; _btnAbort ctrlEnable true;};
//force gear save
if (time - dayz_lastCheckBit > 10) then {
call dayz_forceSave;
};
while {!isNull _display} do {
switch true do {
case ({isPlayer _x} count (player nearEntities ["AllVehicles", 6]) > 1) : {
_btnAbort ctrlEnable false;
cutText [format[localize "str_abort_playerclose",_text], "PLAIN DOWN"];
};
case (_timeOut < _timeMax && count (player nearEntities ["zZombie_Base", 35]) > 0) : {
_btnAbort ctrlEnable false;
cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"];
//cutText [format[localize "str_abort_zedsclose",_text, "PLAIN DOWN"];
};
case (!placevault) : {
_btnAbort ctrlEnable false;
cutText ["Cannot Abort while in a trader city!", "PLAIN DOWN"];
};
case (player getVariable["combattimeout", 0] >= time) : {
_btnAbort ctrlEnable false;
//cutText ["Cannot Abort while in combat!", "PLAIN DOWN"];
cutText [format[localize "str_abort_playerincombat",_text], "PLAIN DOWN"];
};
default {
_btnAbort ctrlEnable true;
cutText ["", "PLAIN DOWN"];
};
};
sleep 1;
_timeOut = _timeOut + 1;
};
cutText ["", "PLAIN DOWN"];