Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
Boris62

Ошибка в сообщении "Убит NPC".

Recommended Posts

Доброго времени суток,уважаемые форумчане.

Представляю вашему вниманию небольшой фикс.

Как известно, после обновления Exile на версию 1.0.3 "Lemon" появился баг в сообщениях убийства.

Теперь,когда один игрок убивает другого, сообщение выдаёт,что он был убит NPC.

Вся проблема в изменённых файлах серверного пбо ExileServer_util_getFragKiller и ExileServer_util_getFragType,а так же,ExileServer_object_player_event_onMpKilled

Данные файлы находятся по пути @ExileServer-addons-exile_server

Лечится данный баг просто,заменой перечисленных файлов старыми версиями из мода Exile 1.0.2 "Kohlrabi"

 

Для этого,распаковываем exile_server пбо и в папке  code меняем эти три файла на

 

ExileServer_util_getFragKiller

Скрытый текст

/**
 * ExileServer_util_getFragKiller
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_killer","_player"];
_killer = _this;
_player = objNull;
if (isPlayer _killer) then 
{
    if ((typeOf _killer) isEqualTo "Exile_Unit_Player") then
    {
        _player = _killer;    
    }
    else 
    {
        _uid = getPlayerUID _killer;
        {
            if ((getPlayerUID _x) isEqualTo _uid) exitWith 
            {
                _player = _x;
            };
        }
        forEach allPlayers;
    };
}
else 
{
    if (isUAVConnected _killer) then 
    {
        _player = (UAVControl _killer) select 0;
    };
};
_player

ExileServer_util_getFragType

Скрытый текст

/**
 * ExileServer_util_getFragType
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_victim","_killer","_killingPlayer","_type","_victimClanId","_killerClanId"];
_victim = _this select 0;
_killer = _this select 1;
_killingPlayer = _this select 2;
_type = 0;
try 
{
    if (_victim getVariable ["IsPlayingRussianRoulette", false]) then 
    {
        throw 2;
    };
    if (_victim isEqualTo _killer) then
    {
        throw 1;
    };
    if ((vehicle _victim) isEqualTo _killer) then
    {
        throw 3;
    };
    if (isNull _killer) then
    {
        throw 0;
    };
    if (isNull _killingPlayer) then 
    {
        throw 4;
    };
    if ((group _victim) isEqualTo (group _killingPlayer)) then 
    {
        throw 5;
    };
    _victimClanId = _victim getVariable ["ExileClanID", -2];
    _killerClanId = _killer getVariable ["ExileClanID", -3];
    if (!(_victimClanId isEqualTo -1) && (_victimClanId isEqualTo _killerClanId)) then
    {
        throw 5;
    };        
    if (_victim getVariable ["ExileIsBambi", false]) then 
    {
        throw 6;
    };
    throw 7;
}
catch 
{
    _type = _exception;
};
_type

 

ExileServer_object_player_event_onMpKilled

Скрытый текст

/** * ExileServer_object_player_event_onMpKilled * * Exile Mod * www.exilemod.com * © 2015 Exile Mod Team * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. */ private["_victim","_killer","_countDeath","_countKill","_killSummary","_killingPlayer","_killType","_oldVictimRespect","_newVictimRespect","_oldKillerRespect","_newKillerRespect","_systemChat","_modifyVictimRespect","_respectLoss","_perks","_minRespectTransfer","_respectTransfer","_perkNames","_killerStatsNeedUpdate","_newKillerFrags","_victimStatsNeedUpdate","_newVictimDeaths","_victimPosition"]; _victim = _this select 0; _killer = _this select 1; if (!isServer || hasInterface || isNull _victim) exitWith {}; _victim setVariable ["ExileDiedAt", time]; if !(isPlayer _victim) exitWith {}; _victim setVariable ["ExileIsDead", true]; _victim setVariable ["ExileName", name _victim, true]; _countDeath = false; _countKill = false; _killSummary = []; _killingPlayer = _killer call ExileServer_util_getFragKiller; _killType = [_victim, _killer, _killingPlayer] call ExileServer_util_getFragType; _oldVictimRespect = _victim getVariable ["ExileScore", 0]; _newVictimRespect = _oldVictimRespect; _oldKillerRespect = 0; if !(isNull _killingPlayer) then { _oldKillerRespect = _killingPlayer getVariable ["ExileScore", 0]; }; _newKillerRespect = _oldKillerRespect; switch (_killType) do { default { _countDeath = true; _systemChat = format ["%1 died for an unknown reason!", name _victim]; _newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "unlucky"))); }; case 1: { _countDeath = true; _modifyVictimRespect = true; _systemChat = format ["%1 commited suicide!", name _victim]; _newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "suicide"))); }; case 2: { _countDeath = true; _countKill = false; _systemChat = format ["%1 died while playing Russian Roulette!", name _victim]; _newVictimRespect = _oldVictimRespect; _victim call ExileServer_system_russianRoulette_event_onPlayerDied; }; case 3: { _countDeath = true; _countKill = false; _systemChat = format ["%1 crashed to death!", name _victim]; _newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "crash"))); }; case 4: { _countDeath = true; _countKill = false; _systemChat = format ["%1 was killed by an NPC!", name _victim]; _newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "npc"))); }; case 5: { _countDeath = false; _countKill = false; _systemChat = format ["%1 was team-killed by %2!", name _victim, name _killingPlayer]; _respectLoss = round ((abs _oldKillerRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "friendyFire"))); _newKillerRespect = _oldKillerRespect - _respectLoss; _killSummary pushBack ["FRIENDLY FIRE", -1 * _respectLoss]; }; case 6: { _countDeath = false; _countKill = false; _systemChat = format ["%1 was killed by %2! (BAMBI SLAYER)", name _victim, name _killingPlayer]; _respectLoss = round ((abs _oldKillerRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "bambiKill"))); _newKillerRespect = _oldKillerRespect - _respectLoss; _killSummary pushBack ["BAMBI SLAYER", -1 * _respectLoss]; }; case 7: { _countDeath = true; _countKill = true; _perks = [_victim, _killer, _killingPlayer] call ExileServer_util_getFragPerks; _minRespectTransfer = getNumber (configFile >> "CfgSettings" >> "Respect" >> "minRespectTransfer"); _respectTransfer = round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "frag"))); if (_respectTransfer < _minRespectTransfer) then { _respectTransfer = _minRespectTransfer; }; _newVictimRespect = _oldVictimRespect - _respectTransfer; _newKillerRespect = _oldKillerRespect + _respectTransfer; _killSummary pushBack ["ENEMY FRAGGED", _respectTransfer]; if (_perks isEqualTo []) then { _systemChat = format ["%1 was killed by %2!", name _victim, name _killingPlayer]; } else { _perkNames = []; { _perkNames pushBack (_x select 0); _killSummary pushBack _x; _newKillerRespect = _newKillerRespect + (_x select 1); } forEach _perks; _systemChat = format ["%1 was killed by %2! (%3)", name _victim, name _killingPlayer, _perkNames joinString ", "]; }; }; }; if !(isNull _killingPlayer) then { if !(_killSummary isEqualTo []) then { [_killingPlayer, "showFragRequest", [_killSummary]] call ExileServer_system_network_send_to; }; }; if !(isNull _killingPlayer) then { _killerStatsNeedUpdate = false; if (_countKill) then { _newKillerFrags = _killingPlayer getVariable ["ExileKills", 0]; _newKillerFrags = _newKillerFrags + 1; _killerStatsNeedUpdate = true; _killingPlayer setVariable ["ExileKills", _newKillerFrags]; format["addAccountKill:%1", getPlayerUID _killingPlayer] call ExileServer_system_database_query_fireAndForget; }; if !(_newKillerRespect isEqualTo _oldKillerRespect) then { _killingPlayer setVariable ["ExileScore", _newKillerRespect]; _killerStatsNeedUpdate = true; format["setAccountScore:%1:%2", _newKillerRespect, getPlayerUID _killingPlayer] call ExileServer_system_database_query_fireAndForget; }; if (_killerStatsNeedUpdate) then { _killingPlayer call ExileServer_object_player_sendStatsUpdate; }; }; _victimStatsNeedUpdate = false; if (_countDeath) then { _newVictimDeaths = _victim getVariable ["ExileDeaths", 0]; _newVictimDeaths = _newVictimDeaths + 1; _victim setVariable ["ExileDeaths", _newVictimDeaths]; _victimStatsNeedUpdate = true; format["addAccountDeath:%1", getPlayerUID _victim] call ExileServer_system_database_query_fireAndForget; }; if !(_newVictimRespect isEqualTo _oldVictimRespect) then { _victim setVariable ["ExileScore", _newVictimRespect]; _victimStatsNeedUpdate = true; format["setAccountScore:%1:%2", _newVictimRespect, getPlayerUID _victim] call ExileServer_system_database_query_fireAndForget; }; if (_victimStatsNeedUpdate) then { _victim call ExileServer_object_player_sendStatsUpdate; }; if ((vehicle _victim) isEqualTo _victim) then { if !(underwater _victim) then { if !(_victim call ExileClient_util_world_isInTraderZone) then { _victim call ExileServer_object_flies_spawn; }; }; }; if !(_systemChat isEqualTo "") then { if ((getNumber (configFile >> "CfgSettings" >> "KillFeed" >> "showKillFeed")) isEqualTo 1) then { ["systemChatRequest", [_systemChat]] call ExileServer_system_network_send_broadcast; }; }; if !(_systemChat isEqualTo "") then { if ((getNumber (configFile >> "CfgSettings" >> "Logging" >> "deathLogging")) isEqualTo 1) then { "extDB2" callExtension format["1:DEATH:%1", _systemChat]; }; }; _victimPosition = getPos _victim; format["insertPlayerHistory:%1:%2:%3:%4:%5", getPlayerUID _victim, name _victim, _victimPosition select 0, _victimPosition select 1, _victimPosition select 2] call ExileServer_system_database_query_fireAndForget; format["deletePlayer:%1", _victim getVariable ["ExileDatabaseId", -1]] call ExileServer_system_database_query_fireAndForget; true

