Big Smoker Posted June 2, 2017 Share Posted June 2, 2017 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 Spoiler function showDayZDeathScreen(ammo, attacker, weapon, bodypart) local x,y,z = getElementPosition(source) fadeCamera(true,5) setCameraMatrix (x,y,z, 0,0,5000) deadBackground = guiCreateStaticImage(0,0,1,1,"images/dead.png",true) playSound("sounds/panic_0.ogg") deadText = guiCreateLabel(0,0,1,0.2,"Aguarde...",true,deadBackground) guiLabelSetHorizontalAlign(deadText, "center", false) guiLabelSetVerticalAlign(deadText, "center") setTimer(function() setTimer(function() 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." end text = tempString else text = "Wait...\nYou will be reborn in 10 Seconds.\n You died." end guiSetText(deadText, text) if number < 1 then guiSetVisible(deadBackground,false) if isElement(deadBackground) then destroyElement(deadBackground) end end end, 1000, 7) end,2500,1) end addEvent("onClientPlayerDeathInfo",true) addEventHandler("onClientPlayerDeathInfo",getRootElement(),showDayZDeathScreen) 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 By: ~Baido Link to comment
Moderators IIYAMA Posted June 3, 2017 Moderators Share Posted June 3, 2017 You want to know where you made a mistake? Then this tutorial is perfect for you: 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now