Author: TittErS
Author Website:

Requirements: No addons required

Version: 1.0

Short description: This script adds 2 functions for add in a container, magazines preloaded or weapons with items attached and magazine loaded.

Date: 2014-06-28 08:50


Comments: (0)
Rating:



 





Add Custom Magazine/Weapon Cargo

by
TittErS


Description:
This script adds 2 functions for add in a container, magazines preloaded or weapons with items attached and magazine loaded.


Features:
- JIP compatible.
- Functions can be executed by the server or the player


Installation / Usage:
In init.sqf file add:
// Functions TTS
call compile preprocessFile "TTS_fnc\fn_addCustomMagazineAmmoCargo.sqf";
call compile preprocessFile "TTS_fnc\fn_addCustomWeaponCargo.sqf";

addCustomMagazineAmmoCargo:
Parameter(s):
            0,1,2,.. : ARRAY        - Array Magazine.
                0 : STRING            - Magazine Name. CfgMagazines.
                1 : NUMBER            - Ammo Number. Number of bullets in the magazine.
            ..,(last) : OBJECT       - Destination. Add the magazine to Cargo ...

        Usage :
            [ ["MagazineName", AmmoNumber], Destination]
            OR
            [ ["MagazineName", AmmoNumber], ["MagazineName", AmmoNumber], ["MagazineName", AmmoNumber], Destination]
        
        Usage example :
            [ ["30Rnd_65x39_caseless_mag",8], box2] spawn TTS_fnc_addCustomMagazineAmmoCargo;
            [ ["30Rnd_65x39_caseless_mag",8], ["30Rnd_65x39_caseless_mag",8], ["30Rnd_65x39_caseless_mag",15], box1] spawn TTS_fnc_addCustomMagazineAmmoCargo;

addCustomWeaponCargo:
Parameter(s):
        0,1,2,.. : ARRAY        - Array Custom Weapon :
            0 : STRING            - Weapon Name. (CfgWeapons).
            1,2,.. : ARRAY        - Array Magazine. (Array Optional) Add a magazine with number defines bullet to weapon : 
                0 : STRING             - Magazine name. (cfgMagazines).
                1 : NUMBER            - Ammo Number. Number of bullets in the magazine
            1,2,.. : STRING        - Item Name. (Optional) Attach Item at weapon.
        ..,(last) : OBJECT       - Destination. Add the custom weapon to ...

        Usage : 
            [ ["WeaponName", ["MagazineName",AmmoNumber], "ItemName"], Destination ]
            OR
            [ ["WeaponName", ["MagazineName",AmmoNumber],  ["MagazineName",AmmoNumber], "ItemName", "ItemName", "ItemName"],  Destination ]
            OR
            [ ["WeaponName", "ItemName", "ItemName"], Destination ]
            OR (add 2,3,4,..  weapons)
            [ ["WeaponName", ["MagazineName",AmmoNumber], "ItemName"],  ["WeaponName", ["MagazineName",AmmoNumber], "ItemName"], ["WeaponName",  ["MagazineName",AmmoNumber], "ItemName"], Destination ]

        Usage example :
            [ ["arifle_Katiba_GL_F", ["30Rnd_65x39_caseless_green",15],  ["1Rnd_HE_Grenade_shell",1], "muzzle_snds_H", "acc_flashlight",  "optic_Arco"], box2 ] spawn TTS_fnc_addCustomWeaponCargo;
            [ ["hgun_P07_F", ["16Rnd_9x21_Mag",2], "muzzle_snds_L"], box2 ] spawn TTS_fnc_addCustomWeaponCargo;
            [ ["arifle_MX_Black_F", "muzzle_snds_H"], box2 ] spawn TTS_fnc_addCustomWeaponCargo;

            [ ["arifle_MX_Black_F", ["30Rnd_65x39_caseless_mag",30],  "muzzle_snds_H"], ["arifle_MX_Black_F",  ["30Rnd_65x39_caseless_mag",15]], box2 ] spawn  TTS_fnc_addCustomWeaponCargo;


Notes:
Thank you for the future bug reports, and contributions.


Changelog:
v1.0
- First realase


Forum topic:
- BI forums




Enable javascript to be able to download from Armaholic please!



Tags: No tags