Vehicles id will change to 0

are you running Overwatch? Something is incorrectly setting the ID to zero and then writing to the database.
It must be either in the server_updateobjects server_updatenearbyobjects.

See how they update the _objectID, if that is set to zero before the hive write then you will get your database updated to all zeros
Code:
    if (_object isKindOf "AllVehicles") then {
            _fuel = fuel _object;
        };
       
        _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel];
        _key call server_hiveWrite;
Code:
        _previous = str(_object getVariable["lastInventory",[]]);
        if (str(_inventory) != _previous) then {
            _object setVariable["lastInventory",_inventory];
            if (_objectID == "0") then {
                _key = format["CHILD:309:%1:%2:",_objectUID,_inventory];
            } else {
                _key = format["CHILD:303:%1:%2:",_objectID,_inventory];
            };
           
            #ifdef OBJECT_DEBUG
                diag_log ("HIVE: WRITE: "+ str(_key));
            #endif
           
            _key call server_hiveWrite;

diag_log ("HIVE: WRITE: "+ str(_key));
These lines write to the log, check the logs and see if the vehicles are getting written a zero. You might edit the "HIVE: WRITE" to be more descriptive of what bit of code is writing at the moment.

this will help you locate the error, but the bottom line is something is putting an incorrect ID before the write. maybe just copy a fresh server_updateobject.sqf file and see what happens (maybe server_functions.sqf too)
 
Running overpoch

I might have found the problem. Is this suppoused to be there? Does these lines have anything to do with infistar?
// Epoch Admin Tools
if (_object getVariable "MalSar" == 1) exitWith {};
if (_objectID == "0" && _uid == "0") then
{
_object_position = getPosATL _object;
_isNotOk = true;
};
};

// do not update if buildable && not ok
if (_isNotOk && _isbuildable) exitWith { };

// delete if still not ok
if (_isNotOk) exitWith { deleteVehicle _object; diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",typeOf _object,_object_position select 0,_object_position select 1, _object_position select 2]); };
 
Nothing to do with infistar. epoch h admin tools are a sepadate admin hack tool.

You will have to look at logs
Oost them if you like
 
Vilayer
Is the event called "UnlockNonKeyVehicles" ?
This one?

Code:
UPDATE
            `Object_DATA`
        SET
            `Object_DATA`.`CharacterID` = 0
        WHERE
            `Object_DATA`.`CharacterID` <> 0
            AND `Object_DATA`.`CharacterID` <= 12500
            AND `Object_DATA`.`Classname` NOT LIKE 'Tent%'
            AND `Object_DATA`.`Classname` NOT LIKE '%Locked'
            AND `Object_DATA`.`Classname` NOT LIKE 'Land%'
            AND `Object_DATA`.`Classname` NOT LIKE 'Cinder%'
            AND `Object_DATA`.`Classname` NOT LIKE 'Wood%'
            AND `Object_DATA`.`Classname` NOT LIKE 'Metal%'
            AND `Object_DATA`.`Classname` NOT LIKE '%Storage%'
            AND `Object_DATA`.`Classname` NOT IN ('OutHouse_DZ', 'GunRack_DZ', 'WorkBench_DZ', 'Sandbag1_DZ', 'FireBarrel_DZ', 'DesertCamoNet_DZ', 'StickFence_DZ', 'LightPole_DZ', 'DeerStand_DZ', 'ForestLargeCamoNet_DZ', 'Plastic_Pole_EP1_DZ', 'Hedgehog_DZ', 'FuelPump_DZ', 'Fort_RazorWire', 'SandNest_DZ', 'ForestCamoNet_DZ', 'Fence_corrugated_DZ', 'CanvasHut_DZ', 'Generator_DZ')
            AND FindVehicleKeysCount(Object_DATA.CharacterID) = 0
 
Yup thats the one. You should also have one called findvehcilekeysCount its a process:
Code:
CREATE DEFINER=`vilayer`@`%` FUNCTION `FindVehicleKeysCount`(`keyId` INT)
    RETURNS int(11)
    LANGUAGE SQL
    NOT DETERMINISTIC
    CONTAINS SQL
    SQL SECURITY DEFINER
    COMMENT ''
BEGIN

Code:
BEGIN

    DECLARE totalKeys INT DEFAULT 0;

    DECLARE keyName VARCHAR(32) DEFAULT "";

    DECLARE keysInChar INT DEFAULT 0;

    DECLARE keysInObj INT DEFAULT 0;



    SET keyName = (CASE

        WHEN `keyId` < 2501 THEN CONCAT('ItemKeyGreen', `keyId`)

        WHEN `keyId` < 5001 THEN CONCAT('ItemKeyRed', `keyId` - 2500)

        WHEN `keyId` < 7501 THEN CONCAT('ItemKeyBlue', `keyId` - 5000)

        WHEN `keyId` < 10001 THEN CONCAT('ItemKeyYellow', `keyId` - 7500)

        WHEN `keyId` < 12501 THEN CONCAT('ItemKeyBlack', `keyId` - 10000)

        ELSE 'ERROR'

    END);



    SET keysInChar = (SELECT COUNT(*) FROM `Character_DATA` WHERE `Alive` = '1' AND (`Inventory` LIKE CONCAT('%', keyName, '%') OR `Backpack` LIKE CONCAT('%', keyName, '%')));

    SET keysInObj = (SELECT COUNT(*) FROM `Object_DATA` WHERE `Inventory` LIKE CONCAT('%', keyName, '%'));



    RETURN (keysInChar + keysInObj);

END

this only happens when the players lose their keys or the are removed from the server somehow.
 
Easiest way to handle it is to check the disable radio button on the unlock non key vehicles and see if that helps. Saying this why would you want to disable this as it it helps the admin. The key only unlocks if the key is lost.
 
Back
Top