Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to formatting, syntax & noting [Minor] #740

Open
wants to merge 1 commit into
base: v5.X.X
Choose a base branch
from
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