[Pedido] IsPlayerInProxArea
#1

Alguem pode me arrumar? й meu ultimo pedido de hoje

pawn Код:
stock IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
    new Float:X, Float:Y, Float:Z;

    GetPlayerPos(playerid, X, Y, Z);
    if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY) {
        return 1;
    }
    return 0;
}
Esse й o IsPlayerInArea - Checa se o player estб em uma arйa) - tem como fazer uma para mim mais ou menos assim:

IsPlayerInProxArea(playerid, area, MinX, MinY, MaxX, MaxY).

Plz.. Sу quero para estudos. Vou por os devidos creditos!
Reply
#2

UP!!
Reply
#3

O parвmetro area se refere a que ?
Reply
#4

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
O parвmetro area se refere a que ?
Como se fosse o InPlayerInRangeOfPoint.

Exemplo: IsPlayerInProxArea(playerid,2.0,x,y,x,y);
Reply
#5

й sу vocк acrescentar a range na hora de obter o valor da posiзгo, ou seja vocк simula uma posiзгo
Nгo testei mas creio q deva funcionar '-'

pawn Код:
stock IsPlayerProxArea(playerid,Float:range,Float:MinX,Float:MinY,Float:MaxX,Float:MaxY)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x + range,y + range,z);
    if(x >= MinX && x <= MaxX && y >= MinY && y <= MaxY)
    {
        return 1;
    }
    return 0;
}
Reply
#6

pawn Код:
isPlayerGangZone(pid, Float: gz_x, Float: gz_y,  Float: gz_x2, Float: gz_y2)
{
    static Float:X, Float:Y, Float:Z;
    GetPlayerPos(pid, X, Y, Z);
    if (X > gz_x && X < gz_x2 && Y > gz_y && Y < gz_y2)
        return true;
       
    return 0;
}
Esta criei ano retrasado ( 2011 ).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)