IsPlayerInArea Help
#4

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;
}
Example of it's use in a command:
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;
}
Reply


Messages In This Thread
IsPlayerInArea Help - by trapstar2020 - 15.09.2012, 05:55
Re: IsPlayerInArea Help - by CoDeZ - 15.09.2012, 06:01
Respuesta: IsPlayerInArea Help - by Marricio - 15.09.2012, 06:02
Re: IsPlayerInArea Help - by clarencecuzz - 15.09.2012, 06:20
Re: IsPlayerInArea Help - by trapstar2020 - 15.09.2012, 06:33
Re: IsPlayerInArea Help - by trapstar2020 - 15.09.2012, 06:42
Re: IsPlayerInArea Help - by JaKe Elite - 15.09.2012, 06:48
Re: IsPlayerInArea Help - by clarencecuzz - 15.09.2012, 07:11
Re: IsPlayerInArea Help - by trapstar2020 - 15.09.2012, 08:00
Re: IsPlayerInArea Help - by clarencecuzz - 15.09.2012, 08:07

Forum Jump:


Users browsing this thread: 2 Guest(s)