Function problem
#3

pawn Код:
stock GetPlayerDistanceToPoint(playerid,Float:x,Float:y,Float:z) // I have to define that on code (x, y, z) ...
{
    new Float:x1,Float:y1,Float:z1; // To get player pos
    new Float:dis; // Distance
    GetPlayerPos(playerid,x1,y1,z1); // Getplayer position
    dis = floatsqroot((x-x1)*(x-x1)+(y-y1)*(y-y1)+(z-z1)*(z-z1)); // Compare player distance to the point put. error may be here, though
    return floatround(dis);
}
Reply


Messages In This Thread
Function problem [Resolved] - by blackwave - 18.04.2011, 13:04
Re: Function problem - by Mauzen - 18.04.2011, 13:27
Re: Function problem - by blackwave - 18.04.2011, 13:41
Re: Function problem - by Mauzen - 18.04.2011, 13:51
Re: Function problem - by blackwave - 18.04.2011, 14:00

Forum Jump:


Users browsing this thread: 1 Guest(s)