Show Players Playtime in AdminMenu

This commit is contained in:
He-Man 2019-08-19 19:25:04 +02:00
parent 5e245cc15c
commit eedc3b68bb
4 changed files with 9 additions and 1 deletions

View File

@ -273,6 +273,11 @@ if (!isNull _player) then {
_currentStat = _communityStats select _Index;
_communityStats set[_Index, _currentStat + 1];
};
_Index = EPOCH_communityStats find "PlayTime";
if (_Index > -1) then {
_currentStat = _communityStats select _Index;
_newPlyr setVariable["EPOCH_playerPlayTime", _currentStat, true];
};
_newPlyr setVariable["COMMUNITY_STATS", _communityStats];

View File

@ -118,6 +118,7 @@ if (!local _player) then {
_newPlyr setVariable ["GROUP", _playerGroup];
_newPlyr setVariable ["REVIVE", false];
_newPlyr setVariable ["SERVER_VARS",_player getVariable ["SERVER_VARS",[]]];
_newPlyr setVariable ["EPOCH_playerPlayTime",_player getvariable ["EPOCH_playerPlayTime",0],true];
// _player playActionNow "Die";

View File

@ -2071,7 +2071,7 @@ _skn_admincode = compileFinal ("
if (_sorted isEqualTo []) then {_sorted = [player]};
_skn_fnc_addPlayerToList = {
_player = _this select 0;
_index = _ctrl lbAdd format ['%1', name _player];
_index = _ctrl lbAdd format ['%1', format ['%1 [%2 h]',name _player,((_player getvariable ['EPOCH_playerPlayTime',0])/60/60) toFixed 1]];
_ctrl lbSetData [_index, netId _player];
_ctrl lbSetColor [_index, _this select 1];
if (vehicle _player == _player) then {

View File

@ -53,6 +53,8 @@ All changes for [Arma 3](https://arma3.com/) [Epoch Mod](https://epochmod.com) a
- respawn_east
- respawn_west
- all VirtualMan_EPOCH Entities
- Players playtimes are now shown in the Playerlist in Adminmenu
- https://cdn.discordapp.com/attachments/474595539107971072/613059969943601208/unknown.png
## [1.3.1.0] - 2019-03-28
### Added