addEventHandler("onPlayerWasted", getRootElement(),
function(ammo, killer, weapon, bodypart)
if (killer) then
if (bodypart == 4) then
outputChatBox("#Ouch ! " ..getPlayerName(killer).. " shot you in your ass!", source, 255, 255, 0, true)
elseif (bodypart == 9)then
outputChatBox("#OWNED ! "..getPlayerName(killer).." shot you in your head!", source, 255, 255, 0, true)
else
outputChatBox("# "..getPlayerName(killer).." killed you! Now kill him, noob! -_-'", source, 255, 255, 0, true)
end
if (killer ~= source) then
local stars = getPlayerWantedLevel(killer)
if (stars == 0) then
setPlayerWantedLevel(killer, stars+1)
elseif (stars == 1) then
setPlayerWantedLevel(killer, stars+2)
elseif (stars == 3) then
setPlayerWantedLevel(killer, stars+3)
outputChatBox(getPlayerName(killer) .. " now has 6 wanted stars! Watch out!", 255, 255, 0, true)
end
end
end
end)