Pos in Area
#1

Anyway to detect some coordinates inside of a certain area? Any code function or anything will help other than going into the area and /save'ing
Reply
#2

I'm not 100% sure i know what you mean, but if you mean a way to get an area' co-ords this tool is exelent for that.
Ultimate Visual Mapper
Reply
#3

Not that i mean like Get random positions in a area that is already created without some program or /save
Reply
#4

pawn Код:
stock IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z) // Made by ******
{
    new
        Float:px,
        Float:py,
        Float:pz;
    GetPlayerPos(playerid, px, py, pz);
    px -= x;
    py -= y;
    pz -= z;
    return ((px * px) + (py * py) + (pz * pz)) < (range * range);
}
That what you wanted?
Reply
#5

Uh maybe, i mean like you can just type some command like /boom then it will just detect some random place in certain area and make explosions
Reply
#6

isplayerincube?
Reply
#7

isn't that like some streamer function?
Reply
#8

Nope.

I'd say, use the "random()" function with GetPlayerPos to create explosions in an area near him, and use the MapAndreas plugin to get the ground positions.
Reply
#9

He wants this, lets say LV airport is a zone. He want to be able to get a random set of co-ords from inside that zone. Unfortunatly i havn't a clue how to do that
Reply
#10

You can calc the random points: randomx = zone_min_x + random(floatround(zone_max_x - zone_min_x));
The same for y then
But you may land in a house or so then. For good results, use MapAndreas, and set the z for the random x/y, too.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)