Help spawn death

Recommended Posts


I need a help in a Spwan script when it is born .. I am trying to make a system that appears the nick of the player that killed, only case died alone does not appear Look at the script below Please do not know where to errando .. script works only That when the player kills does not appear his nickname only appears that he died


function showDayZDeathScreen(ammo, attacker, weapon, bodypart)
  local x,y,z = getElementPosition(source)
  setCameraMatrix (x,y,z, 0,0,5000)
  deadBackground = guiCreateStaticImage(0,0,1,1,"images/dead.png",true)
  deadText = guiCreateLabel(0,0,1,0.2,"Aguarde...",true,deadBackground)
  guiLabelSetHorizontalAlign(deadText, "center", false)
  guiLabelSetVerticalAlign(deadText, "center")
      if (attacker) then
        local tempString
        if (getElementType (attacker) == "player" ) then
            tempString = "Wait ...\nYou will be reborn in 10 seconds.\n\nYou died in "..getPlayerName( source ).." ("..getWeaponNameFromID ( weapon )..")"
        elseif ( getElementType ( attacker ) == "vehicle" ) then
            tempString = "Wait ...\nYou will be reborn in 10 seconds.\n\nYou died in the vehicle."
        text = tempString

        text = "Wait...\nYou will be reborn in 10 Seconds.\n You died."

      guiSetText(deadText, text)
      if number < 1 then
        if isElement(deadBackground) then
    end, 1000, 7)



I need to know where I'm wrong and how to fix this I'm waiting for an answer .. I've been trying to get this all day



Share this post

Link to post

You want to know where you made a mistake? Then this tutorial is perfect for you:


  • Like 1

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.