InCombat logout punishment
1.7.7.1 Chernarus
This is modification of original files that allows you to punish players for combat logging by changing their quantity of blood.
Requirements:
- Easy = Blue <10
- dayz_server.pbo
Installation Steps:
1. Unpack your dayz_server.pbo and open compile/server_onPlayerDisconnect.sqf;
2. Find that lines:
Code:
#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
Code:
_characterID = _playerObj getVariable["characterID", "?"];
_timeout = _playerObj getVariable["combattimeout",0];
if ((_timeout - time) > 0) then {
diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
_playerObj setVariable["USEC_BloodQty",1000];
};
Code:
_playerObj setVariable["USEC_BloodQty",1000]
Also you can use this lines to make your own punishment, just add any line or combination of this lines
Code:
_playerObj setVariable["unconsciousTime",300,true]; //300 - unconscious time in seconds
_playerObj setVariable["USEC_inPain",true]; // To make them pain ^^
_playerObj setVariable["USEC_injured", true]; // To injure them
right after
Code:
diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
For example this will kill player after they rejoin
Code:
_characterID = _playerObj getVariable["characterID", "?"];
_timeout = _playerObj getVariable["combattimeout",0];
if ((_timeout - time) > 0) then {
diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
_playerObj setVariable["USEC_BloodQty",1];
_playerObj setVariable["USEC_injured", true]; // To injure them
};
Credits -
Original thread
Viba (original code)