-- Server Side
addEventHandler("onPlayerWasted", root, function (_, attacker)
if attacker and attacker ~= source and getElementType ( attacker ) == 'player' then
setElementHealth(attacker, getElementHealth(attacker) + 35 )
triggerClientEvent(attacker,"dienoob",attacker)
outputChatBox("[", attacker, 0, 255, 0, true)
end
end)
-- Client Side
local img = guiCreateStaticImage(93,439,44,35,"heart.png",false)
addEvent("dienoob", true)
addEventHandler("dienoob", getRootElement(),
function ()
if isElement ( sound ) then destroyElement ( sound ) end
sound = playSound("Heartbeat.mp3", false)
setSoundVolume(sound, 1.0)
guiSetVisible(img,true)
setTimer(guiSetVisible, 3000, 1, img, false)
end)