Files
DayZ-Epoch/SQF/dayz_code/actions/player_pushPlane.sqf
ebaydayz 745e287202 Add option to push stuck planes
Also changed flip vehicle back to 1051 default which allowed players to
flip non-ATVs with help.
2016-08-21 16:45:32 -04:00

31 lines
860 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,[20,40,15,0]] call dayz_NutritionSystem;