[Include] $$ Dollars and Cents $$
#1

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

pawn Code:
#include <cents>
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
Reply
#2

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.
Reply
#3

Good job, both of you.
Reply
#4

Great work
Reply
#5

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
Reply
#6

Quote:
Originally Posted by suhrab_mujeeb
View Post
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.
Reply
#7

Quote:
Originally Posted by Grim_
View Post
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!
Reply
#8

wow nice
Reply
#9

Great work i'm going test it
Reply
#10

nice ideas bro'
Reply
#11

Why not Float:money ?
Reply
#12

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.
Reply
#13

Screen?
Reply
#14

Quote:
Originally Posted by [RLG]Zepp
Посмотреть сообщение
Screen?
Added.
Reply
#15

This is nice! Really helps when you are making Role Play Server Thanks a lot
Reply
#16

I like this idea. Great job
Reply
#17

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!
Reply
#18

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.
Reply
#19

Can we change it to Pound and Pence?
Reply
#20

nice work.

GJ.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)