25.06.2011, 18:00
Quote:
pawn Код:
![]() |
area:
pawn Код:
stock IsPlayerInArea(playerid, Float:min_x, Float:max_x, Float:min_y, Float:max_y)
{
new Float:pos[3]; //Save his position this this triple-var.
GetPlayerPos(playerid,pos[0],pos[1],pos[2]); //Save his X in pos[0], his Y in pos[1] and his Z in pos[2].
if(min_x <= pos[0] && max_x >= pos[0] && min_y <= pos[1] && max_y >= pos[1]) return 1; //Checks if the player is in the area, and if so returns 1.
return 0; //Else it returns 0.
}
picture
uploaded:
http://imageshack.us/photo/my-images/41/useryh.png/