FormatMoney
#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


Messages In This Thread
FormatMoney - by Visio - 30.09.2012, 11:43
Re: FormatMoney - by RedFusion - 30.09.2012, 11:48
Re: FormatMoney - by Visio - 30.09.2012, 11:50
Re: FormatMoney - by RedFusion - 30.09.2012, 11:55
Re: FormatMoney - by Visio - 30.09.2012, 11:58

Forum Jump:


Users browsing this thread: 1 Guest(s)