cmd:cuttree doesnt work, if player is inrange of a tree
#6

Replace to this and show server logs
pawn Код:
GetClosestTreeForPlayer(playerid)
{
    printf("treeid: %d",treeid);
    for(new i = 0; i < treeid; i++)
    {
        printf("%d - Range: %.4f - X: %.4f - Y: %.4f - Z: %.4f",i,GetPlayerDistanceFromPoint(playerid, tInfo[i][pXX], tInfo[i][pYY], tInfo[i][pZZ]),tInfo[i][pXX], tInfo[i][pYY], tInfo[i][pZZ]);
        if(IsPlayerInRangeOfPoint(playerid, 3.0, tInfo[i][pXX], tInfo[i][pYY], tInfo[i][pZZ]))
            return i;
    }

    return -1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)