Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Altis_Life.Altis/core/functions/fn_clearVehicleAmmo.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,31 @@
Syntax: _vehicle removeMagazinesTurret [magazineName, turretPath]
Documentation: https://community.bistudio.com/wiki/removeMagazinesTurret
*/
private ["_vehicle","_veh"];
_vehicle = [_this,0,objNull,[objNull]] call BIS_fnc_param;

params [["_vehicle", objNull, [objNull]];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your params is broken
params [["_vehicle", objNull, [objNull]];
should be
params [ ["_vehicle", objNull, [objNull]] ];


if (isNull _vehicle) exitWith {};
_veh = typeOf _vehicle;
private _veh = typeOf _vehicle;

// Speedboat Minigun
if (_veh isEqualTo "B_Boat_Armed_01_minigun_F") then {
_vehicle removeMagazinesTurret ["200Rnd_40mm_G_belt",[0]];
};

// AMV-7 Marshall
if (_veh isEqualTo "B_APC_Wheeled_01_cannon_F") then {
_vehicle removeMagazinesTurret ["60Rnd_40mm_GPR_Tracer_Red_shells",[0]];
_vehicle removeMagazinesTurret ["40Rnd_40mm_APFSDS_Tracer_Red_shells",[0]];
};

// Mi-48 Kajman (Black)
if (_veh isEqualTo "O_Heli_Attack_02_black_F") then {
_vehicle removeMagazinesTurret ["250Rnd_30mm_APDS_shells",[0]];
_vehicle removeMagazinesTurret ["8Rnd_LG_scalpel",[0]];
_vehicle removeMagazinesTurret ["38Rnd_80mm_rockets",[0]];
};

// UH-80 Ghost Hawk
if (_veh isEqualTo "B_Heli_Transport_01_F") then {
_vehicle removeMagazinesTurret ["2000Rnd_65x39_Belt_Tracer_Red",[1]];
_vehicle removeMagazinesTurret ["2000Rnd_65x39_Belt_Tracer_Red",[2]];
Expand Down