GetNearestVehicle modification
#2

Hmm just check if v is not the player's vehicle id:
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;
}
Edit:

Just missed a thing. You might like to use IsPlayerInAnyVehicle first to check if the player is even in a vehicle.
Reply


Messages In This Thread
GetNearestVehicle modification - by Jstylezzz - 04.08.2012, 04:38
Re: GetNearestVehicle modification - by [KHK]Khalid - 04.08.2012, 04:44
Re: GetNearestVehicle modification - by Jstylezzz - 04.08.2012, 04:46
Respuesta: Re: GetNearestVehicle modification - by HarlemSAMP - 04.08.2012, 04:54

Forum Jump:


Users browsing this thread: 2 Guest(s)