24.06.2010, 18:14
In the top of your script:
In your filter-/gamemode init:
In the bottom of your script:
* coor. = coordinates
To get the coordinates, use;
pawn Код:
forward isPlayerInArea();
pawn Код:
SetTimer("isPlayerInArea", 1000, 1);
pawn Код:
public isPlayerInArea()
{
new Float:X, Float:Y, Float:Z;
for(new i=0; i < MAX_PLAYERS; i++)
{
GetPlayerPos(i, X, Y, Z);
if (X <= [max X-coor.] && X >= [max X-coor.] && Y <= [max Y-coor.] && Y >= [max Y-coor.])
}
}
To get the coordinates, use;
pawn Код:
if (strcmp("/pos", cmdtext, true) == 0)
{
new string1[256];
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
format(string1,sizeof(string1),"Position = X: %.0f , Y: %.0f , Z: %.0f",X,Y,Z);
SendClientMessage(playerid,COLOR_GREEN,string1);
return 1;
}