Problem with getclosestcar
#4

i have this version: (didnt maded this one)


stock GetClosestVehicle(playerid) //By Darkrealm (edited by Gabrie "Larcius" Cordes)
{
if(IsPlayerConnected(playerid) && IsVehicleConnected(0))
{
new closestvehicle=0;
new Float:closestdist=GetDistanceToVehicle(playerid,0) ;
for(new vehicleid=0; vehicleid<MAX_VEHICLES; vehicleid++)
{
new Float:dist = GetDistanceToVehicle(playerid,vehicleid);
if ((dist < closestdist))
{
closestdist = dist;
closestvehicle = vehicleid;
}
}
return closestvehicle;
}
return -1;
}
Reply


Messages In This Thread
Problem with getclosestcar - by JulietaZ - 18.10.2010, 22:17
Respuesta: Problem with getclosestcar - by The_Moddler - 18.10.2010, 22:23
Re: Problem with getclosestcar - by JulietaZ - 18.10.2010, 22:40
Re: Problem with getclosestcar - by JulietaZ - 18.10.2010, 23:05
Respuesta: Problem with getclosestcar - by The_Moddler - 18.10.2010, 23:12
Re: Problem with getclosestcar - by JulietaZ - 19.10.2010, 02:49
Re: Problem with getclosestcar - by Babul - 19.10.2010, 06:27
Respuesta: Re: Problem with getclosestcar - by The_Moddler - 19.10.2010, 16:58
Re: Problem with getclosestcar - by JulietaZ - 19.10.2010, 21:09

Forum Jump:


Users browsing this thread: 3 Guest(s)