mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-21 15:40:50 +03:00
Add option to push stuck planes
Also changed flip vehicle back to 1051 default which allowed players to flip non-ATVs with help.
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
private ["_object","_position"];
|
||||
private ["_nearPlayers","_object"];
|
||||
_object = _this select 3;
|
||||
|
||||
_nearPlayers = {(isPlayer _x && _x != player)} count (player nearEntities ["CAManBase",8]);
|
||||
|
||||
if (!(_object isKindOf "ATV_Base_EP1") && _nearPlayers < 1) exitWith {
|
||||
localize "STR_EPOCH_NEED_HELP" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
//Kneel Down
|
||||
player playMove "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon";
|
||||
waitUntil { animationState player != "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon"};
|
||||
|
||||
//_object setpos _position;
|
||||
_object setvectorup [0,0,1];
|
||||
_object setVectorUp [0,0,1];
|
||||
|
||||
// Alert Zombies
|
||||
[player,20,true,(getPosATL player)] call player_alertZombies;
|
||||
|
||||
30
SQF/dayz_code/actions/player_pushPlane.sqf
Normal file
30
SQF/dayz_code/actions/player_pushPlane.sqf
Normal file
@@ -0,0 +1,30 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user