Aidem Posted October 31, 2013 Report Share Posted October 31, 2013 I have the repair / refuel script but for some reason after server restart the vehicle reset to the state it was before the Refuel/Repair Anyone has fix for this? Link to comment Share on other sites More sharing options...
Aidem Posted October 31, 2013 Author Report Share Posted October 31, 2013 Would this work if i add this call server_updateObject; after you get the Refuel and repair has end in the Repair.sqf? private ["_target", "_caller", "_id"]; _target = _this select 0; _caller = _this select 1; _id = _this select 2; _args = _this select 3; _amount = _args select 0; _amount2 = _args select 1; if (isNil "ib_refueling_in_progress") then { ib_refueling_in_progress = false; }; if (!ib_refueling_in_progress) then { ib_refueling_in_progress = true; titleText ["Refueling and Repairing", "PLAIN DOWN", 3]; while {(vehicle _caller == _target) and (local _target)} do { private ["_velocity", "_cfcust","_cfcust2"]; _velocity = velocity _target; _cfcust = fuel _target; _cfcust2 = damage _target; if ((_velocity select 0 > 1) or (_velocity select 1 > 1) or (_velocity select 2 > 1)) exitWith { titleText ["Refueling and Repairs Stopped", "PLAIN DOWN", 3]; }; if (_cfcust >= 1 and _cust2 <= 0) exitWith { titleText ["Refueling and Repairs Completed", "PLAIN DOWN", 3]; }; sleep 0.5; _cfcust = _cfcust + _amount; if (_cfcust >= 1.0) then { _cfcust = 1.0; }; _target setFuel _cfcust; _cfcust2 = _cfcust2 - _amount2; if (_cfcust2 <= 0.0) then { _cfcust2 = 0.0; }; _target setDamage _cfcust2; }; titleFadeOut 1; ib_refueling_in_progress = false; }; But where do i place it :s and how? Something like this? if ((_velocity select 0 > 1) or (_velocity select 1 > 1) or (_velocity select 2 > 1)) exitWith { titleText ["Refueling and Repairs Stopped", "PLAIN DOWN", 3]; _target call server_updateObject; }; Link to comment Share on other sites More sharing options...
Aidem Posted October 31, 2013 Author Report Share Posted October 31, 2013 Also figured out that this script sets the Damage Value in the database to 0.0 But it leaves the Hitpoint value to what it is, and thats why on server restart the hitpoints get called back from the database Also is this a possible fix? _target setFuel _cfcust; _cfcust2 = _cfcust2 - _amount2; if (_cfcust2 <= 0.0) then { _cfcust2 = 0.0; }; _target setDamage _cfcust2; _target setHit []; Link to comment Share on other sites More sharing options...
outbreaker Posted November 22, 2013 Report Share Posted November 22, 2013 Hi, do you have this option already tested ? MfG Link to comment Share on other sites More sharing options...
Axe Cop Posted November 22, 2013 Report Share Posted November 22, 2013 That does not work because the script only sets the damage to 0 and is not repairing the damaged parts itself so it won't get saved to the database because it's not really fixed (you can see that if you use the repair option after your have "repaird" the vehicle with that script). I would suggest using my new script that solves all your issues, one reason I did it myself, check it out here: http://dayzepoch.com/forum/index.php?/topic/3935-release-vehicle-service-point-refuel-repair-rearm-script/ Link to comment Share on other sites More sharing options...
Nazgul Posted November 30, 2014 Report Share Posted November 30, 2014 Axe Cop do you know why vehicles self reapair ? i have this strange bug, you just click in reapair and done... vehicle green, this bug its f... me off man could you help ? thx Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now