fix uncon respawn button use, add static line protection
All checks were successful
Generate testing snapshot / Create testing release (push) Successful in 38s
All checks were successful
Generate testing snapshot / Create testing release (push) Successful in 38s
This commit is contained in:
23
framework/client/functions/fn_staticLineProtection.sqf
Normal file
23
framework/client/functions/fn_staticLineProtection.sqf
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
if ( !hasInterface ) exitWith {};
|
||||
|
||||
// Add GetOutMan event handler to grant temporary invincibility to players ejecting from vehicles
|
||||
// Only for players who have "hooked up" using VS static line
|
||||
// and are ejecting from a plane or helicopter above 100m
|
||||
player addEventHandler ["GetOutMan", {
|
||||
params ["_unit", "_role", "_vehicle", "_turret", "_isEject"];
|
||||
if (!isEject) exitWith {};
|
||||
if (isNil {_unit getVariable "VS_Jump"}) exitWith {};
|
||||
if (
|
||||
not (_vehicle isKindOf "Plane" || _vehicle isKindOf "Helicopter") ||
|
||||
((getPosATL _vehicle)#2) < 100
|
||||
) exitWith {};
|
||||
|
||||
_unit allowDamage false;
|
||||
(vehicle _unit) allowDamage false;
|
||||
[{
|
||||
_this allowDamage true;
|
||||
(vehicle _this) allowDamage true;
|
||||
}, _unit, 5] call CBA_fnc_waitAndExecute;
|
||||
}];
|
||||
Reference in New Issue
Block a user