Merge pull request #17 from ELRabito/patch-1

Update ExileServer_object_player_event_onMpKilled.sqf
This commit is contained in:
Brett Nordin 2020-11-27 19:23:17 -07:00 committed by GitHub
commit bb6f5bee44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,10 @@ _killType = [_victim, _killer, _killingPlayer, _instigator] call ExileServer_uti
_oldVictimRespect = _victim getVariable ["ExileScore", 0]; _oldVictimRespect = _victim getVariable ["ExileScore", 0];
_newVictimRespect = _oldVictimRespect; _newVictimRespect = _oldVictimRespect;
_oldKillerRespect = 0; _oldKillerRespect = 0;
//Makes the respawn bug less likely
format["deletePlayer:%1", _victim getVariable ["ExileDatabaseId", -1]] call ExileServer_system_database_query_fireAndForget;
if !(isNull _killingPlayer) then if !(isNull _killingPlayer) then
{ {
_oldKillerRespect = _killingPlayer getVariable ["ExileScore", 0]; _oldKillerRespect = _killingPlayer getVariable ["ExileScore", 0];
@ -204,5 +208,4 @@ if !(_systemChat isEqualTo "") then
}; };
_victimPosition = getPos _victim; _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["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 true