По крайней мере, мне помогло. 

Ещё одно уточнение,если есть скрипт цветных изображений об убийствах.

Тогда файл ExileServer_object_player_event_onMpKilled

Скрытый текст

/**
 * ExileServer_object_player_event_onMpKilled
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */

private["_victim","_killer","_countDeath","_countKill","_killSummary","_killingPlayer","_killType","_oldVictimRespect","_newVictimRespect","_oldKillerRespect","_newKillerRespect","_systemChat","_modifyVictimRespect","_respectLoss","_perks","_minRespectTransfer","_respectTransfer","_perkNames","_killerStatsNeedUpdate","_newKillerFrags","_victimStatsNeedUpdate","_newVictimDeaths","_victimPosition","_weapon","_txt","_pic"];
_victim = _this select 0;
_killer = _this select 1;
if (!isServer || hasInterface || isNull _victim) exitWith {};
_victim setVariable ["ExileDiedAt", time];
if !(isPlayer _victim) exitWith {};
_victim setVariable ["ExileIsDead", true];
_victim setVariable ["ExileName", name _victim, true];
_countDeath = false;
_countKill = false;
_killSummary = [];
_killingPlayer = _killer call ExileServer_util_getFragKiller;
_killType = [_victim, _killer, _killingPlayer] call ExileServer_util_getFragType;
_oldVictimRespect = _victim getVariable ["ExileScore", 0];
_newVictimRespect = _oldVictimRespect;
_oldKillerRespect = 0;
if !(isNull _killingPlayer) then
{
    _oldKillerRespect = _killingPlayer getVariable ["ExileScore", 0];
};
_newKillerRespect = _oldKillerRespect;
switch (_killType) do
{
    default
    {
        _countDeath = true;
        _systemChat = format ["%1 died for an unknown reason!", name _victim];
        _newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "unlucky")));
    };
    case 1:
    {
        _countDeath = true;
        _modifyVictimRespect = true;
        _systemChat = format ["%1 commited suicide!", name _victim];
        _newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "suicide")));
    };
    case 2:
    {
        _countDeath = true;
        _countKill = false;
        _systemChat = format ["%1 died while playing Russian Roulette!", name _victim];
        _newVictimRespect = _oldVictimRespect;
        _victim call ExileServer_system_russianRoulette_event_onPlayerDied;
    };
    case 3:
    {
        _countDeath = true;
        _countKill = false;

        _systemChat = format ["%1 crashed to death!", name _victim];
        _newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "crash")));
    };
    case 4:
    {
        _countDeath = true;
        _countKill = false;
        _newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "npc")));
        _weapon = currentWeapon _killer;
        _txt = (gettext (configFile >> 'cfgWeapons' >> _weapon >> 'displayName'));
        _pic = (gettext (configFile >> 'cfgWeapons' >> _weapon >> 'picture'));
        if (_pic == "") then {
           _weapon = typeOf (vehicle _killer);
           _pic = (getText (configFile >> 'cfgVehicles' >> _weapon >> 'picture'));
           _txt = (getText (configFile >> 'cfgVehicles' >> _weapon >> 'displayName'));
        };
        _systemChat = format ["%1 was killed by an NPC!", name _victim];
        ["systemChatRequest", [format["%1 was killed by an NPC! (%2m Distance)", (name _victim), floor(_victim distance _killer)]]] call ExileServer_object_player_event_killfeed;
        
        // KILL MESSAGES BY GR8
        Gr8s_kill_msg = ["NPC", _pic, (name _victim), floor(_victim distance _killer), _txt, nil, nil];
        if (LogAIKills) then {format["logGr8Kill:%1:%2:%3:%4:%5:%6:%7", "Безрукий РАК", getPlayerUID _killer, (name _victim), getPlayerUID _victim, _txt, floor(_victim distance _killer), 0] call ExileServer_system_database_query_insertSingle;};
        if (ShowAIKills) then {publicVariable "Gr8s_kill_msg";};
    };
    case 5:
    {
        _countDeath = false;
        _countKill = false;
        _systemChat = format ["%1 was team-killed by %2!", name _victim, name _killingPlayer];
        _respectLoss = round ((abs _oldKillerRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "friendyFire")));
        _newKillerRespect = _oldKillerRespect - _respectLoss;
        _killSummary pushBack ["FRIENDLY FIRE", -1 * _respectLoss];
        _weapon = currentWeapon _killer;
        _txt = (gettext (configFile >> 'cfgWeapons' >> _weapon >> 'displayName'));
        _pic = (gettext (configFile >> 'cfgWeapons' >> _weapon >> 'picture'));
        if (_pic == "") then {
           _weapon = typeOf (vehicle _killer);
           _pic = (getText (configFile >> 'cfgVehicles' >> _weapon >> 'picture'));
           _txt = (getText (configFile >> 'cfgVehicles' >> _weapon >> 'displayName'));
        };

        Gr8s_kill_msg = [(name _killer), _pic, (name _victim), floor(_victim distance _killer), _txt, nil, nil];
        if (LogPlayerKills) then {format["logGr8Kill:%1:%2:%3:%4:%5:%6:%7", (name _killer), getPlayerUID _killer, (name _victim), getPlayerUID _victim, _txt, floor(_victim distance _killer), _respectLoss] call ExileServer_system_database_query_insertSingle;};
        if (ShowPlayerKills) then {publicVariable "Gr8s_kill_msg";};
    };
    case 6:
    {
        _countDeath = false;
        _countKill = false;
        _systemChat = format ["%1 was killed by %2! (BAMBI SLAYER)", name _victim, name _killingPlayer];
        _respectLoss = round ((abs _oldKillerRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "bambiKill")));
        _newKillerRespect = _oldKillerRespect - _respectLoss;
        _killSummary pushBack ["BAMBI SLAYER", -1 * _respectLoss];
        _weapon = currentWeapon _killer;
        _txt = (gettext (configFile >> 'cfgWeapons' >> _weapon >> 'displayName'));
        _pic = (gettext (configFile >> 'cfgWeapons' >> _weapon >> 'picture'));
        if (_pic == "") then {
           _weapon = typeOf (vehicle _killer);
           _pic = (getText (configFile >> 'cfgVehicles' >> _weapon >> 'picture'));
           _txt = (getText (configFile >> 'cfgVehicles' >> _weapon >> 'displayName'));
        };

        Gr8s_kill_msg = [(name _killer), _pic, (name _victim), floor(_victim distance _killer), _txt, nil, nil];
        if (LogPlayerKills) then {format["logGr8Kill:%1:%2:%3:%4:%5:%6:%7", (name _killer), getPlayerUID _killer, (name _victim), getPlayerUID _victim, _txt, floor(_victim distance _killer), _respectLoss] call ExileServer_system_database_query_insertSingle;};
        if (ShowPlayerKills) then {publicVariable "Gr8s_kill_msg";};
    };
    case 7:
    {
        _countDeath = true;
        _countKill = true;
        _perks = [_victim, _killer, _killingPlayer] call ExileServer_util_getFragPerks;
        _minRespectTransfer = getNumber (configFile >> "CfgSettings" >> "Respect" >> "minRespectTransfer");
        _respectTransfer = round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "frag")));
        if (_respectTransfer < _minRespectTransfer) then
        {
            _respectTransfer = _minRespectTransfer;
        };
        _newVictimRespect = _oldVictimRespect - _respectTransfer;
        _newKillerRespect = _oldKillerRespect + _respectTransfer;
        _killSummary pushBack ["ENEMY FRAGGED", _respectTransfer];
        if (_perks isEqualTo []) then
        {
            _killer setVariable ["ExileScore", _newKillerScore];
            _weapon = currentWeapon _killer;
            _txt = (gettext (configFile >> 'cfgWeapons' >> _weapon >> 'displayName'));
            _pic = (gettext (configFile >> 'cfgWeapons' >> _weapon >> 'picture'));
            if (_pic == "") then {
                _weapon = typeOf (vehicle _killer);
                _pic = (getText (configFile >> 'cfgVehicles' >> _weapon >> 'picture'));
                _txt = (getText (configFile >> 'cfgVehicles' >> _weapon >> 'displayName'));
            };
            _systemChat = format ["%1 was killed by %2!", name _victim, name _killingPlayer];
            
            Gr8s_kill_msg = [(name _killer), _pic, (name _victim), floor(_victim distance _killer), _txt, nil, nil];
            if (LogPlayerKills) then {format["logGr8Kill:%1:%2:%3:%4:%5:%6:%7", (name _killer), getPlayerUID _killer, (name _victim), getPlayerUID _victim, _txt, floor(_victim distance _killer), _respectTransfer] call ExileServer_system_database_query_insertSingle;};
            if (ShowPlayerKills) then {publicVariable "Gr8s_kill_msg";};
        }
        else
        {
            _perkNames = [];
            {
                _perkNames pushBack (_x select 0);
                _killSummary pushBack _x;
                _newKillerRespect = _newKillerRespect + (_x select 1);
            }
            forEach _perks;
                    _weapon = currentWeapon _killer;
                    _txt = (gettext (configFile >> 'cfgWeapons' >> _weapon >> 'displayName'));
                    _pic = (gettext (configFile >> 'cfgWeapons' >> _weapon >> 'picture'));
                    if (_pic == "") then {
                      _weapon = typeOf (vehicle _killer);
                       _pic = (getText (configFile >> 'cfgVehicles' >> _weapon >> 'picture'));
                       _txt = (getText (configFile >> 'cfgVehicles' >> _weapon >> 'displayName'));
        };
            _systemChat = format ["%1 was killed by %2! (%3)", name _victim, name _killingPlayer, _perkNames joinString ", "];

            Gr8s_kill_msg = [(name _killer), _pic, (name _victim), floor(_victim distance _killer), _txt, nil, nil];
            if (LogPlayerKills) then {format["logGr8Kill:%1:%2:%3:%4:%5:%6:%7", (name _killer), getPlayerUID _killer, (name _victim), getPlayerUID _victim, _txt, floor(_victim distance _killer), _respectTransfer] call ExileServer_system_database_query_insertSingle;};
            if (ShowPlayerKills) then {publicVariable "Gr8s_kill_msg";};
        };
    };
};
if !(isNull _killingPlayer) then
{
    if !(_killSummary isEqualTo []) then
    {
        [_killingPlayer, "showFragRequest", [_killSummary]] call ExileServer_system_network_send_to;
    };
};
if !(isNull _killingPlayer) then
{
    _killerStatsNeedUpdate = false;
    if (_countKill) then
    {
        // Most-Wanted

        _bounty = _victim getVariable ["ExileBounty",[]];
        diag_log format["Victim's bounty: %1",_bounty];
        if (count(_bounty) > 0) then
        {
            _contract = _killer getVariable ["ExileBountyContract",[]];
            _friends = _killer getVariable ["ExileBountyFriends",[]];
            diag_log format["Killer's bounty contract:%1",_contract];
            if !(_contract in _friends) then
            {
                if ((_contract select 1) isEqualTo (getPlayerUID _victim)) then
                {
                    diag_log "Killer has a contract";
                    [_victim,_killer] call ExileServer_MostWanted_bounty_targetKilled;
                };
            };
        };

        // Most-Wanted
        _newKillerFrags = _killingPlayer getVariable ["ExileKills", 0];
        _newKillerFrags = _newKillerFrags + 1;
        _killerStatsNeedUpdate = true;
        _killingPlayer setVariable ["ExileKills", _newKillerFrags];
        format["addAccountKill:%1", getPlayerUID _killingPlayer] call ExileServer_system_database_query_fireAndForget;
    };
    if !(_newKillerRespect isEqualTo _oldKillerRespect) then
    {
        _killingPlayer setVariable ["ExileScore", _newKillerRespect];
        _killerStatsNeedUpdate = true;
        format["setAccountScore:%1:%2", _newKillerRespect, getPlayerUID _killingPlayer] call ExileServer_system_database_query_fireAndForget;
    };
    if (_killerStatsNeedUpdate) then
    {
        _killingPlayer call ExileServer_object_player_sendStatsUpdate;
    };
};
_victimStatsNeedUpdate = false;
if (_countDeath) then
{
    _newVictimDeaths = _victim getVariable ["ExileDeaths", 0];
    _newVictimDeaths = _newVictimDeaths + 1;
    _victim setVariable ["ExileDeaths", _newVictimDeaths];
    _victimStatsNeedUpdate = true;
    format["addAccountDeath:%1", getPlayerUID _victim] call ExileServer_system_database_query_fireAndForget;
};
if !(_newVictimRespect isEqualTo _oldVictimRespect) then
{
    _victim setVariable ["ExileScore", _newVictimRespect];
    _victimStatsNeedUpdate = true;
    format["setAccountScore:%1:%2", _newVictimRespect, getPlayerUID _victim] call ExileServer_system_database_query_fireAndForget;
};
if (_victimStatsNeedUpdate) then
{
    _victim call ExileServer_object_player_sendStatsUpdate;
};
if ((vehicle _victim) isEqualTo _victim) then
{
    if !(underwater _victim) then
    {
        if !(_victim call ExileClient_util_world_isInTraderZone) then
        {
            _victim call ExileServer_object_flies_spawn;
        };
    };
};
if !(_systemChat isEqualTo "") then
{
    if ((getNumber (configFile >> "CfgSettings" >> "KillFeed" >> "showKillFeed")) isEqualTo 1) then
    {
        ["systemChatRequest", [_systemChat]] call ExileServer_system_network_send_broadcast;
    };
};
if !(_systemChat isEqualTo "") then
{
    if ((getNumber (configFile >> "CfgSettings" >> "Logging" >> "deathLogging")) isEqualTo 1) then
    {
        "extDB2" callExtension format["1:DEATH:%1", _systemChat];
    };
};
_victimPosition = getPos _victim;
format["insertPlayerHistory:%1:%2:%3:%4:%5", getPlayerUID _victim, name _victim, _victimPosition select 0, _victimPosition select 1, _victimPosition select 2] call ExileServer_system_database_query_fireAndForget;
format["deletePlayer:%1", _victim getVariable ["ExileDatabaseId", -1]] call ExileServer_system_database_query_fireAndForget;
true

