-
Notifications
You must be signed in to change notification settings - Fork 108
DMS_fnc_AddWeapon
eraser1 edited this page Sep 23, 2018
·
7 revisions
Author: eraser1
Based off of BIS_fnc_AddWeapon
General information: This function will add a specified weapon to a unit, as well as magazines (if specified to do so). No return value.
[
_unit,
_weapon,
_magazineCount,
_magClassname
] call DMS_fnc_AddWeapon;
_unit
< object >: The unit that is to receive the weapon (and magazines).
_weapon
< string >: The classname of the weapon to be added.
_magazineCount
< scalar >: Number of magazines to be added.
_magClassname
< string >: The classname of the magazine to be added.
Example 1 (from DMS_fnc_SpawnAISoldier):
[_unit, _weapon, 6 + floor(random 3)] call DMS_fnc_AddWeapon;
Example 2 (adds a zafir and 2-3 boxes of tracer ammo to "_unit"):
[_unit, "LMG_Zafir_F", 2 + floor(random 2), "150Rnd_762x54_Box_Tracer"] call DMS_fnc_AddWeapon;