19.08.2010, 09:34
I forgot the "Float:"-s.
Tested.
pawn Код:
Float:randfloat(max){
new tmp = random(max*1000); //1000 gives back %.3f, 100 gives back %.2f and so on
new Float:result = floatdiv(float(tmp), 1000.0);
return Float:result;
}