И всё. Основное взято отсюда http://www.exilemod.com/

Edited by Boris62 (see edit history)

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By 123new
      Вижу крайне много любопытных вопросов по поводу идентификаторов игрока в игре. Что же, разжую для не знающих немного.
       
      В игре есть следующие типы идентификаторов:
      1. Steam64ID идентификатор профиля игрока (на пиратках его UID называют), примерно такой: 765475....65 (17 цифр).
      2. Так называемый мною, BIS ID - uid из окна (консоли) сервера игры и ADM-файлов логов сервера, который пишется самой игрой
      3. Battleye GUID игрока.
       
      Первый идентификатор (Steam64ID) на ПК является прямым идентификатором стим-профиля игрока, уникальным у каждого игрока. Т.е. публичным идентификатором вашего профиля для большинства стим-игр (например, Counter-Strike).
      Второй идентификатор (BIS ID) является определенной хеш-суммой, полученной из Steam64ID посредством конвертации сначала в sha256, а затем в base64. Спасибо за это разъяснение и пример кода-конвертации авторам игры на своем официальном форуме.
      Третий идентификатор (Battleye GUID) является публичным идентификатором Battleye античита, получаемый также из Steam64ID поcредством получения его хеш-суммы MD5. Этот же идентификатор есть в логах сервера от Battleye, в любых RCON-приложениях (DART, BEC и т.п.), также его можно конвертировать самим.
       
      Так вот, как же получить Steam64ID:
      1. Зайти на любой ресурс, предназначенный для сбора таких данных. например на: https://steamid.io/
      2. Ввести ссылку на ваш стим-профиль
      3. Получить результат из кучи данных, одно поле из которых и будет содержать ваш Steam64ID
       
      Как получить BIS ID:
      1. Открыть любой Phyton v2.7 -конвертер в интернете, например: https://onecompiler.com/python2/3ycz55xew
      2. Ввести в него следующий код:
      # Hello World program in Python from hashlib import sha256 from base64 import b64encode def construct_bi_uid(steam_id): hashed = sha256() hashed.update(str(steam_id)) return b64encode(hashed.digest()) print construct_bi_uid(76514925976798981) 3. заменить 76514925976798981 на ваш Steam64ID
      4. Отправить код в исполнение, нажав Execute.
      5. Получить результат
       

      Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.
      [Альтернатива] Метод на основе PHP:
      <?php /** * This is how you get user id (bohemia id) like you see in .ADM files from steam id. */ $steam_id = "76514925976798981"; $user_id = base64url_encode(hash('sha256', $steam_id, true)); function base64url_encode($data) { $b64 = base64_encode($data); if ($b64 === false) { return false; } $url = strtr($b64, '+/', '-_'); return $url; } echo $user_id; [Альтернатива] Метод для javascript - node.js:
      var crypto = require('crypto'); var body = "76514925976798981"; var hash = crypto.createHash("sha256"); var hash_result = hash.update(body, 'utf8').digest('base64'); console.log(hash_result);  
      Как получить Battleye GUID:
      1. Открыть любой ресурс с готовой формой конвертирования, например:
      https://armstalker.com/guid/
      https://dayzrussia.com/f/index.php?pages/dayzguid/
      либо написать свою, на основе данных, предложенных на странице Github
      https://gist.github.com/chris579/53053b6d6438df9a9718c23c0d6bbd69
      Оставлю ниже код для Phyton:
      # Thanks to gunlinux import md5 steamid=76514925976798981 temp = "" for i in range(8): temp += chr((steamid & 0xFF)) steamid >>= 8 m = md5.new("BE"+temp) print m.hexdigest() Код для PHP:
      var crypto = require('crypto'); var body = "76514925976798981"; var hash = crypto.createHash("sha256"); var hash_result = hash.update(body, 'utf8').digest('base64'); console.log(hash_result); '2. Вставить в поле ввода UID(Steam64ID) ваш Steam64ID
      3. Нажать кнопку конвертирования или исполнить код, и получить в готовом виде Battleye GUID
       
      Возможно имеются и другие методы и наработки в получении данных идентификаторов более простыми методами, на других языках, либо автоматически. Я описал лишь известные мне.
      Все желающие могут добавить в комментариях свои способы конвертаций, возможно это поможет кому-либо.
    • By vitacite
      Бесплатные проекты - "пацаны собрались и замутили сервачок" долго не живут.  В этом я убеждался много раз. Нет сначала на интузиазме эффективность неплохая, но затем все это затухает управляемость команды падает.  Начинаются вопросы - "а почему это должен делать я?",  отмазки "да я на даче сегодня", "да у меня командировка" и тд...  + кто-то должен спонсировать оплату сервера, антидудосов и прочей лобуды, а такого человека интерес тоже может пропасть в любой момент. А чтобы проект был хороший - кому-то надо реально "въебывать", как на второй работе, и  кому-то постоянно вливать туда бабло.
      Поэтому, лично я, считаю любой некоммерческий проект заранее проваленным!  Побегать недельку другую с друзьями это да. Что-то более серьезное, не тратьте свои силы и время! Как минимум на  тему сталкера я таких проектов видел 10 штук и в некоторых даже сам поучаствовал. Начиналось все амбициозно и даже набирало онлайн до 100 человек. Но заканчивалось все одинаково 3-4 месяца и с десято скучающих тел, на безлюдном сервере.  С точки зрения администации, игроки ведут себя как проститутки, бегая с сервера на сервер, друзья перешли, или потому что на том добавили новый прикольный скрип, или прикольную тачку, или тут плохой пинг, а там хороший, или админ козел забанил за читы и тд.  а все эти приколюхи требуют денег, а игровое сообщество не очень расположено их платить за некачественный контент. Да и сама администрация достаточно быстро забивает и расслабляется.
      (я сейчас не говорю о конкретном проекте, скорее это собирательный образ халявы).
       
      А теперь по-существу.  Так сколько должен стоить контент с хотя бы приемлемым качеством?  

      Свое мнение я написал ниже.
       
       
      Спасибо за внимание.
       
      А что думаете Вы напишите ниже в комментариях!
       
       
    • By DrTauren
      Как всем известно, сегодня, 19 сентября разработчики DayZ Standalone официально опубликовали документацию серверов Dayz, а также предоставили возможность скачать файлы для запуска сервера DayZ. Ниже прилагается перевод официальной документации этих самых файлов с форума DayZ, а также документация касательно других файлов, которых нет в официальной документации. Пользуйтесь на здоровье 
       
      Скачать серверные файлы через Steam: steam://rungameid/223350
      На данный момент присутствует ошибка с невозможностью скачать файлы сервера, если на вашем аккаунте Steam отсутствует купленная DayZ.
       
      P.S. Если у вас есть чем заполнить эту статью, обязательно пишите мне в лс 
    • By Serdce
      Ссылка на первоисточник - https://github.com/BrettNordin/Exile
      Я всего лишь перевёл
      Собственно переходим по ссылке, и скачиваем архив.
      Для тех, кто не знает как качать с хаба скрин 
      И так, едем дальше
      Скачанный архив распаковываем в удобное место для работы,
      Идём в ваш @ExileServer, там нас интересуют файлы - extDB2.dll , extDB2.so , extDB2-conf.ini , XM8.dll , XM8.so Удаляем эти файлы
      Далее идём в @ExileServer которую мы скачали, всё её содержимое копируем в аналогичную папку на сервере.
      Теперь идём в вашу MPmissions и там распаковываем вашу миссию "Exile.название карты",
      Туда мы копируем содержимое папки Exile.MapName из архива,
      Далее открываем ваш config.cpp и ищем там class CfgExileCustomCode 
      В него мы добавляем - #include "CfgExileCustomCode.cpp"
      Должно получится так
      Запаковываем обратно)
      Ну и теперь из архива мы копируем tbbmalloc.dll, tbbmalloc_x64.dll в папку расположения вашего Arma3_server.exe
      Не забываем поменять в вашем файле запуска сервера с arma3server.exe на arma3server_x64.exe 
      Ну и финишная прямая, открываем вашу базу данных ( желательно с название exile ) и добавляем файл Exile_Database_Update_64x.sql
      Далее настройте под себя ваш extdb3-conf.ini
       
  • Our picks

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.