12.06.2016, 16:33
Hello, i am trying to seperate the moneys in /stats by commas, i have made this but for some reason it doesnt work, i hope that someone can help me 

pawn Код:
new totalwealth;
totalwealth = PlayerInfo[targetid][pCash]+PlayerInfo[targetid][pAccount];
pawn Код:
format(string, sizeof(string), "Details: "COL_WHITE"Money:[$%d] Bank:[$%d] Total wealth:[$%d] Job:[%s]",Comma(PlayerInfo[targetid][pCash]),Comma(PlayerInfo[targetid][pAccount]),Comma(totalwealth),jtext);
SendClientMessage(playerid, COLOR_SZR,string);
pawn Код:
stock Comma(numbers)
{
new temp[24],counter = -1;
valstr(temp,numbers);
for(new i = strlen(temp);i > 0; i--)
{
counter++;
if(counter == 3)
{
strins(temp,",",i);
counter = 0;
}
}
return temp;
}