fn_Quiksilver 1634 Posted November 21, 2013 This does not seem to work in the .sqf: if (player hasMagazine "SatchelCharge_Remote_Mag") then { if ((playerSide == west && typeOf player != "B_soldier_exp_F") || (playerside == east && typeOf player != "O_soldier_exp_F") || (playerside == resistance && typeOf player != "I_soldier_exp_F")) then { player removeMagazine "SatchelCharge_Remote_Mag"; player globalChat "Only Explosives Specialists are trained with this item. Explosive removed."; }; }; Share this post Link to post Share on other sites
trnapster 12 Posted November 21, 2013 There is no hasMagazine command You can try to do this with a TAKE eventhandler Quick and dirty (and untested): TRN_fnc_checkMagazine = { if ((_this select 2) == "SatchelCharge_Remote_Mag") && ((playerSide == west && typeOf player != "B_soldier_exp_F") || (playerside == east && typeOf player != "O_soldier_exp_F") || (playerside == resistance && typeOf player != "I_soldier_exp_F"))) then { player removeMagazine (_this select 2); player globalChat "Only Explosives Specialists are trained with this item. Explosive removed."; }; }; player addEventhandler ["TAKE", _this spawn TRN_fnc_checkMagazine]; Share this post Link to post Share on other sites
2nd ranger 282 Posted November 21, 2013 That's probably fine, but I think there are still some situations where the Take eventhandler is buggy. For example, I know it doesn't work properly when you pick up an explosive that has been spawned. Not a common situation, but still. Instead of hasMagazine you would want if ("SatchelCharge_Remote_Mag" in (magazines player)) then { Share this post Link to post Share on other sites
wok 1 Posted November 21, 2013 If you want to make sure that the mag will never be used you can put the code that checks it in onEachFrame, not sure if that would have an impact on performance, but I use onEachFrame with a pretty complex code with lots of ifs and math calculations, and it doesn't seem to affect the game performance, so I guess a simple mag check wont cause many problems. Share this post Link to post Share on other sites
abdecken 1 Posted November 28, 2013 Did anyone get this to work? I tried the OP's method with if ("SatchelCharge_Remote_Mag" in (magazines player)) then { but it did not work at all. Share this post Link to post Share on other sites
2nd ranger 282 Posted November 28, 2013 if ("SatchelCharge_Remote_Mag" in (magazines player)) then { if (!(typeOf player in ["B_soldier_exp_F", "B_G_Soldier_exp_F", "O_soldier_exp_F", "I_soldier_exp_F"])) then { player removeMagazine "SatchelCharge_Remote_Mag"; player globalChat "Only Explosives Specialists are trained with this item. Explosive removed."; }; }; Share this post Link to post Share on other sites