12.06.2009, 13:00
pawn Код:
stock Float:GetDistanceToVehicle(playerid,vehicleid) //By Darkrealm (Edited by Sacky and Gabriel "Larcius" Cordes)
{
if (IsPlayerConnected(playerid) && IsVehicleConnected(vehicleid))
{
new Float:x1,Float:y1,Float:z1;
GetVehiclePos(vehicleid,x1,y1,z1);
return GetDistanceToPoint(playerid,x1,y1,z1);
}
return INF_FLOAT;
}
number of arguments does not match definition
and
tag mismatch
in line
pawn Код:
return GetDistanceToPoint(playerid,x1,y1,z1);
pawn Код:
stock Float:GetDistanceBetweenPoints(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2) //By Gabriel "Larcius" Cordes
{
return floatadd(floatadd(floatsqroot(floatpower(floatsub(x1,x2),2)),floatsqroot(floatpower(floatsub(y1,y2),2))),floatsqroot(floatpower(floatsub(z1,z2),2)));
}
stock Float:GetDistanceToPoint(playerid,Float:x1,Float:y1,Float:z1) //By Gabriel "Larcius" Cordes
{
if (IsPlayerConnected(playerid))
{
new Float:x2,Float:y2,Float:z2;
GetPlayerPos(playerid,x2,y2,z2);
return GetDistanceBetweenPoints(x1,y1,z1,x2,y2,z2);
}
return INF_FLOAT;
}