Random spawn coords in a gangzone
#5

Nothing, I am getting tag mismatch warning at
PHP код:
return float(random(imax imin) + imin) / mul
Also I was looking for the FloatRandom function in YSI files, but I didn't manage to find the file to include yet.

EDIT
It compiles, but does not seem to work though

PHP код:
Float:frandom(Float:maxFloat:min 0.0dp 4)
{
    new
        
// Get the multiplication for storing fractional parts.
        
Float:mul floatpower(10.0dp),
        
// Get the max and min as integers, with extra dp.
        
imin floatround(min mul),
        
imax floatround(max mul);
    new 
Floatfloat(random(imax imin) + imin) / mul;
    
// Get a random int between two bounds and convert it to a float.
    
return x;

Reply


Messages In This Thread
Random spawn coords in a gangzone - by v1k1nG - 22.09.2018, 19:27
Re: Random spawn coords in a gangzone - by DarkBr - 22.09.2018, 23:26
Re: Random spawn coords in a gangzone - by v1k1nG - 23.09.2018, 11:13
Re: Random spawn coords in a gangzone - by v1k1nG - 24.09.2018, 23:59
Re: Random spawn coords in a gangzone - by v1k1nG - 26.09.2018, 11:58

Forum Jump:


Users browsing this thread: 3 Guest(s)