17.02.2015, 23:07
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;
}