28.11.2013, 11:04
I'm not really sure if this is what you want - it keeps the values between max and min but you don't know the height:
pawn Код:
forward Float: FRandomEx( Float: min, Float: max );
public OnFilterScriptInit( )
{
new
Float: rX = FRandomEx( 625.6991, 631.7022 ), // minX, maxX
Float: rY = FRandomEx( -1895.0369, -1888.4351 ) // minY, maxY
;
printf( "%f | %f", rX, rY );
return 1;
}
stock Float: FRandomEx( Float: min, Float: max ) // The original RandomEx by ******, edited for the floats.
{
return random( floatround( max ) - floatround( min ) ) + min;
}