Jump to content
  • 0

No delete item in database for item listed


mikael

Question

I want remove the deleting item databases for a listes item.

 

I think change the ligne in the server_deleteObj.sqf :

	if (parseNumber _id > 0) then {
		//Send request
		_key = format["CHILD:304:%1:",_id];
		_key call server_hiveWrite;
		diag_log format["DELETE: %1 Deleted by ID: %2",_activatingPlayer,_id];
	} else  {
		//Send request
		_key = format["CHILD:310:%1:",_uid];
		_key call server_hiveWrite;
		diag_log format["DELETE: %1 Deleted by UID: %2",_activatingPlayer,_uid];
	};

By :

    if (parseNumber _id > 0) then {
        if (typeOf(_object) in !_cpcimmune) then {
            //Send request
            _key = format["CHILD:304:%1:",_id];
            _key call server_hiveWrite;
            diag_log format["DELETE: %1 Deleted by ID: %2",_activatingPlayer,_id];
        };
    } else  {
        if (typeOf(_object) in !_cpcimmune) then {
        //Send request
        _key = format["CHILD:310:%1:",_uid];
        _key call server_hiveWrite;
        diag_log format["DELETE: %1 Deleted by UID: %2",_activatingPlayer,_uid];
        };
    };

In the "_cpcimmune" I declare the list off item :

_cpcimmune =[
"WoodFloor_DZ",
"WoodFloorHalf_DZ",
"WoodFloorQuarter_DZ",
"Land_DZE_LargeWoodDoorLocked",
"WoodLargeWallDoor_DZ",
"WoodLargeWallWin_DZ",
"WoodLargeWall_DZ",
"Land_DZE_WoodDoorLocked",
"WoodSmallWallDoor_DZ",
"WoodSmallWallWin_DZ",
"Land_DZE_GarageWoodDoor",
"Land_DZE_GarageWoodDoorLocked",
"WoodLadder_DZ",
"WoodStairsSans_DZ",
"WoodStairs_DZ",
"WoodSmallWall_DZ",
"WoodSmallWallThird_DZ",
"CinderWallHalf_DZ",
"CinderWall_DZ",
"CinderWallDoorway_DZ",
"Land_DZE_LargeWoodDoor",
"MetalFloor_DZ",
"CinderWallDoorSmallLocked_DZ",
"CinderWallSmallDoorway_DZ",
"CinderWallDoor_DZ",
"MetalFloor_DZ",
"Land_HBarrier1_DZ",
"Land_HBarrier3_DZ",
"Land_HBarrier5_DZ"
];

But it's correct ? I'm not sure for the expression :

 if (typeOf(_object) in !_cpcimmune) then {

With this modification I want to the item respawn at the server reboot

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Pretty sure you would want to do this with an SQL statement. This way itwill reset each server restart as a fixed item.

Something like.

FOR EACH __________ WHERE DAMAGE = 1 SET DAMAGE 0

Obviously this is not the correct syntex, but it's the best I can do here on my phone ATM. Maybe someone else can write the correct syntex for you. Then simply run it before a server restart.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...