Jump to content

dxDrawImage


Recommended Posts

Hi! I want to make a script, in which you die, an image appears. It really does, but only just for like not even for a second. About half a second. And i could see the image in game, after triggering it, but it disappeared immediately.
 

function startHalalMusic()
local halalMusic = playSound ("assets/death.mp3")
local dX, dY, dZ = getElementPosition(localPlayer)
setCameraMatrix (dX+5, dY+5, dZ+5, dX, dY, dZ)
setPlayerHudComponentVisible ("all", false)
local x, y = guiGetScreenSize(localPlayer)
local img = dxDrawImage (x/2, y/2, 500, 500, "assets/death.png")
showChat (false)
end
addEvent("startHalalMusic", true)
addEventHandler("startHalalMusic", getRootElement(), startHalalMusic)

function stopHalalMusic()
end
addEvent("stopHalalMusic", true)
addEventHandler("stopHalalMusic", getRootElement(), stopHalalMusic)

function ujraeledes()
	local varjalMar = setTimer( function()
			triggerServerEvent ("respawnJatekos", localPlayer)
			setPlayerHudComponentVisible ("all", true)
			outputChatBox ("#A1D490[King of the Hill]#FFFFFF Újra éledtél.", 255, 255, 255, true)
			showChat (true)
	end, 6000, 1)
end
addEvent ("ujraeledes", true)
addEventHandler ("ujraeledes", getRootElement(), ujraeledes)

I really barely can see the image, but it disappears, right away.

Edited by rusztamas
Link to comment

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.
×
×
  • Create New...