24.06.2013, 14:50
just to the point, is there something wrong with my code ?
i tried to make some vehicle from script have infinite fuel, but the vehicle i wanted infinite fuel, they keep their fuel decreased,
sorry for bad english ..
pawn Код:
public FuelUpdate(){
for(new i = 1;i<MAX_VEHICLES;i++){
if(GetVehicleModel(i)){
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == 1 && !IsVIPcar(i) || !IsASepedah(GetVehicleModel(i)) || !isGarbageCar(i) || !isDMVCar(i)){
if(VehicleFuel[i] > 0) VehicleFuel[i]--;
else SetVehicleParamsEx(i,0,lights,alarm,doors,bonnet,boot,objective);
}
}
}
}
sorry for bad english ..