01.12.2011, 17:08
Hello,
I have a problem. I'm trying to make a random location, which is not close to the start.
This is my code:
Random Locations:
And i have these ints:
Right, once it finds one random location at the start, the Random locations get saved into the above floats.
How can i check that the random location for the next random location, is no where near to the Pos1, Pos2, Pos3?
I hope you understand what i mean. What could i do to check?
Thanks!
+rep will be given.
I have a problem. I'm trying to make a random location, which is not close to the start.
This is my code:
Random Locations:
pawn Код:
new Locations[][ALocation] =
{
{"LS Gate 1", 1738.3202,-2425.8325,14.4741}, // Location 1
{"LS Gate 2", 1641.5100,-2423.1333,14.4730}, // Location 2
{"LS Gate 3", 1562.1697,-2428.0403,14.4765}, // Location 3
{"SF Gate 2", 1574.6689,1539.6458,11.7481}, // Location 4
{"SF Gate 3", -1382.1825,-225.9442,15.0717}, // Location 5
{"LV Gate 2", -1323.3275,-255.5832,15.0703} // Location 6
};
pawn Код:
new Float:Pos1[MAX_PLAYERS];
new Float:Pos2[MAX_PLAYERS];
new Float:Pos3[MAX_PLAYERS];
How can i check that the random location for the next random location, is no where near to the Pos1, Pos2, Pos3?
I hope you understand what i mean. What could i do to check?
Thanks!
+rep will be given.