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



Float - Problem - Akcent_Voltaj - 23.03.2013

i need to make a Float.and i dont know how..For Exemple:its 66.0.then 66.1,then 66.2..aand soo on!please help!i need to make it a FLOAT!not to print and spam log..

PHP код:
    new Float:distance;
    
distance float(CarInfo[vehicleid][cKM]);
             
format(TD_String25"%01.01f",distance); 



Re: Float - Problem - Scenario - 23.03.2013

The code below basically creates a new float variable set at 0.0, then until the float equals 5.0, it will add 0.1 then print the value.

pawn Код:
new
    Float:distance = 0.0
;

while(distance < 5)
{
    distance += 0.1;
    printf("%01.02f", distance);
}



Re: Float - Problem - Akcent_Voltaj - 23.03.2013

dosent work..


Re: Float - Problem - Akcent_Voltaj - 23.03.2013

it goes fast the km..i can make 50km in 20 seconds....


PHP код:
(floatround(floatmul(((floatmul(floatsqroot(floatadd(floatadd(floatpower(PosX2), floatpower(PosY2)),  floatpower(PosZ2))), 1000.0) * 1)),10)) / 8600);//what does 170.0 mean?and *1?and 1000 and / 3600? 
please help!