Checking if a player is near ANY vehicle.
#4

pawn Code:
forward GetClosestVehicle(carid);
public GetClosestVehicle(carid)
{
    new x,Float:dis,Float:dis2,car;
    car = 0;
    dis = 99999.99;
    for ( x = 0; x < MAX_VEHICLES; x++ )
    {
        if(x != carid)
        {
            dis2 = GetDistanceBetweenVehicles(x,carid);
            if(dis2 < dis && dis2 < 8.0)
            {
                dis = dis2;
                car = x;
            }
        }
    }
    return car;
}
i dont under your english becoz i am not good at english but i think you want that function...
Reply


Messages In This Thread
Checking if a player is near ANY vehicle. - by vIBIENNYx - 21.09.2012, 17:29
Re: Checking if a player is near ANY vehicle. - by C00K13M0N$73R - 21.09.2012, 17:35
Re: Checking if a player is near ANY vehicle. - by vIBIENNYx - 21.09.2012, 17:38
Re: Checking if a player is near ANY vehicle. - by Danyal - 21.09.2012, 17:40
Re: Checking if a player is near ANY vehicle. - by vIBIENNYx - 21.09.2012, 17:45
Re: Checking if a player is near ANY vehicle. - by milanosie - 21.09.2012, 17:48
Re: Checking if a player is near ANY vehicle. - by vIBIENNYx - 21.09.2012, 17:50

Forum Jump:


Users browsing this thread: 2 Guest(s)