How to "mark" coordinates? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to "mark" coordinates? (
/showthread.php?tid=332339)
How to "mark" coordinates? -
PawnoQ - 07.04.2012
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?
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);
}
+rep for help, thx
Re: How to "mark" coordinates? -
Ezay - 08.04.2012
Mark Coordinates?
I Dont Understand you very Well, but
/save (Comment) - Saves to Coordinates to a Save Log File. (Located in your Documents/GTA User Files/SAMP
The Coordinates Look Close(ish) to Each Other, So, I Dont Really Know What you Mean.
Cheers Ezay
Re: How to "mark" coordinates? -
PawnoQ - 08.04.2012
as you can see in the code above im trying to create pickups using a randomizing function.
So due to this randomizing the pickups are spawned somewhere random at the coordinates given in the array.
But sometimes 2 or more pickups are spawned at the same random place.
Just want to know how to prevent this.
Means if a random position taken out of the array is already used for a pickup i dont want it to be available for further pickups anymore.
U know what i mean?