15.09.2012, 06:20
pawn Код:
stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(minx < x < maxx && miny < y < maxy) return true;
return false;
}
pawn Код:
CMD:area(playerid,params[])
{
#pragma unused params
if(IsPlayerInArea(playerid, 400.5, 900.2, 134.223, 198.54523))
{
SendClientMessage(playerid, 0x00FF00FF, "You are in the right area!!");
}
else return SendClientMessage(playerid, 0xFF0000FF, "You're not in the right area -____-.");
return 1;
}