04.08.2012, 04:44
Hmm just check if v is not the player's vehicle id:
Edit:
Just missed a thing. You might like to use IsPlayerInAnyVehicle first to check if the player is even in a vehicle.
pawn Код:
if(GetVehiclePos(v, VL, VO, VII) && v != GetPlayerVehicleID(playerid))
{
VL -= L, VO -= O, VII -= II;
temp = VL * VL + VO * VO + VII * VII;
if(temp < dis)
dis = temp, vehicleid = v;
}
Just missed a thing. You might like to use IsPlayerInAnyVehicle first to check if the player is even in a vehicle.