Random spawn coords in a gangzone
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
From YSI:

Код:
new Float:x = FloatRandom(minx, maxx);
new Float:y = FloatRandom(miny, maxy);
Which file to include in the gamemode exactly? I have all of them already
Is it something like this?

PHP код:
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);
    
// Get a random int between two bounds and convert it to a float.
    
return float(random(imax imin) + imin) / mul;

This was an old post of yours
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: 1 Guest(s)