SA-MP Forums Archive
[Ajuda] isonplayerrangepoint nгo estб a dar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] isonplayerrangepoint nгo estб a dar (/showthread.php?tid=505410)



IsPlayerInRangeOfPoint nгo estб a dar - VeNuZ_ - 08.04.2014

pawn Код:
CMD:enter(playerid)
{
    for(new i = 0; i < MAX_HOUSES; i++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[i][EnterX], HouseInfo[i][EnterY], HouseInfo[i][EnterZ]))
        {
            if(HouseInfo[i][Lock] == true) return GameTextForPlayer(playerid, "TRANCADA", 5000, 1);
            if(HouseInfo[i][Buy] == false) return GameTextForPlayer(playerid, "PARA VENDA", 5000, 1);
            SetPlayerInterior(playerid, HouseInfo[i][nInt]);
            SetPlayerPos(playerid, HouseInfo[i][ExitX], HouseInfo[i][ExitY], HouseInfo[i][ExitZ]);
            pInfo[playerid][InCasa] = true;
            pInfo[playerid][WCasa] = HouseInfo[i][id];
        }
   
    }
    return 1;
}
CMD:exit(playerid)
{
    if(pInfo[playerid][InCasa] == true)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[pInfo[playerid][WCasa]][ExitX],HouseInfo[pInfo[playerid][WCasa]][ExitY], HouseInfo[pInfo[playerid][WCasa]][EnterZ]))
        {
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, HouseInfo[pInfo[playerid][WCasa]][EnterX], HouseInfo[pInfo[playerid][WCasa]][EnterY], HouseInfo[pInfo[playerid][WCasa]][EnterZ]);
            pInfo[playerid][WCasa] = -1;
            pInfo[playerid][InCasa] = false;
        }
        else SendClientMessage(playerid, -1, "cona rangepoint");
    }
    else SendClientMessage(playerid, -1, "cona incasa");
    return 1;
}
Tenho este seguintes comandos, compila bem, mas o InOnplayerrangepoint deveria funcionar, nгo ? porque ele entra coloca a variavel na casa q esta mas para sair diz que nгo esta na localizaзгo..


Re: isonplayerrangepoint nгo estб a dar - VeNuZ_ - 08.04.2014

Resolvido.