RangeOfPoint
#1

So I created a gang zone
pawn Код:
new GZ_ZONE1;
GZ_ZONE1 = GangZoneCreate(-128.90625,2371.09375,492.1875,2617.1875);
GangZoneShowForAll(GZ_ZONE1, 0x00FF0083);
But it is not a gang zone so let me change that.

pawn Код:
new HOME1;
HOME1 = GangZoneCreate(-128.90625,2371.09375,492.1875,2617.1875);
GangZoneShowForAll(HOME1, 0x00FF0083);
If the player is in this area how would I do it
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, -128.90625,2371.09375,492.1875,2617.1875)
Would I do it like this?

Basically what I want to do is if the player is in that area he is not allowed to spawn any planes/helicopters I think I know how to do that bit.

pawn Код:
CMD:plane(playerid)
{
          if(IsPlayerInRangeOfPoint(playerid, -128.90625,2371.09375,492.1875,2617.1875)
           {
// GIVE THE PLAYER THE VEHICLE
         }
         else SendClientMessage(playerid, RED, "You are not allowed to spawn a airplane here...");
         return 1;
}
Would that be correct?
Reply
#2

Take a look at this: https://sampforum.blast.hk/showthread.php?tid=222283
Reply
#3

pawn Код:
if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY) {
Can someone explain it a bit more

And thank you Prodigy thats just what I was looking for.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)