schadler17 36 Posted September 26, 2015 I'm creating an Ammobox script that will deploy different types of gear based on what class the ammobox is. It all works and I can create different boxes with different layouts. My question is, how would I make it so when a certain class opens the box, a certain list of items would appear, only for that players classname. So far, this is what I've got, and it deploys the Weapons/Ammo/Items I place in the arrays like I wanted, but now I want to restrict certain gear to only be seen by certain classes. // Ammo Box Loadout Based On Classname // Written by Schadler.C [TacBF Team] if (!isServer) exitWith {}; private ["_box", "_type"]; _box = _this select 0; _type = (typeOf _box); // Begin Ammobox Supplies while {alive _box} do { switch (_type) do { // Ammo Box 1 case "rhsusf_weapon_crate": { // Refresh Ammobox (Keeps From Duplication) clearMagazineCargo _box; clearWeaponCargo _box; clearItemCargoGlobal _box; // Weapons _box addWeaponCargoGlobal [""] // Ammo _box addMagazineCargoGlobal [""]; // Items _box addItemCargoGlobal [""]; sleep 60; // Box refresh timer }; }; }; Share this post Link to post Share on other sites
R3vo 2654 Posted September 26, 2015 Take a look at https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#ContainerOpened Share this post Link to post Share on other sites
schadler17 36 Posted September 26, 2015 I was looking at this Already and had something working, but messed it up and couldn't find out what I did wrong to it so I decided to rewrite what I had messed up lol. Thank you though, will post if I need further help setting it up. Share this post Link to post Share on other sites
schadler17 36 Posted September 26, 2015 ignore. I'm gonna be writing a gear restriction on players anyways, so no need for boxes to show specific gear by player class, now it'll just be per box type(weapons, ammo, equipment, radios, etc..) Share this post Link to post Share on other sites