07.04.2012, 21:11
hi,
i have this code:
It works but the problem is that sometimes the 2 pickups are created at the same place.
How could i prevent multiple pickups beeing created at the same coordinates?
Os there a way to do it?
+rep for help, thx
i have this code:
It works but the problem is that sometimes the 2 pickups are created at the same place.
How could i prevent multiple pickups beeing created at the same coordinates?
Os there a way to do it?
pawn Код:
//random coordiantes:
new Float:RandomPoint[2][5] =
{
{-1633.6028,-2244.1521,31.4766},
{-1635.2443,-1935.8237,115.1392}
};
//creation code:
for(new i; i < 1; i++)
{
RRush = random(sizeof(RandomPoint));
PickUp[1] = CreatePickup(1241,3,RandomPoint[RRush][0],RandomPoint[RRush][1],RandomPoint[RRush][2],0);
}
for(new i; i < 1; i++)
{
RRush = random(sizeof(RandomPoint));
PickUp[2] = CreatePickup(1212,3,RandomPoint[RRush][0],RandomPoint[RRush][1],RandomPoint[RRush][2],0);
}