[ Help ] IsPlayerInArea -
Nedda - 23.04.2014
Hello.. How to record if(!IsPlayerInArea(playerid, x y z)) cordinates ?
Thx ..
Re: [ Help ] IsPlayerInArea -
Rockyyy - 23.04.2014
Replace "IsPlayerInArea" with "IsPlayerInRangeOfPoint"
Re: [ Help ] IsPlayerInArea -
Nedda - 23.04.2014
I do not want, I will exclusively IsPlayerInArea .. Helppp
Re: [ Help ] IsPlayerInArea -
Rockyyy - 23.04.2014
same usage
Re: [ Help ] IsPlayerInArea -
Nedda - 23.04.2014
Quote:
Originally Posted by Ralfie
Hello, IsPlayerInArea is used with 4 coordinates
Lower X, Lower Y, Max X, Max Y
Код:
_________________ Point 2;
| |
| This is |
| the area that |
| you want |
| to define! |
|________________|
Point 1;
Get the coords of Point 1 by /save, then go to the higher corner and /save, then add the X, Y
|
Point 1;AddStaticVehicle(411,1070.0337,-1270.5579,13.3460,314.2307,79,1); // 1
Point 2;AddStaticVehicle(411,1207.6150,-1158.7721,23.3225,44.6579,79,1); // 2
How to add in IsPlayerInArea ?
Re: [ Help ] IsPlayerInArea -
Konstantinos - 23.04.2014
pawn Код:
stock IsPlayerInArea(playerid, Float: MinX, Float: MinY, Float: MaxX, Float: MaxY)
{
new Float: X, Float: Y, Float: Z;
return GetPlayerPos(playerid, X, Y, Z) && (MinX < X <= MaxX && MinY < Y <= MaxY);
}
and
pawn Код:
if (IsPlayerInArea(playerid, 1070.0337, -1270.5579, 1207.6150, -1158.7721))
{
// in area
}
Re: [ Help ] IsPlayerInArea -
Nedda - 23.04.2014
Quote:
Originally Posted by Ralfie
Hello, IsPlayerInArea is used with 4 coordinates
Lower X, Lower Y, Max X, Max Y
Код:
_________________ Point 2;
| |
| This is |
| the area that |
| you want |
| to define! |
|________________|
Point 1;
Get the coords of Point 1 by /save, then go to the higher corner and /save, then add the X, Y
|
Quote:
Originally Posted by Konstantinos
pawn Код:
stock IsPlayerInArea(playerid, Float: MinX, Float: MinY, Float: MaxX, Float: MaxY) { new Float: X, Float: Y, Float: Z; return GetPlayerPos(playerid, X, Y, Z) && (MinX < X <= MaxX && MinY < Y <= MaxY); }
and
pawn Код:
if (IsPlayerInArea(playerid, 1070.0337, -1270.5579, 1207.6150, -1158.7721)) { // in area }
|
Код:
if(!IsPlayerInArea(playerid, 1505.077, -1752.921, 1638.176, -1587.116)) return SCM(playerid, GRAD2, "{FF0000}(greska) {FFFFFF} Ne nalazite se u svojoj bazi!");
I need this but not stock ..
Re: [ Help ] IsPlayerInArea -
Konstantinos - 23.04.2014
Remove the stock then but it doesn't matter anyway.