Random give me 80 same pos !
#1

Yo , I'd like to find how to fix that :
Код:
forward RandomLoot(playerid);
public RandomLoot(playerid)
{
	new
	       Float:pos[3],
  	       Float:x = FloatRand(-2786.5884,2918.8494),
  	       Float:y = FloatRand(-2906.1553,2906.4521),
  	       Float:z;

    for(new a; a < 80; a++)
    {
        MapAndreas_FindZ_For2DCoord(x, y, z);

        if(z >= 5.0 && z < 30.0)
		{
   			pos[0] = x;
			pos[1] = y;
			pos[2] = z;
           	CreateObject(2035, x, y, z,   0.00000, 0.00000, 0.00000);
			printf("Pos : %f,%f,%f.",x,y,z);//

        }
    }
}
I wanna make this but printf give me 80 same pos

Thanks for the future help !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)