19.08.2010, 09:14
pawn Код:
stock randfloat(number)
{
new number2,string[156],string2[156];
number = random(number);
number2 = random(9);
format(string,sizeof(string),"%d.%d",number,number2);
new Float:var = floatstr(string);
format(string2,sizeof(string2),"%0.1f",var);
new Float:var2 = floatstr(string2);
return _: var2;
}
It always has like 7859185524.0
But notice it always has .0 at the end of the number.
Regards