diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:54:45 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:54:45 +0300 |
| commit | 68d4c9bbd80ed2e6528244569c79676b87295bd1 (patch) | |
| tree | 6efd42fbf6f1281874ae0ff1f8816b01fe0c7153 /Client/Action/Action_EjectCargo.sqf | |
| download | a2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.tar.gz a2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.tar.bz2 a2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.zip | |
init
Diffstat (limited to 'Client/Action/Action_EjectCargo.sqf')
| -rw-r--r-- | Client/Action/Action_EjectCargo.sqf | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Client/Action/Action_EjectCargo.sqf b/Client/Action/Action_EjectCargo.sqf new file mode 100644 index 0000000..a10bfd1 --- /dev/null +++ b/Client/Action/Action_EjectCargo.sqf @@ -0,0 +1,23 @@ +Private ["_cargo","_vehicle"];
+
+_vehicle = _this select 0;
+
+//--- Get the crew.
+_cargo = (crew _vehicle) - [driver _vehicle, gunner _vehicle, commander _vehicle];
+
+{
+ if (alive _x && _vehicle == vehicle _x) then {
+ if (local _x) then {
+ //--- Dealing with a local unit, probably an AI.
+ unassignVehicle _x;
+ _x action ["EJECT", _vehicle];
+ } else {
+ //--- Dealing with a player or a non local unit.
+ if (isPlayer(leader (group _x))) then {
+ WFBE_PerformAction = [vehicleVarName(leader(group _x)),'CLTFNCPERFORMACTION',[_x, "EJECT", _vehicle]];
+ publicVariable 'WFBE_PerformAction';
+ };
+ };
+ };
+ sleep 1;
+} forEach _cargo;
\ No newline at end of file |
