player in area.. but not a square area check.?.?
#1

Is it possible to do a check on an area with a circle radius instead of the max and min x and y co-ords?

so for example check a circluar area with a radius of 100..

is it at all possible?
Reply
#2

Nope.
Reply
#3

Use PlayerToPoint. I think it\'s in a circle radius
Reply
#4

Thanks X_Cutterz, thats exactly what i was after... thanks
Reply
#5

pawn Code:
Float:Distance3D(Float:PointA[], Float:PointB[], bool:sqrt = true)
{
  new Float:Dist[3];

  Dist[0] = PointA[0] - PointB[0];
  Dist[0] *= Dist[0];

  Dist[1] = PointA[1] - PointB[1];
  Dist[1] *= Dist[1];

  Dist[2] = PointA[2] - PointB[2];
  Dist[2] *= Dist[2];

  Dist[0] += Dist[1] + Dist[2];

  return sqrt ? floatsqroot(Dist[0]) : Dist[0];
}

pawn Code:
new Float:PlayerPos[3];
GetPlayerPos(playerid, PlayerPos[0], PlayerPos[1], PlayerPos[2]);

if (Distance3D(PlayerPos, Float:{ X, Y, Z }) < 100.0) //he is less than 100 meters to the point {X, Y, Z}
Reply
#6


Thanks 0rb for the reply, the PlayerToPoint was what i was looking for, its working as i wanted it to.

The info you posted i will keep in mind also, i think i might need it for some small DM areas im making... Thanks
Reply
#7

Theres IsPlayerInCircle..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)