Jump to content
Sign in to follow this  
ArmAriffic

Show variable amount with hint format

Recommended Posts

I have a variable "money" and I want a radio trigger that uses hint format to say how much "money" the player has, can this be done and if so how?

Edited by ArmAriffic

Share this post


Link to post
Share on other sites

asuming variable is called money, for example like this:

money = 500;

then you can use in on act of a radio trigger:

hint format["you have %1 in cash",money];

as you wil see %1 stands as a the variable.

edit: you can add several %´s in the hint:

hint format["you have %1 in cash, and if you loose 100 more you will have %2",money,(money - 100)];

Share this post


Link to post
Share on other sites

thanks demonized one more question, how do I add more money

Edited by ArmAriffic

Share this post


Link to post
Share on other sites

The money variable in Demonized's example is just a numeric.

math commands.

addition:

//you just got paid.
money = money + 100;

subtraction:

// thanks for your purchase
money = money - 100;

division:

//you just got divorced and she got half of everything.
money = money / 2;

multipication:

//you got the headshot multiplier 2x the money
money = money * 2;

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  

×