How to put cents(xxx.00) in dialogbox - 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)
+--- Thread: How to put cents(xxx.00) in dialogbox (
/showthread.php?tid=627991)
How to put cents(xxx.00) in dialogbox -
DGRP - 04.02.2017
Hello, i just wanna ask, how do I put cents in dialogbox? Example i set Phonebook's price in 24/7 30000, it shows up $30000, how do I make it $300.00 instead of $30000, im confused cause it's using %d.
Re: How to put cents(xxx.00) in dialogbox -
TopShooter - 04.02.2017
PHP код:
stock FormatNumber(integer, const separator[] = ",")
{
new string[16];
valstr(string, integer);
if(integer >= 1000)
{
for(new i = (strlen(string) - 3); i > 0; i -= 3)
{
strins(string, separator, i);
}
}
return string;
}
Not tested but should work.
Re: How to put cents(xxx.00) in dialogbox -
DGRP - 04.02.2017
After that, what should I do with in CMD

etprice?