FormatMoney
#1

hy,i want to do some like that when i type /stats

i try with https://sampforum.blast.hk/showthread.php?tid=155801 but i can't do
that's my script

Код:
new account = PlayerInfo[targetid][pAccount];
new cash =  GetPlayerMoney(targetid);
format(coordsstring, sizeof(coordsstring), "Cash:[$%d] Bank:[$%d]", cash, account);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
Reply
#2

What's your problem then? seems to work for me
Reply
#3

what i need to do in my script to show money like in the picture?
Reply
#4

pawn Код:
COMMAND:stats(playerid, params[])
{
    new id;
    if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED,"> Usage: /Stats <id>");
    if(IsPlayerConnected(id) && !IsPlayerNPC(id))
    {
        new account = PlayerInfo[id][pAccount];
        new cash =  GetPlayerMoney(id);
        new coordsstring[64];
        format(coordsstring, sizeof(coordsstring), "Cash:[$%d] Bank:[$%d]", cash, account);
        SendClientMessage(playerid, COLOR_WHITE, coordsstring);
    }
    else SendClientMessage(playerid,COLOR_RED,"> Invalid PlayerID");
    return 1;
}
you need a banksystem, sscanf & zcmd.
Reply
#5

i want to do some like in this picture
http://i46.tinypic.com/106zdzm.png
the money to look like 1.000.000
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)