Jump to content
  • 0

Maintain bug?


daryl922

Question

 Hi guys i want to ask you some help.
It doesn't matter if we maintain the base, the server is randomly deleting the plots and doors after few days (randomly). Any solutions?

 

Sql events:

Quote

UPDATE `object_data`
SET `Damage` = IF( `Damage` = 0.0, 0.1, `Damage` + 0.1 )
WHERE `LastUpdated` <= DATE_SUB(NOW(), INTERVAL 1 DAY)
AND `ObjectUID` <> 0
AND `CharacterID` <> 0
AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )

Hiveext.ini

Quote

;Negative values will disable this feature
;0 means that ALL empty placed items will be deleted every server restart
;A positive number is how old (in days) a placed empty item must be, in order for it to be deleted
;Leaving CleanupPlacedAfterDays below commented (with a ; in front) will NOT disable the cleanup, but will make the objects get cleaned up after the default 6 days.
CleanupPlacedAfterDays = 10

Plotobject.sqf

Quote

private ["_range","_buildables","_count","_colour","_ctrl","_target"];
disableSerialization;

_range = DZE_PlotPole select 0;
_target = (([player] call FNC_getPos) nearEntities ["Plastic_Pole_EP1_DZ",15]) select 0;
// Also count safes, lockboxes, vanilla buildables, tents and stashes against DZE_BuildingLimit
_buildables = DZE_maintainClasses + DZE_LockableStorage + ["DZ_buildables","DZ_storage_base"];
_count = count (nearestObjects [_target,_buildables,_range]);

_colour = "#ffffff";

if (_count / DZE_BuildingLimit * 100 < 40) then {
    _colour = "#00ff00";
};
if (_count / DZE_BuildingLimit * 100 > 75) then {
    _colour = "#ff0000";
};

_ctrl = findDisplay 711194 displayCtrl 7014;
_ctrl ctrlSetStructuredText parseText format["<t color='%3'>%1 / %2</t>" , _count, DZE_BuildingLimit,_colour];

Help please!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Make sure your sql events are turned on : 

https://stackoverflow.com/questions/3797830/how-to-permanently-activate-set-the-global-event-scheduler-to-1-in-mysql/3797926#3797926

Also make sure your hive.ini file isn't set to CleanupPlacedAfterDays = 6

change it to:

Spoiler

CleanupPlacedAfterDays = -1

and the last thing to check is the delete object old event in your mysql, make sure that it is set to delete if damage = 1

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...