InCombat logout punishment

setPos and cuttext will not work as the client is disconnected.

Tping should be possible to force a hivewrite when someone CL's
cuttext would require an extra collumn in the db to store and check if someone combatlogged with a timestamp
and go from there to give them a cuttext on relog...

that's my findings from trying out and playing around with those code's...

is there a USEC for worldspace location???
perhaps this?
_character setVariable ["posForceUpdate", false, true];
 
Self duping like when player reconnect to the server copy of player appear? There is a fix somewhere on this forum..

I have been looking everywhere for a fix. Tried some so-called fixes even. Nothing works.
If there is a working fix, it seems to be some kind of a secret for some reason.

Self-duping is the single worst bug in the game. The person who comes up with a reliable fix for this would be a hero for sure! Unfortunately, I'm not that person. I lack the scripting skills. Happy to test and offer ideas though!
 
I have been looking everywhere for a fix. Tried some so-called fixes even. Nothing works.
If there is a working fix, it seems to be some kind of a secret for some reason.

Self-duping is the single worst bug in the game. The person who comes up with a reliable fix for this would be a hero for sure! Unfortunately, I'm not that person. I lack the scripting skills. Happy to test and offer ideas though!
http://opendayz.net/threads/bug-in-server_onplayerdisconnect-sqf-bodyduping.11546/#post-56911
 

Look at comment #6 of that thread. It doesn't work. I have tried this method myself, and although it seems like it helps, I can still reliably recreate the glitch. If I can do it on my own server with low lag, imagine someone who is laggy.

I think the key to this one is to somehow force a player to crouch or go prone as they're disconnecting.
Perhaps utilizing setUnitPos "Middle"; somehow?
 
In dayz_server/server_playerDisconnect.sqf server version 1.7.6.1

find
Code:
_characterID        = _object getVariable ["characterID", "0"];
_isInCombat        = _object getVariable ["isincombat", 0];

and replace with
Code:
_characterID        = _object getVariable["characterID", "?"];
_timeout            = _object getVariable["combattimeout",0];

next find
Code:
if (_isInCombat > 0) then {
    diag_log format ["COMBATLOG: %1 (%2)", _playerName, _playerID];
    dayz_combatLog = _playerName;
    publicVariable "dayz_combatLog";

and replace with
Code:
if ((_timeout - time) > 0) then {
    diag_log format ["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
    _object setVariable["USEC_BloodQty",1];

Compelted.
 
Someone found out how to make this on Overwatch? cant find the direct lines that i should change

got just that

"#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
/*

*/
private ["_playerObj","_myGroup","_id","_playerUID","_playerName","_characterID","_playerIDtoarray","_timeout"];
_playerUID = _this select 0;
_playerName = _this select 1;
_playerObj = nil;
{
if (getPlayerUID _x == _playerUID) exitWith { _playerObj = _x; };
} forEachplayableUnits;

if (isNil "_playerObj") exitWith {
diag_log format["%1: nil player object, _this:%2", __FILE__, _this];
};

if (!isNull _playerObj) then {
// log disconnect
#ifdef LOGIN_DEBUG
_characterID = _playerObj getVariable["characterID", "?"];
_timeout = _playerObj getVariable["combattimeout",0];
diag_log format["Player UID#%1 CID#%2 %3 as %4, logged off at %5%6",
getPlayerUID _playerObj, _characterID, _playerObj call fa_plr2str, typeOf _playerObj,
(getPosATL _playerObj) call fa_coor2str,
if ((_timeout - time) > 0) then {" while in combat"} else {""}
];
#endif
//Update Vehicle
if (vehicle _playerObj != _playerObj) then {
_playerObj action ["eject", vehicle _playerObj];
};
{ [_x,"gear"] call server_updateObject } foreach
(nearestObjects [getPosATL _playerObj, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "StashSmall", "StashMedium"], 10]);
if (alive _playerObj) then {
//[_playerObj,(magazines _playerObj),true,(unitBackpack _playerObj)] call server_playerSync;
[_playerObj,[],true] call server_playerSync;
_myGroup = group _playerObj;
deleteVehicle _playerObj;
deleteGroup _myGroup;
};
};
"
 
Does this work on 1.8.0.3? Have any of the variables changes or does the script need to be updated? I don't know much about these things sorry, but I'd love to get this working in my PVP server... people always wimp out and log
 
Tried getting it to work on 1.8.0.3 but couldn't get it to work for some reason >.<

I made a script to tell if i'm in combat or not and that was functional but putting it into onplayerdissonect didn't seem to work.
The code I was using to check was this if it helps:
Code:
_inCombat = if ((player getVariable["combattimeout", 0]) >= diag_tickTime) then { true } else { false };
sleep 1;
cutText [format["Combat Status: %1",_inCombat], "PLAIN DOWN"];
 
PHP:
if ((_lastDamage > 5 AND {(_lastDamage < 30)}) AND {((alive _playerObj) AND {(_playerObj distance (getMarkerpos "respawn_west") >= 2000)})}) then {
    [nil, nil, rTitleText, format ["%1 JUST COMBAT LOGGED, PREPARE YOUR FORKS!", _playerName], "PLAIN DOWN"] call RE;
};
 
Back
Top