Files
DayZ-Epoch/SQF/dayz_code/actions/player_pushPlane.sqf
ebaydayz 6713c1cf70 Lower nutrition values for push plane
Vanilla commit:

81297c8e26

Now using the same as refuel.

It takes a lot of pushes to move the plane any significant distance
(usually 10-20).
2016-10-20 15:28:23 -04:00

31 lines
857 B
Plaintext

private ["_dir","_nearPlayers","_object","_speed","_vel"];
_object = _this select 3;
player removeAction s_player_pushPlane;
s_player_pushPlane = -1;
if (!local _object) exitWith {
localize "str_actions_pilot_seat" call dayz_rollingMessages;
};
_nearPlayers = {(isPlayer _x && _x != player)} count (player nearEntities ["CAManBase",8]);
if ((_object isKindOf "C130J_US_EP1" or _object isKindOf "MV22") && _nearPlayers < 1) exitWith {
localize "STR_EPOCH_NEED_HELP" call dayz_rollingMessages;
};
_vel = velocity _object;
_dir = direction _object;
_speed = -1;
_object setVelocity [
(_vel select 0) + (sin _dir * _speed),
(_vel select 1) + (cos _dir * _speed),
(_vel select 2)
];
// Alert Zombies
[player,20,true,(getPosATL player)] call player_alertZombies;
// Added Nutrition-Factor for work
["Working",0,[0,1,3,0]] call dayz_NutritionSystem;