addEventHandler("onPlayerWasted",root,function(_,killer)
if killer and getElementType(killer) == "player" then
local VictimX,VictimY,VictimZ = getElementPosition(source);
local KillerX,KillerY,KillerZ = getElementPosition(killer);
local Distance = getDistanceBetweenPoints3D(VictimX,VictimY,VictimZ,KillerX,KillerY,KillerZ);
outputChatBox(getPlayerName(source).." was killed by "..getPlayerName(killer).." from a distance of "..tostring(Distance).."!",root,255,255,255);
end;
end);