Jump to content
Sign in to follow this  
-FW- Shaanguy

if getVaraible help

Recommended Posts

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×