Getting minx/miny/maxx/maxy
#9

Quote:
Originally Posted by OmegaKiller72
Посмотреть сообщение
Quote:
Originally Posted by Aliassassin123456
Посмотреть сообщение
This is you specify the MinX, MinY, MaxX and MaxY. If you want to check a position is in your area with MinX, ... like a player's position you must use following:

Код:
IsInArea(Float:X, Float:Y, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
    if (X > MinX, && X < MaxX && Y > MinY && Y < MaxY) return 1;
    return 0;
}
Example of checking a player is in specified area or not:
Код:
new Float:exampleArea[4] = {1691.5800, -1120.7292, 1711.5800, -1100.7292};
new Float:Pos[3];

GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
if (IsInArea(Pos[0], Pos[1], exampleArea[0], exampleArea[1], exampleArea[2], exampleArea[3])) SendClientMessage(playerid, -1, "You're in area.");
else SendClientMessage(playerid, -1, "You aren't in area.");
Guys, i don't want "If im in range" i just want when i type a command it SendClientMessage me the minx miny maxx maxy

easy to make a command, but what code that gives me this coords??
Reply


Messages In This Thread
Getting minx/miny/maxx/maxy - by HuntingMan - 09.04.2016, 22:12
Re: Getting minx/miny/maxx/maxy - by Aliassassin123456 - 09.04.2016, 22:30
Re: Getting minx/miny/maxx/maxy - by HuntingMan - 09.04.2016, 22:31
Re: Getting minx/miny/maxx/maxy - by Aliassassin123456 - 09.04.2016, 22:37
Re: Getting minx/miny/maxx/maxy - by HuntingMan - 09.04.2016, 22:41
Re: Getting minx/miny/maxx/maxy - by OmegaKiller72 - 09.04.2016, 23:00
Re: Getting minx/miny/maxx/maxy - by Aliassassin123456 - 09.04.2016, 23:06
Re: Getting minx/miny/maxx/maxy - by NaS - 10.04.2016, 06:16
Re: Getting minx/miny/maxx/maxy - by HuntingMan - 10.04.2016, 10:17
Re: Getting minx/miny/maxx/maxy - by Sew_Sumi - 10.04.2016, 12:04

Forum Jump:


Users browsing this thread: 1 Guest(s)