FormatMoney - 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: FormatMoney (
/showthread.php?tid=381671)
FormatMoney -
Visio - 30.09.2012
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);
Re: FormatMoney -
RedFusion - 30.09.2012
What's your problem then? seems to work for me
Re: FormatMoney -
Visio - 30.09.2012
what i need to do in my script to show money like in the picture?
Re: FormatMoney -
RedFusion - 30.09.2012
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.
Re: FormatMoney -
Visio - 30.09.2012
i want to do some like in this picture
http://i46.tinypic.com/106zdzm.png
the money to look like 1.000.000