14.05.2014, 07:09
I think this will work, Not sure tbh.
pawn Код:
stock GiveMoney(playerid,money)
{
new str[64];
if(money < 10) { format(str,sizeof(str),"+$00000000%i",money); }
else if(money < 100) { format(str,sizeof(str),"+$0000000%i",money); }
else if(money < 1000) { format(str,sizeof(str),"+$000000%i",money); }
else if(money < 10000) { format(str,sizeof(str),"+$00000%i",money); }
else if(money < 100000) { format(str,sizeof(str),"+$0000%i",money); }
else if(money < 1000000) { format(str,sizeof(str),"+$000%i",money); }
else if(money < 10000000) { format(str,sizeof(str),"+$00%i",money); }
else if(money < 100000000) { format(str,sizeof(str),"+$0%i",money); }
else if(money < 1000000000) { format(str,sizeof(str),"+$%i",money); }
TextDrawSetString(ShowMoneyEarned[playerid],str);
pInfo[playerid][pMoney] += money;
TextDrawShowForPlayer(playerid, ShowMoneyEarned[playerid]);
return 1;
}