Nox Posted July 2, 2013 Report Share Posted July 2, 2013 Hello Many customer have an issue about refuel truck .... On my test server , all work, on my dedicated server it's doesn't work Test server = Dedicated Server some clues ? Hypothese : Refuel Truck in database Link to comment Share on other sites More sharing options...
Bungle Posted July 2, 2013 Report Share Posted July 2, 2013 Not a fix but as a work around. A custom Refuel Script and add in the vehicle classes? You can use the kh_actions and kh_vehicle_refuel from the custom pack as an example. _distance = 15; // Distance from object to display Refuel Message _amount= 0.01; // Amount of fuel to add per loop. Default was 0.005 while {true} do { if (!isNull player) then { private ["_currentVehicle", "_isNearFeed", "_countFuel"]; _currentVehicle = vehicle player; // Refuel Trucks _countFuel = (count ((position _currentVehicle) nearObjects ["UralRefuel_TK_EP1_DZ", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["V3S_Refuel_TK_GUE_EP1_DZ", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["KamazRefuel_DZ", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["MtvrRefuel_DES_EP1_DZ", _distance])); // Fuel Tanks/Stations _countFuel = (count ((position _currentVehicle) nearObjects ["Land_Fuel_tank_big", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_A_FuelStation_Feed", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_Ind_TankSmall", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_Ind_TankSmall2", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_Ind_TankSmall2_EP1", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_fuel_tank_stairs", _distance])); _isNearFeed = _countFuel > 0; Not tested however, but should work I guess. acogshot and Nox 2 Link to comment Share on other sites More sharing options...
Nox Posted July 2, 2013 Author Report Share Posted July 2, 2013 I Try asap THX Bungle Link to comment Share on other sites More sharing options...
Achmed Posted July 2, 2013 Report Share Posted July 2, 2013 Have you checked the vehicle names are the same in each db as i think it could be one has _dz after the name to stop the auto refuel Nox 1 Link to comment Share on other sites More sharing options...
vbawol Posted July 3, 2013 Report Share Posted July 3, 2013 Just reverse this change http://dayzepoch.com/wiki/index.php/Server_Installation_Instructions#SQL_to_update_from_1.0_to_1.0.1 and you will have working auto refuel on fuel trucks. Also change the dynamic_vehicle.sqf to reference the non _DZ versions. Nox 1 Link to comment Share on other sites More sharing options...
Nox Posted July 3, 2013 Author Report Share Posted July 3, 2013 Thx all, i've rename all refuel_DZ in refuel, then they try :) Epoch the BEST community Link to comment Share on other sites More sharing options...
Nox Posted July 3, 2013 Author Report Share Posted July 3, 2013 Thx to every Body it's work now like a charm I del _DZ every where i've Refuel_DZ. Thx ;) You are the Best Link to comment Share on other sites More sharing options...
Asian Kid Posted July 31, 2013 Report Share Posted July 31, 2013 I got refuel at the pumps but no the refuel trucks. Can someone post there refuel scripts?http://pastebin.com/ I tried this UPDATE `object_data` SET `Classname`='CH_47F_EP1_DZ' WHERE `Classname`='CH_47F_EP1'; UPDATE `object_data` SET `Classname`='UH1Y_DZ' WHERE `Classname`='UH1Y'; UPDATE `object_data` SET `Classname`='MV22_DZ' WHERE `Classname`='MV22'; UPDATE `object_data` SET `Classname`='UH60M_EP1_DZ' WHERE `Classname`='UH60M_EP1'; UPDATE `object_data` SET `Classname`='KamazRefuel_DZ' WHERE `Classname`='KamazRefuel'; UPDATE `object_data` SET `Classname`='UralRefuel_TK_EP1_DZ' WHERE `Classname`='UralRefuel_TK_EP1'; UPDATE `object_data` SET `Classname`='MtvrRefuel_DES_EP1_DZ' WHERE `Classname`='MtvrRefuel_DES_EP1'; UPDATE `object_data` SET `Classname`='V3S_Refuel_TK_GUE_EP1_DZ' WHERE `Classname`='V3S_Refuel_TK_GUE_EP1'; #1146 - Table '########.object_data' doesn't exist I took out my instance ID :) Thanks Link to comment Share on other sites More sharing options...
Darth_Rogue Posted August 5, 2013 Report Share Posted August 5, 2013 Keep in mind that in SQL, table names are case sensitive. So your lines should read "Object_DATA", for the table name. Here is my refuel script that is verified working for all fueling sources: private ["_vehicle", "_vehicle_refuel_id"]; //Awesomely Edited by Seven, Then modified by Muddr, Then modified again by Darth_Rogue _vehicle = objNull; diag_log "Running ""kh_actions""."; _distance = 10; // Distance from object to display Refuel Message _amount= 0.01; // Amount of fuel to add per loop. Default was 0.005 while {true} do { if (!isNull player) then { private ["_currentVehicle", "_isNearFeed", "_countFuel"]; _currentVehicle = vehicle player; _countFuel = (count ((position _currentVehicle) nearObjects ["MAP_GasMeterExt", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_A_FuelStation_Feed", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_Ind_TankSmall", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_Ind_TankSmall2", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_Ind_TankSmall2_EP1", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_fuel_tank_stairs", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["V3S_Refuel_TK_GUE_EP1_DZ", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["UralRefuel_TK_EP1_DZ", _distance])); _isNearFeed = _countFuel > 0; if (_vehicle != _currentVehicle) then { if (!isNull _vehicle) then { _vehicle removeAction _vehicle_refuel_id; _vehicle = objNull; }; if (_currentVehicle != player && _isNearFeed && !(_currentVehicle isKindof "Bicycle")) then { _vehicle = _currentVehicle; _vehicle_refuel_id = _vehicle addAction ["Refuel", "custom_scripts\kh_vehicle_refuel.sqf", [_amount], -1, false, true, "", "vehicle _this == _target && local _target"]; }; }; if (!_isNearFeed) then { _vehicle removeAction _vehicle_refuel_id; _vehicle = objNull; }; }; sleep 2; } Link to comment Share on other sites More sharing options...
neiljb Posted August 11, 2013 Report Share Posted August 11, 2013 Keep in mind that in SQL, table names are case sensitive. So your lines should read "Object_DATA", for the table name. Here is my refuel script that is verified working for all fueling sources: private ["_vehicle", "_vehicle_refuel_id"]; //Awesomely Edited by Seven, Then modified by Muddr, Then modified again by Darth_Rogue _vehicle = objNull; diag_log "Running ""kh_actions""."; _distance = 10; // Distance from object to display Refuel Message _amount= 0.01; // Amount of fuel to add per loop. Default was 0.005 while {true} do { if (!isNull player) then { private ["_currentVehicle", "_isNearFeed", "_countFuel"]; _currentVehicle = vehicle player; _countFuel = (count ((position _currentVehicle) nearObjects ["MAP_GasMeterExt", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_A_FuelStation_Feed", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_Ind_TankSmall", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_Ind_TankSmall2", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_Ind_TankSmall2_EP1", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_fuel_tank_stairs", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["V3S_Refuel_TK_GUE_EP1_DZ", _distance])); _countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["UralRefuel_TK_EP1_DZ", _distance])); _isNearFeed = _countFuel > 0; if (_vehicle != _currentVehicle) then { if (!isNull _vehicle) then { _vehicle removeAction _vehicle_refuel_id; _vehicle = objNull; }; if (_currentVehicle != player && _isNearFeed && !(_currentVehicle isKindof "Bicycle")) then { _vehicle = _currentVehicle; _vehicle_refuel_id = _vehicle addAction ["Refuel", "custom_scripts\kh_vehicle_refuel.sqf", [_amount], -1, false, true, "", "vehicle _this == _target && local _target"]; }; }; if (!_isNearFeed) then { _vehicle removeAction _vehicle_refuel_id; _vehicle = objNull; }; }; sleep 2; } Please forgive my ignorance, But where would I need to add this code and into which file? Edit: So if I understand this correctly, I need to place this script in my mission file and point the init.sqf towards it by adding for example: [] execVM "scripts\autofuel.sqf"; (assuming I name the script autofuel.sqf and place it in a "scripts" folder in my mission files) ? 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