19.02.2013, 16:27
Quote:
pawn Код:
|
You are returning distance which is Float, so the function needs to be Float.
So this function should look like this:
pawn Код:
forward Float:GetDistanceBetweenPlayers(p1, p2);
public Float:GetDistanceBetweenPlayers(p1, p2)
{
new Float:x2,Float:y2,Float:z2;
if (!IsPlayerConnected(p1) || !IsPlayerConnected(p2)) return -1.0;
GetPlayerPos(p2,x2,y2,z2);
new Float:distance = GetPlayerDistanceFromPoint(p1, x2, y2, z2);
return distance;
}