Posts: 547
Threads: 57
Joined: Dec 2010
I was wondering if there's a way to generate a random xyz coord within a zone. I can't seem to find how to do this and not sure how to do it.
Posts: 547
Threads: 57
Joined: Dec 2010
Quote:
Originally Posted by Konstantinos
https://sampforum.blast.hk/showthread.php?tid=591010
pawn Код:
// By AbyssMorgan GetRandomPointInRectangle(Float:minx,Float:miny,Float:maxx,Float:maxy,&Float:tx,&Float:ty){ tx = random(floatround(floatsqroot(floatpower(minx-maxx,2)))+1)+minx; ty = random(floatround(floatsqroot(floatpower(miny-maxy,2)))+1)+miny; }
The height can be found by MapAndreas or ColAndreas.
|
Thanks a lot, I just have one more question regarding the z coord. Which of the two plugins are better? I've used MapAndreas and experienced issues with it setting the z coord to 0 in certain areas and I've never tried ColAndreas.
Posts: 1,208
Threads: 36
Joined: Apr 2015
Quote:
Originally Posted by DTV
Thanks a lot, I just have one more question regarding the z coord. Which of the two plugins are better? I've used MapAndreas and experienced issues with it setting the z coord to 0 in certain areas and I've never tried ColAndreas.
|
ColAndreas is better use CA_FindZ_For2DCoord