Posts: 62
Threads: 8
Joined: Jan 2011
Reputation:
0
Is there any ways to make the GTA money to Decimal, like adding a TextDraw and make it Decimal.
I've heard the float could help for decimal money, the problem is that I don't know how to change it to like this:
Let's say you use "float" how would you know it's .00 or like .45 so the TextDraw could change to those variables just like a Speedo System.
Posts: 253
Threads: 85
Joined: Jan 2011
Reputation:
0
Well, you can make two textdraws and two normal number variables for money. If the second variable hits 100, increase the first variable by 1 and set the 2nd var to 0, if the 2nd var hits -1, decrease the 1st var by 1 and set the second var to 99. Then, make a textdraw that will show the first variable, and the second variable. Also, you can make a third textdraw that will represent the seperation (comma). But, as much as I know, you can't have decimal money in GTA.
Posts: 62
Threads: 8
Joined: Jan 2011
Reputation:
0
No, this is not what I want.
I want to make only 1 Variable in "float" like example:
new float:money;
Then I want to make it unique variable for all the script.
So when I pay someone I do /pay [playerid] [0.0]
float:money will change the TextDraw.
Yes you can have Decimal Money in GTA.
Everything is possible you just need to think how you are going to do it.
Posts: 62
Threads: 8
Joined: Jan 2011
Reputation:
0
Hmmm, interesting, floatround. That would work on TextDraw? If yes give me an example.
Posts: 62
Threads: 8
Joined: Jan 2011
Reputation:
0
Kinda like this but I want like only 1 variable instead of cents and dollars.
floatround is not so bad.
I really need to what the solution that would be revolutionary for SA-MP.