number digit (s digit) - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: number digit (s digit) (
/showthread.php?tid=159485)
number digit (s digit) -
zeli - 13.07.2010
Hello!
I am looking for a code, which converts a number like this:
12000 -> 12 000 or 12.000
(if the number is bigger, then like this: 123456789 -> 123.456.789)
I didnt know how i should search for it, so i ask for your help!
Re: number digit (s digit) -
[DK]JaloNik - 13.07.2010
I don't think there is such converter.. :P
Re: number digit (s digit) -
MikkelGutten - 13.07.2010
Use a string splitter.
Re: number digit (s digit) -
legodude - 13.07.2010
there is such a converter wait while ima search it
EDIT:cant find it... search on wiki im sure it is there
Re: number digit (s digit) -
RyDeR` - 13.07.2010
It's possible to make a coverter in PAWN.
Re: number digit (s digit) -
[DK]JaloNik - 13.07.2010
Quote:
Originally Posted by RyDeR`
It's possible to make a coverter in PAWN.
|
Yeah pay Ryder 50 $ and he makes one lol..... :P
Re: number digit (s digit) -
zeli - 14.07.2010
Zezombia at the Little Coding thread made the code.
I paste it, if someone needs it, he can find it.
pawn Код:
ConvertNumber(number)
{
new num[16], count;
valstr(num, number);
for(new i = strlen(num); i > 0; i--)
{
if(count == 3)
{
count = 0;
strins(num, ".", i);
}
count++;
}
return num;
}
Re: number digit (s digit) -
RyDeR` - 14.07.2010
Quote:
Originally Posted by [DK]JaloNik
Yeah pay Ryder 50 $ and he makes one lol..... :P
|
lol, not that. I'd do it free but he found one, so .. ^^