#1

hi all

i have a money command

so when i type it shows $100000

i want to make it like this : 1,00,000

How to do it with commas between digits ??
Reply
#2

Код:
stock FormatNumber(inum, const sizechar[] = ",") // RyDeR`
{
	new string[16];
	format(string, sizeof(string), "%d", inum);
	
	for(new ilen = strlen(string) - 3; ilen > 0; ilen -= 3)
	{
		strins(string, sizechar, ilen);
	}
	return string;
}
Reply
#3

if (strcmp(cmd, "/jackpot", true) == 0)
{
new stringss[256];
format(stringss, sizeof(stringss), "[Lotto] The Lottery Jackpot is now at $%d. Type /lotto [Number] to purchase a lotto Ticket.", LottoJackpot);
SendClientMessage(playerid, COLOR_RED, stringss);
return 1;
}
how to make in this ?
Reply
#4

PHP код:
if (strcmp(cmd"/jackpot"true) == 0)
{
new 
stringss[256];
format(stringsssizeof(stringss), "[Lotto] The Lottery Jackpot is now at $%s. Type /lotto [Number] to purchase a lotto Ticket."FormatNumber(LottoJackpot));
SendClientMessage(playeridCOLOR_REDstringss);
return 
1;

Reply
#5

Код:
stock FormatNumber(inum, const sizechar[] = ",") // RyDeR`
{
	new string[16];
	format(string, sizeof(string), "%d", inum);
	
	for(new ilen = strlen(string) - 3; ilen > 0; ilen -= 3)
	{
		strins(string, sizechar, ilen);
	}
	return string;
}

if(strcmp(cmd, "/jackpot", true) == 0)
{
	new stringss[256];
	format(stringss, sizeof(stringss), "[Lotto] The Lottery Jackpot is now at $%s. Type /lotto [Number] to purchase a lotto Ticket.", 			FormatNumber(LottoJackpot));
	SendClientMessage(playerid, COLOR_RED, stringss);
	return 1;
}
Reply
#6

https://sampforum.blast.hk/showthread.php?tid=184328 not does Indian 1,00,000 only 100,000
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)