Refuel script kicks

Gideon

New Member
Hey guys, just got a new server, trying to figure out how to manage it- lotta crap to learn.

Have a dayz.st server, picked up a refuel script i liked that i want to implement. Modified the pbo and added scripts fine, once I pull up to a fuel tank, the refuel option shows up. However, as soon as I use it, i get kicked by battleye, even though i added a line to scripts.txt that came with it.

Logs show-
_vehicle_refuel_id = _vehicle addAction ["Refuel", "Scripts\kh_vehicle_refuel.sqf", [_amount], -1, "
03.03.2013 21:17:52: Gideon (xxx) xxx - #44 "unt;

if (_cfcust >= 1.0) then { _cfcust = 1.0; };

_target setFuel _cfcust;
};

titleFadeOut 1;

ib_refueling_in_progress = fal"
03.03.2013 21:17:52: Gideon (xxx) xxx - #8 "unt;

if (_cfcust >= 1.0) then { _cfcust = 1.0; };

_target setFuel _cfcust;
};

titleFadeOut 1;

ib_refueling_in_progress = fal"

Said script is pretty much-

Code:
if (!ib_refueling_in_progress) then {
 
        ib_refueling_in_progress = true;
 
        titleText ["Refueling", "PLAIN DOWN", 3];
 
        while {(vehicle _caller == _target) and (local _target)} do {
                private ["_velocity", "_cfcust"];
 
                _velocity = velocity _target;
                _cfcust = fuel _target;
 
                if ((_velocity select 0 > 1) or (_velocity select 1 > 1) or (_velocity select 2 > 1)) exitWith {
                        titleText ["Refueling Stopped", "PLAIN DOWN", 3];
                };
                if (_cfcust >= 1.0) exitWith {
                        titleText ["Done Refueling", "PLAIN DOWN", 3];
                };
 
                sleep 0.5;
 
                _cfcust = _cfcust + _amount;
 
                if (_cfcust >= 1.0) then { _cfcust = 1.0; };
 
                _target setFuel _cfcust;
        };
 
        titleFadeOut 1;
 
        ib_refueling_in_progress = false;
};

and the script exception text is
5 setFuel !"\"setFuel\"," !"z\addons\dayz_code\compile\local_setFuel.sqf" !"\"dayzSetFuel\"" !"dayzSetFuel_code" !"dayzSetFuel = _val;" !"Scripts\kh_actions.sqf" !"Scripts\kh_vehicle_refuel.sqf" !"if (_cfcust >= 1.0) then { _cfcust = 1.0; };"

Not sure what else to add to scripts.txt to get it to quit kicking, any help would be greatly appreciated
 
So, learning a lot over the last couple days-
Figured out the #44 i think- added !"_target setFuel _cfcust;" to the end of the setfuel line in scripts.txt, but the #8 is baffling me- the txt says 5 addWaypoint !"\"addWaypoint\"," for line 10, which makes no sense and I can't figure out whats tripping the 8 part. Any ideas would be greatly appreciated.
 
Just a creature comfort- there's plenty in the mod that doesnt quite make sense, I'm not going for ultra-realism here. 2017 would be better for that I think.

Plus, if you wanted to get really technical, half the vehicles use either deisel or JP-8, the others unleaded fuel yet you can fill them all with the same slosh that comes out of an apparent propane tank. I don't think full-service fuel is that much of a stretch lol. Though I guess i should add a tipping script then too in that case...
 
You need to open it with a text editor. Notepad works, but it clips the longer lines and screws em up, i like notepad++ better. Then just upload it back to the server with FTP and whalaa-no more kicks
 
Back
Top