hello guys,
I'm creating a panel which should appear when you died or when you log in the server. But what I've tried didnt work. Someone can tell me how it should be?
There are 2 warnings with debug
lua:8 Bad argument @ 'addEventHandler' [Expected function at argument 3, got none]
lua:20 Bad argument @ 'addEventHandler' [Expected function at argument 3, got none]
function drawPanel()
dxDrawImage(306, 186, 399, 344, "wdspawn.png", 0, 0, 0, tocolor(0, 0, 0, 160), false)
dxDrawText("Spawn", 405, 334, 605, 378, tocolor(255, 255, 255, 255), 1.30, "bankgothic", "center", "top", false, false, true, false, false)
end
local drawingPanel = false
addEventHandler ( "onPlayerLogin", root )
function ()
if not drawingPanel then
drawPanel()
drawingPanel = true
else
drawPanel()
drawingPanel = false
end
end
addEventHandler( "onPlayerWasted", root )
function ()
if not drawingPanel then
drawPanel()
drawingPanel = true
else
drawPanel()
drawingPanel = false
end
end