Zone & random positions
#2

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;
}
Reply


Messages In This Thread
Zone & random positions - by iJumbo - 28.11.2013, 00:28
Re: Zone & random positions - by Konstantinos - 28.11.2013, 11:04
Re: Zone & random positions - by iJumbo - 28.11.2013, 14:30
Re: Zone & random positions - by Konstantinos - 28.11.2013, 14:39

Forum Jump:


Users browsing this thread: 2 Guest(s)