iceman77 18 Posted January 18, 2013 I need to be able to remove a primary weapon from a unit, no matter what primary weapon the unit may have. I'd prefer not to use a large array of weapon names. Is there anyway to simply remove just a primary weapon if the unit posseses one? RemoveAllWeapons isn't an option. If (PrimaryWeapon Player != "") Then {Hint "Has a Weapon"} //But I need to remove the weapon instead; Share this post Link to post Share on other sites
Horner 13 Posted January 19, 2013 player removeWeapon (primaryWeapon player); Share this post Link to post Share on other sites
iceman77 18 Posted January 19, 2013 Sweet man thanks. Share this post Link to post Share on other sites
PenguinInATuxedo 18 Posted February 4, 2014 is there a way to get this done on loop? I want it for a joke on my commander so he can only use pistol(Zubr) during mission. Share this post Link to post Share on other sites
Kerc Kasha 102 Posted February 4, 2014 is there a way to get this done on loop? I want it for a joke on my commander so he can only use pistol(Zubr) during mission. sure, in the init.sqf put something like if (name player == "DudesName") then { while (alive player) do {player removeWeapon (primaryWeapon player); sleep 2;}; }; or if you want to make him butter fingers and drop it on the ground: if (name player == "DudesName") then { while (alive player) do {player action ["dropWeapon", player , (primaryWeapon player)] ; sleep 2;}; }; Share this post Link to post Share on other sites
PenguinInATuxedo 18 Posted February 4, 2014 sure, in the init.sqf put something like if (name player == "DudesName") then { while (alive player) do {player removeWeapon (primaryWeapon player); sleep 2;}; }; or if you want to make him butter fingers and drop it on the ground: if (name player == "DudesName") then { while (alive player) do {player action ["dropWeapon", player , (primaryWeapon player)] ; sleep 2;}; }; Thanks so much can it be done with unit name and init? the commander unit is a certainty but commander might change. Share this post Link to post Share on other sites
Kerc Kasha 102 Posted February 4, 2014 Thanks so much can it be done with unit name and init? the commander unit is a certainty but commander might change. Oh yeah that works also just use player == UnitName instead of name player Share this post Link to post Share on other sites