Jump to content
iceman77

Removing any Primary Weapon from a unit

Recommended Posts

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
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
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
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×