31 {
33 return false;
34
35 if( item.GetQuantity() <= 0 )
36 return false;
37
38 Car car = Car.Cast( target.GetObject() );
39 if( !car )
40 return false;
41
42 if( car.GetFluidFraction(
CarFluid.BRAKE ) >= 0.98 )
43 return false;
44
45 float distance = Math.AbsFloat(vector.Distance(car.GetPosition(), player.GetPosition()));
46
48 if( distance <= carS.GetActionDistanceFuel() )
49 {
50 array<string> selections = new array<string>;
51 target.GetObject().GetActionComponentNameList(target.GetComponentIndex(), selections);
52
53 for (int s = 0; s < selections.Count(); s++)
54 {
55 if ( selections[s] == carS.GetActionCompNameBrakes() )
56 {
57 return true;
58 }
59 }
60 }
61 return false;
62 }
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
bool IsTransport(ActionTarget target)