Problem with getclosestcar
#1

I just wanted to test some stuff before do something with this code, but for some reason it allways returns ID -1 and the distance its like 11600(and then numbers that changes) even when im inside the car it gives a really long number, isnt supossed when im very closer to the car it must have distance 0 or something?....


if (strcmp(cmdtext, "/test", true)==0)
{

new carids = GetClosestCar(playerid);
new Float:dist= GetDistanceFromPlayerToVehicle(playerid,carids);
new stringa[256];
format(stringa, sizeof stringa, "Distancia a vehiculo mas cercano: %i Id:[%i]", dist,carids);

SendClientMessage(playerid, 0xCCFFDD56, stringa);
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: 7 Guest(s)