SA-MP Forums Archive
[NEED HELP] Need Realistic Money System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [NEED HELP] Need Realistic Money System (/showthread.php?tid=559130)



[NEED HELP] Need Realistic Money System - DiamondGold - 21.01.2015

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


Re: [NEED HELP] Need Realistic Money System - Lynn - 21.01.2015

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;
}



Re: [NEED HELP] Need Realistic Money System - DiamondGold - 21.01.2015

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


Re: [NEED HELP] Need Realistic Money System - DiamondGold - 22.01.2015

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


Re: [NEED HELP] Need Realistic Money System - S4MSUNG - 22.01.2015

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.