Jump to content
  • 0

Anti Combat Log 1.0.6


Andrej

Question

7 answers to this question

Recommended Posts

  • 0

We've actually moved the combat log code to server_playerSync.sqf in this if statement. https://github.com/EpochModTeam/DayZ-Epoch/blob/Release_1.0.6.1/SQF/dayz_server/compile/server_playerSync.sqf#L140-L147

 

If you are looking to remove the gear of a player who combat logs, then modify the section to look as it does below. Note: I haven't tested this so check your RPT for errors, let me know if it works, and if all is good I'll make a post about it on the 1.0.6 mods forum

 

Link to comment
Share on other sites

  • 0

I couldnt get it to work. No errors in rpt though.

If I combat logged, when I logged back in, I was always logged back in to a place Id been previous to the combat log and no box with loot spawned and I kept all my gear.

I need to update my test server and try again, I was quickly testing it on my main server before i made it live with the new 1061 and didnt have time to keep messing with it.

Link to comment
Share on other sites

  • 0
  On 3/6/2017 at 3:40 PM, lwbuk said:

I couldnt get it to work. No errors in rpt though.

If I combat logged, when I logged back in, I was always logged back in to a place Id been previous to the combat log and no box with loot spawned and I kept all my gear.

I need to update my test server and try again, I was quickly testing it on my main server before i made it live with the new 1061 and didnt have time to keep messing with it.

Expand  

This should work, just tested it briefly. 

	if (_this select 4) then { //combat logged
		_medical set [1, true]; //set unconcious to true
		_medical set [10, 150]; //combat timeout
		//_character setVariable ["NORRN_unconscious",true,true]; // Set status to unconscious
		//_character setVariable ["unconsciousTime",150,true]; // Set knock out timer to 2 minutes 30 seconds
		//_character setVariable ["USEC_injured",true]; // Set status to bleeding
		//_character setVariable ["USEC_BloodQty",3000]; // Set blood to 3000
		
		//Begin anti-combatlog
        _weapons            = _playerGear select 0;
        _weapons_backpack     = _playerBackp select 1;
        _current_magazine    = currentMagazine _playerObj;
        _magazines_backpack = _playerBackp select 2;
		_magazinesRemove = _magazines;

		if ((typeName (_magazinesRemove select 0)) == "ARRAY") then {
			if ((count _magazinesRemove > 1) && {((typeName (_magazinesRemove select 1)) == "STRING") && {((_magazinesRemove select 1) != "")}}) then {
				_weapons set [(count _weapons), (_magazinesRemove select 1)];
			};
			_magazinesRemove = _magazines select 0;
		};

        _loot_box = createVehicle ["USBasicAmmunitionBox",_charPos,[],0,"CAN_COLLIDE"];
	
        clearMagazineCargoGlobal _loot_box;
        clearWeaponCargoGlobal _loot_box;

        {
            _loot_box addWeaponCargoGlobal [_x,1];
        } forEach _weapons;

        _magazinesRemove set [(count _magazinesRemove),_current_magazine];

        {
            _loot_box addMagazineCargoGlobal [_x,1];
        } forEach _magazinesRemove;

        if (typeOf _backpack != "") then {
			if ((typename _weapons_backpack) == "ARRAY") then {
				{
					_loot_box addWeaponCargoGlobal [_x,((_weapons_backpack select 1) select _forEachIndex)];
				} forEach (_weapons_backpack select 0);
			};

			if ((typename _magazines_backpack) == "ARRAY") then {
				{
					_loot_box addMagazineCargoGlobal [_x,((_magazines_backpack select 1) select _forEachIndex)];
				} forEach (_magazines_backpack select 0);
			};
            _loot_box addBackpackCargoGlobal[(typeOf _backpack),1];
        };

		_playerBackp = ["",[[],[]],[[],[]]];
		_playerGear = [[],[]];
		_currentAnim = "";
		_currentWpn = "";
		//End anti-combatlog
	};

 

Link to comment
Share on other sites

  • 0

Im still having the same issue.

Combat log message shows, but when the combat logger logs back in, they go to previous state.

I know its me messing the code up as I had an error in the rpt with a missing };  so I played around with it and now get now errors, it just doesnt work as it supposed to.

  Reveal hidden contents

My entire file looks like this, but Ive tried several variations.

  Reveal hidden contents

I know Im being an idiot and missed something but I just cant see what and its annoying me.

Link to comment
Share on other sites

  • 0

Been playing with this a bit more, the code does indeed work, however only once you disable infistar, so something in there is overriding it all.

With infistar enabled, the combat logger logs back in and has the unconscious screen for a few seconds then all is well. They get up, have all the same gear etc.

I shall scour through the Infi code and see if I can find where its over riding it. Ive already turned anti combat log off but it made no difference.

 

**solved**

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
  • Discord

×
×
  • Create New...