Does anyone know..
#7

Quote:
Originally Posted by rjjj
Посмотреть сообщение
You can make it using loops and functions do check and get coordinates .


I did it .



pawn Код:
stock IsPlayerInRangeOfVehicleModel(playerid, Float:range, vehiclemodel)
{
    new Float:VehiclePos[3];
    for(new x; x != MAX_VEHICLES; x++)
    {
        GetVehiclePos(x,VehiclePos[0],VehiclePos[1],VehiclePos[2]);
        if((GetVehicleModel(x) == vehiclemodel) && IsPlayerInRangeOfPoint(playerid, range, VehiclePos[0],VehiclePos[1],VehiclePos[2]))
        {
            return true;
        }
    }
    return false;
}


So, you can use like this:



Код:
if(IsPlayerInRangeOfVehicleModel(playerid, 10.0, 596))
To police cars .



I hope that i have helped .
Thankyou. You helped alot.
It works perfect.
Reply


Messages In This Thread
Does anyone know.. - by bartje01 - 01.07.2011, 15:45
AW: Does anyone know.. - by Nero_3D - 01.07.2011, 15:51
Re: Does anyone know.. - by bartje01 - 01.07.2011, 15:53
Re: Does anyone know.. - by BigETI - 01.07.2011, 16:03
Re: Does anyone know.. - by bartje01 - 01.07.2011, 16:27
Re: Does anyone know.. - by rjjj - 01.07.2011, 16:53
Re: Does anyone know.. - by bartje01 - 01.07.2011, 17:35

Forum Jump:


Users browsing this thread: 1 Guest(s)