13.03.2015, 08:59
Has anybody the code from the title?
IsVehicleInFrontOfVehicle(veh1, veh2, range)
IsVehicleInFrontOfVehicle(veh1, veh2, range)
stock IsVehicleInFrontOfVehicle(veh1, veh2, Float:range)
{
new Float:a,Float:x,Float:y,Float:z;
GetVehiclePos(veh1,x,y,z);
GetVehicleZAngle(veh1, a);
x += (range * floatsin(-a, degrees));
y += (range * floatcos(-a, degrees));
return (GetVehicleDistanceFromPoint(veh2,x,y,z) <= 3.0) ? true : false;
}
stock IsVehicleInFrontOfVehicle(veh1, veh2, Float:range = 5.0)
...
return (GetVehicleDistanceFromPoint(veh2,x,y,z) <= range) ? true : false;