SA-MP Forums Archive
Radar - 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: Radar (/showthread.php?tid=600544)



Radar - Ugaustin - 09.02.2016

Radar Problem, everything good I see it like 56.000000 .. I don't need the zero's .. only 56 km..thats all.. %d


Re: Radar - AbyssMorgan - 09.02.2016

%.0f - 56
%.1f - 56.0


Re: Radar - Guzuta - 09.02.2016

You must use format for that %f , for more wiki.sa-mp.com/wiki/Format


Re: Radar - Ugaustin - 09.02.2016

thanks !!! REPPED !


Re: Radar - Ugaustin - 09.02.2016

ooh I forgot.. and if I want 2 digit like this " 1.000.000" ??


Re: Radar - Joron - 09.02.2016

Quote:
Originally Posted by Ugaustin
Посмотреть сообщение
ooh I forgot.. and if I want 2 digit like this " 1.000.000" ??
I think it would be the same..


Re: Radar - Ugaustin - 09.02.2016

nope.. I tried..


Re: Radar - GangstaSunny - 10.02.2016

PHP код:
format(string,sizeof(string),"%f",result);
if(
strlen(string) == 7)//So the minimum is 1.000.000 (1000000) and the max. is 9.999.999 (9999999)
{
//now work with "strmid" and "strpack". Iam not a math genie at 2:50 PM