21.04.2012, 17:43
create some function, so you only need to input the coordinates
In your example it would be
pawn Код:
stock IsXYInArea(Float: X, Float: Y, const Float: min_x, const Float: max_x, const Float: min_y, const Float: max_y) {
return (
(min_x <= X <= max_x) &&
(min_y <= Y <= max_y)
);
}
pawn Код:
// x, y, min_x, max_x, min_y, max_y
if(IsXYInArea(x, y, -81.0595, 436.3784, 2476.4946, 2528.7734)) {
SendClientMessage(playerid,COLOR_GREY,"Test");
}