09.07.2013, 17:51
Hello,
Does anyone know how to make function, like if you reach above 3 digts it will automaticly seperate it with a comma.
Example: If i have 1500, instead of that it will be replaced with: 1,500.
If i wern't clear enough, i can explain it as best as i can.
My Code is:
Does anyone know how to make function, like if you reach above 3 digts it will automaticly seperate it with a comma.
Example: If i have 1500, instead of that it will be replaced with: 1,500.
If i wern't clear enough, i can explain it as best as i can.
My Code is:
pawn Код:
new Random = MRandom(100), str[60];
if(Random > 25)
{
new Random1 = (random(3500 - 1000) + 700);
GivePlayerMoney(playerid, Random1);
format(str, sizeof(str), "Money: %d", Random1);
SendClientMessage(playerid, -1, str);
SendClientMessage(playerid, -1, "Above 25");
}
if(Random <= 25)
{
SendClientMessage(playerid, -1, "Less 25");
}