$$ Dollars and Cents $$ -
MadeMan - 14.08.2011
This include/FS allows you to use cents ($1 = 100 cents) in game. I got this idea from justsomeguy in Script Request Thread and thought I'll make it

I know that there is Decimal Money include made by Grim_, but as it's not available anymore, I'm releasing my own
How to use
There are 3 functions you can use:
pawn Code:
GivePlayerMoney(playerid, dollars, cents=0)
ResetPlayerMoney(playerid)
GetPlayerCents(playerid)
It should be pretty clear what they do

Also note that cents are optional in GivePlayerMoney, which means that you don't always have to use them.
Installing
To use the cents in your script, just download and copy the cents.inc to ../pawno/include/ folder and add this line next to others in your script
To see the cents textdraw on your screen, you must also download and copy the cents.pwn filterscript to ../filterscripts/ folder and add it to server.cfg
Download
cents.inc - Include
cents.pwn - Filterscript
Re: $$ Dollars and Cents $$ -
Grim_ - 14.08.2011
Oh WOW! Really? I just finished scripting this again last night, was planning on releasing it this morning. Oh well, that's karma for ya. Anyway, it looks nice, but I'll still be releasing mine again, since it's already finished.
Nice work.
Re: $$ Dollars and Cents $$ -
Darnell - 14.08.2011
Good job, both of you.
Re: $$ Dollars and Cents $$ -
HyperZ - 14.08.2011
Great work
Re: $$ Dollars and Cents $$ - suhrab_mujeeb - 14.08.2011
question: how do u intend it to work ingame? for in game we dont have cents for example
00000.00
in game there is just cash 0000000 like this
Re: $$ Dollars and Cents $$ -
MadeMan - 14.08.2011
Quote:
Originally Posted by suhrab_mujeeb
question: how do u intend it to work ingame? for in game we dont have cents for example
00000.00
in game there is just cash 0000000 like this
|
With this include, you HAVE cents ingame.
Re: $$ Dollars and Cents $$ -
justsomeguy - 14.08.2011
Quote:
Originally Posted by Grim_
Oh WOW! Really? I just finished scripting this again last night, was planning on releasing it this morning. Oh well, that's karma for ya. Anyway, it looks nice, but I'll still be releasing mine again, since it's already finished.
Nice work.
|
This one looks like a smaller version of the one you send me this morningXD
Anyway great timing i realy needed this!
Re: $$ Dollars and Cents $$ -
Venice - 14.08.2011
wow nice
Re: $$ Dollars and Cents $$ -
juraska - 14.08.2011
Great work i'm going test it
Re: $$ Dollars and Cents $$ -
ylleron - 14.08.2011
nice ideas bro'
Re: $$ Dollars and Cents $$ -
KoczkaHUN - 17.08.2011
Why not Float:money ?
Re: $$ Dollars and Cents $$ -
MadeMan - 17.08.2011
Quote:
Originally Posted by KoczkaHUN
Why not Float:money ? 
|
Then you would have to change
pawn Код:
new money = GetPlayerMoney(playerid);
to
pawn Код:
new Float:money = GetPlayerMoney(playerid);
or you will get a lot of tag mismatch warnings on compile.
Re: $$ Dollars and Cents $$ -
[RLG]Zepp - 17.08.2011
Screen?
Re: $$ Dollars and Cents $$ -
MadeMan - 17.08.2011
Quote:
Originally Posted by [RLG]Zepp
Screen?
|
Added.
Re: $$ Dollars and Cents $$ -
vakhtang - 28.08.2011
This is nice! Really helps when you are making Role Play Server

Thanks a lot
Re: $$ Dollars and Cents $$ -
TheArcher - 28.08.2011
I like this idea. Great job
Re: $$ Dollars and Cents $$ -
gamer931215 - 28.08.2011
Nice release/epic idea with the textdraws, but you should combine the filterscript with the include so people can directly include this into there gamemode!
Re: $$ Dollars and Cents $$ -
MadeMan - 29.08.2011
Quote:
Originally Posted by gamer931215
Nice release/epic idea with the textdraws, but you should combine the filterscript with the include so people can directly include this into there gamemode!
|
I wanted to keep the textdraw part in a separate filterscript so it doesn't mess up if people are using the include in gamemode AND in filterscripts too.
Re: $$ Dollars and Cents $$ -
Dazza - 29.08.2011
Can we change it to Pound and Pence?
Re: $$ Dollars and Cents $$ -
Crystyan12 - 29.08.2011
nice work.
GJ.