bertram 11 Posted June 24, 2019 I'm trying to create a script that removes a player's weapon but with a switch case for different weapons. if (!(weapons player isEqualTo [])) then { switch (currentWeapon player) do { { case "arifle_Mk20_plain_F": hint "F2000 Removed"; player removeWeapon (primaryWeapon player); }; { case "SMG_05_F": hint "Mp5k removed"; player removeWeapon (primaryWeapon player); }; } else {hint "No weapon equipped"} }; The script checks if the player has a weapon and if they do goes by the classname of the weapon for each case. However, I'm doing something wrong here as the player's weapon never gets removed nor does the hint for no weapon go off. A previous attempt at making this fired the first case every time except for when the player had no weapon which fired the appropriate hint. From this I can say I'm pretty certain my if statement is fine and I'm just not doing the switch case correctly. Share this post Link to post Share on other sites
whiztler 135 Posted June 24, 2019 The correct format for the Switch Do command is: switch (_condition) do { case 1: { hint "1" }; case 2: { hint "2" }; default { hint "default" }; }; See: https://community.bistudio.com/wiki/switch Share this post Link to post Share on other sites