Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _marker = "local_box"; // marker used to spawn.
- _boxType = "B_supplyCrate_F"; // the type of ammobox used.
- _timer = 600; // time in seconds until box is refilled.
- if (_this != player) exitWith {}; // exit all other clients.
- _weapons = []; _magazines = [];
- // load available to standard players only.
- if (_this in [player1,player2,player3,player4]) then {
- _weapons =
- [
- ["arifle_MX_F",50],
- ["arifle_MXC_F",50],
- ["arifle_TRG20_F",50],
- ["arifle_TRG21_F",50],
- ["srifle_EBR_F",50],
- ["arifle_Khaybar_F",50],
- ["arifle_Khaybar_C_F",50],
- ["hgun_rook40_F",50],
- ["hgun_P07_F",50],
- ["ToolKit",50],
- ["MediKit",50],
- ["MineDetector",50],
- ["arifle_MXM_F",50] // notice that there is no , at the end of the last weapon.
- ];
- _magazines =
- [
- ["30Rnd_65x39_Caseless_mag",100],
- ["100Rnd_65x39_Caseless_mag",100],
- ["30Rnd_65x39_caseless_mag_Tracer",100],
- ["30Rnd_65x39_case_mag",100],
- ["16Rnd_9x21_Mag",100],
- ["30Rnd_9x21_Mag",100],
- ["20Rnd_556x45_UW_Mag",100],
- ["30RND_556x45_Stanag",100],
- ["20Rnd_762x45_Mag",10] // notice that there is no , at the end of the last magazine.
- ];
- };
- // COPY FROM HERE
- // load available to clan members only.
- if (_this in [clan1,clan2]) then {
- _weapons =
- [
- ["arifle_MX_F",1],
- ["arifle_MXM_F",1] // notice that there is no , at the end of the last weapon.
- ];
- _magazines =
- [
- ["20Rnd_762x45_Mag",10] // notice that there is no , at the end of the last magazine.
- ];
- };
- // TO HERE FOR AN ADDITIONAL GROUP
- if (_this in [mg1,mg2,mg3,mg4,mg5,mg6,mg64]) then {
- _weapons =
- [
- ["LMG_Mk200_F",10] // notice that there is no , at the end of the last weapon.
- ];
- _magazines =
- [
- ["200Rnd_65x39_cased_Box",50], // notice that there is no , at the end of the last magazine.
- ["200RND_65x39_Cased_box_Tracer",50]
- ];
- };
- if (_this in [gl1,gl2,gl3,gl4,gl5,gl6]) then {
- _weapons =
- [
- ["arifle_MX_GL_F",10],
- ["arifle_TRG21_GL_F",10], // notice that there is no , at the end of the last weapon.
- ["arifle_Khaybar_GL_F",10]
- ];
- _magazines =
- [
- ["1Rnd_HE_Grenade_shell",50], // notice that there is no , at the end of the last magazine.
- ["1Rnd_Smoke_Grenade_shell",50],
- ["1Rnd_SmokeBlue_Grenade_shell",50],
- ["1Rnd_SmokeGreen_Grenade_shell",50,
- ["1Rnd_SmokeOrange_Grenade_shell",50],
- ["1Rnd_SmokePurple_Grenade_shell",50],
- ["1Rnd_SmokeRed_Grenade_shell",50],
- ["1Rnd_SmokeYellow_Grenade_shell",50],
- ["UGL_FlareCIR_F",50],
- ["UGL_FlareWhite_F",50]
- ];
- };
- if (_this in [at1,at2,at3,at4,at5,at6]) then {
- _weapons =
- [
- ["launch_NLAW_F",1],
- ["launch_RPG32_F",1]
- ];
- _magazines =
- [
- ["RPG32_F",50],
- ["NLAW_F",50]
- ];
- };
- // create and fill the box.
- _box = _boxType createVehicleLocal (getMarkerPos _marker);
- _box allowDamage false;
- while {true} do {
- // empty it.
- clearWeaponCargo _box;
- clearMagazineCargo _box;
- // add in all weapons.
- {_box addWeaponCargo [(_x select 0),(_x select 1)]} foreach _weapons;
- // add in all magazines.
- {_box addMagazineCargo [(_x select 0),(_x select 1)]} foreach _magazines;
- // wait x amount of seconds then refill box.
- sleep _timer;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement