[NEED HELP] Need Realistic Money System
#1

Hello guys, do you have realistic money system? I need that script because I want to make a realistic Roleplay Gamemode. The system like money bar with a comma or dot, and how about the '/pay' command script?

Sorry for my bad English & btw I'm new in script.
Thanks before
Reply
#2

Nothing fancy, but this is the basic concept.
Assuming you're leaving the last two 0's open. I.E 100.00 (10,000$ = $100.00)
pawn Код:
CMD:pay(playerid, params[])
{
    new id, amount, cash;
    if(sscanf(params,"ud",id, amount)) return SendClientMessage(playerid, -1,"USAGE: /pay [playerid][amount]");
    else
    {
        cash = GetPlayerMoney(playerid)*100;
        if(amount >= cash) {
            GivePlayerMoney(id, amount*100); // This will keep the other 2 0's at a 0 value. i.e 10$ = 10.00
            GivePlayerMoney(playerid, -amount*100);// This will do the same thing as above but removing instead.
        }
        else return SendClientMessage(playerid, -1, "You do not have that much!");
    }
    return 1;
}
Reply
#3

Thx, and how about the money bar, how to add comma or dot? Using textdraw or other kind of things, but I think textdraw cannot be place at money bar. Can u please help me? Thx before
Reply
#4

Bump. Can anyone pls help me? I need it to make realistic roleplay gamemode.
Reply
#5

Quote:
Originally Posted by DiamondGold
Посмотреть сообщение
Thx, and how about the money bar, how to add comma or dot? Using textdraw or other kind of things, but I think textdraw cannot be place at money bar. Can u please help me? Thx before
There is already a money label in the default gta interface.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)