There are many kill/dead message scripts, but i couldnt find any that will output distance which from player was killed.
Ive seen it on few servers, so i decided to make my own but somehow it doesent work..
Could someone take a look on it, and help me please
addEventHandler ( "onPlayerWasted" , root,
function ( _, killer )
x,y,z = getElementPosition ( source )
x1,y1,z1 = getElementPosition ( killer )
distance = getDistanceBetweenPoints3D ( x, y, z, x1, y1, z1 )
outputChatBox ( getPlayerName(source).." was killed by "..getPlayerName ( killer ), root, 255, 255, 255 )
outputChatBox ( "Distance: "..distance, root, 255, 255, 255 )
end)