Nebulazer 1 Posted April 23, 2015 I am trying to add a level restriction to my shop scripts that are all activated through action menu on an object. here is an example of one. //Navid Hex _cost=5000; if (cash >= _cost) then { cash=cash-_cost; hint "You Bought A Navid Hex For $5,000"; (uiNameSpace getVariable "myUI_DollarTitle") ctrlSetText format ["Money: $%1",cash]; player removeWeapon (primaryWeapon player); {player removeMagazine _x} forEach magazines player; //Add new weapons player addMagazine '150Rnd_93x64_Mag'; player addWeapon 'MMG_01_hex_F'; player addMagazines ['150Rnd_93x64_Mag', 3]; }else{ hint "Not enough money"; }; I want to add something like this so it will work in conjunction with taking the money but I am not sure how to mix them together. if level >= 15) then {.... }else{ hint "Not High Enough Level"; }; Share this post Link to post Share on other sites
Schatten 290 Posted April 23, 2015 if (level >= 15) then { _cost=5000; if (cash >= _cost) then { cash=cash-_cost; hint "You Bought A Navid Hex For $5,000"; (uiNameSpace getVariable "myUI_DollarTitle") ctrlSetText format ["Money: $%1",cash]; player removeWeapon (primaryWeapon player); {player removeMagazine _x} forEach magazines player; //Add new weapons player addMagazine '150Rnd_93x64_Mag'; player addWeapon 'MMG_01_hex_F'; player addMagazines ['150Rnd_93x64_Mag', 3]; } else {hint "Not enough money"}; } else {hint "Not High Enough Level"}; Share this post Link to post Share on other sites
Nebulazer 1 Posted April 23, 2015 (edited) Thank you very much, works like a charm! Edited April 23, 2015 by Nebulazer Share this post Link to post Share on other sites