Customizing Auto Refuel (Help Needed)

For air vehicles it gives a popup saying you must turn your engine off to refuel. I didn't bother putting it in for land vehicles since it doesn't really effect anything (aside from immersion I guess?)

Edit: Added it for both, because why not?
 
Haha good job! Glad to see we got more people learning to code and script. Once you spend the time to learn, it becomes easier and you understand your server much better. :)
 
Now you sir, are a legend. Glad you stuck with it and got it working, give yourself more credit next time.
Here have my beans, you've deserved them :D
 
Great work you did here...
I was thinking about tweaking a bit more your script but im kind of noobish at scripting.

I changed a couple of lines in the actions.sqf...

Code:
_currentVehicle = vehicle player;
                _countFuel = (count ((position _currentVehicle) nearObjects ["Land_Fuel_tank_big", _distance]));
                _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_A_FuelStation_Feed", _distance]));
                _aircountFuel = (count ((position _currentVehicle) nearObjects ["Land_Fuel_tank_big", _airdistance]));
                _aircountFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["HeliHCivil", _airdistance]));
                _isNearFeed = _countFuel > 0;
                _isNearFeedair = _aircountFuel > 0;

My objective was to only refuel land vehicles at gas stations and air vehicles at a refueling station i created in NWA (HeliHCivil)....

So far i got it to refuel cars only at gas stations but helicopters refuel at the refueling station, gas stations and a large fuel tank with a ladder on it, i assume its the "Land_fuel_tank_stairs"...

Havent been able to test the cars on the refueling station yet...
 
I'm not going to lie to you, I was in way over my head just getting done what I got done. I'm not also entirely sure about how to go about helping you out. the "Land_Fuel_tank_big" bit could be whats causing the problem? I'm not entirely sure but you could try changing what you posted to
Code:
_currentVehicle = vehicle player;
                _countFuel = (count ((position _currentVehicle) nearObjects ["Land_A_FuelStation_Feed", _distance]));
                _aircountFuel = (count ((position _currentVehicle) nearObjects ["HeliHCivil", _airdistance]));
                _isNearFeed = _countFuel > 0;
                _isNearFeedair = _aircountFuel > 0;
and see what happens?
 
When trying to refuel I kept getting BattleEye restriction #8, i reverted to old refuel code and it worked (and yes I had the line in scripts.txt)

Dunno if anyone else had that issue, ill try redoing everything again from the top to be sure
 
Back
Top