-FW- Shaanguy 10 Posted October 7, 2014 this is the script i used, but this failed _price = 100; if (player getVariable "money" < _price) then { hint "You dont have enough cash to buy this gun"; } else { hint format ["You have bought a gun for $%1", _price]; player addweapon "classname"; //blah bla bla bla } just want to know, how to check a variable amount Share this post Link to post Share on other sites
Greenfist 1863 Posted October 7, 2014 There's nothing wrong with that code. Maybe you didn't use the setvariable correctly? This is a wrong forum section, by the way. --> http://forums.bistudio.com/forumdisplay.php?162-ARMA-3-MISSION-EDITING-amp-SCRIPTING Share this post Link to post Share on other sites
-FW- Shaanguy 10 Posted October 7, 2014 is there a other script like this way? O_o. this script isn't working for me ---------- Post added at 17:04 ---------- Previous post was at 17:00 ---------- i found the good script , and it's working, i just have to remove that _price, and write a value. like this if (player getVariable "money" < 100) then { hint "You dont have enough cash to buy this gun"; } else { hint "you have bought a gun for $100"; player addweapon "classname"; //blah bla bla bla } Share this post Link to post Share on other sites