Vehicle(without player) InRangeOfPoint?
#8

pawn Code:
forward IsVehicleInRangeOfPoint(vehicleid,Float:Range,Float:x,Float:y,Float:z);
public IsVehicleInRangeOfPoint(vehicleid,Float:Range,Float:x,Float:y,Float:z)
{
    new Float:vx,Float:vy,Float:vz;
    GetVehiclePos(vehicleid,vx,vy,vz);
    return ((((vx-x)*(vx-x))+((vy-y)*(vy-y))+((vz-z)*(vz-z)) ) >= Range*Range );
}
As for the stock,but you can't use one loop for vehicles and players.
Reply


Messages In This Thread
Vehicle(without player) InRangeOfPoint? - by [DRD]Rodney - 11.08.2010, 12:32
Re: Vehicle(without player) InRangeOfPoint? - by [DRD]Rodney - 11.08.2010, 15:26
Re: Vehicle(without player) InRangeOfPoint? - by Kar - 11.08.2010, 15:33
Re: Vehicle(without player) InRangeOfPoint? - by [DRD]Rodney - 11.08.2010, 15:35
Re: Vehicle(without player) InRangeOfPoint? - by Cameltoe - 11.08.2010, 15:38
Re: Vehicle(without player) InRangeOfPoint? - by Sergei - 11.08.2010, 15:39
Re: Vehicle(without player) InRangeOfPoint? - by [DRD]Rodney - 11.08.2010, 15:41
Re: Vehicle(without player) InRangeOfPoint? - by [XST]O_x - 11.08.2010, 15:42
Re: Vehicle(without player) InRangeOfPoint? - by [DRD]Rodney - 11.08.2010, 15:43

Forum Jump:


Users browsing this thread: 1 Guest(s)