17.01.2010, 09:18
It didnt work. But you gave me the idea to try it with Public.
This is working. Problem SOLVED.
pawn Код:
forward Float:PlayerDistanceToPoint(playerid,Float:x,Float:y,Float:z);
public Float:PlayerDistanceToPoint(playerid,Float:x,Float:y,Float:z)
{
new Float:px,Float:py,Float:pz;
GetPlayerPos(playerid,px,py,pz);
return floatsqroot ( ( (x-px)*(x-px) ) + ( (y-py)*(y-py) ) + ( (z-pz)*(z-pz) ) );
}