Commit 75ee9a7a authored by Razer's avatar Razer

Added v0.1

parent 72e8da81
AutoParachute
\ No newline at end of file
_enabled = (toLower(["Enabled","APRC"] call BASE_fnc_getCfgValue) == "true");
if !(_enabled) exitWith {};
while {true} do {
waitUntil {(vehicle player) != player && (((vehicle player) isKindOf "Helicopter") || ((vehicle player) isKindOf "Plane"))};
_vehicle = vehicle player;
_allowDriverToEject = ["AllowDriverToEject","APRC"] call BASE_fnc_getCfgValue;
if ((player == driver _vehicle) && (_allowDriverToEject == "true")) then { // Add "Eject" action for pilot
APRC_var_Action = player addAction ["Eject",{player action ["getOut", vehicle player]}];
};
waitUntil {(vehicle player == player) && ((player distance _vehicle > 10) || (isTouchingGround player))}; // Wait until player gets out from the vehicle
if !(isNil "APRC_var_Action") then { // Remove Action that was added to pilot (If Added)
player removeAction APRC_var_Action;
};
_maxOpenHeight = ["MaxOpenHeight","APRC"] call BASE_fnc_getCfgNumber;
_minOpenHeight = ["MinOpenHeight","APRC"] call BASE_fnc_getCfgNumber;
_alt = ((getPosATL player) select 2);
if (!(isTouchingGround player) && (_alt > _minOpenHeight)) then {
waitUntil {_alt < _maxOpenHeight};
_chute = createVehicle ["Steerable_Parachute_F", getPosATL Player,[],0,"NONE"]; // Create parachute
player moveInDriver _chute;
};
};
\ No newline at end of file
class CfgPatches
{
class AutoParachute {
units[] = {};
};
};
class Plugins
{
class AutoParachute
{
name = "AutoParachute";
desc = "Opens parachute automatically for you!";
version = 0.1;
tag = "APRC";
};
};
class CfgFunctions
{
class APRC
{
class Client
{
file = "AutoParachute\Client";
isclient = 1;
class initClient {};
};
};
};
\ No newline at end of file
Enabled = true
AllowDriverToEject = true
# Parachute settings
MaxOpenHeight = 175
MinOpenHeight = 60
\ No newline at end of file
AutoParachute
**Simple plugin that adds automatic parachute when you eject from a vehicle!**
Remeber to add "AutoParachute" to your **PluginList.cfg!**
Feel free to modify this file!
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment