Try this:
local init_tick
function renderDisplay ( )
local elapsed_seconds = ( getTickCount ( ) - init_tick ) / 1000
if ( elapsed_seconds >= 10 ) then -- the part where you specify how many seconds it should stay until it disappears
init_tick = nil
removeEventHandler ( "onClientRender", getRootElement(), renderDisplay )
end
dxDrawImage ( 0,0, 1000, 500, 'data/img/infernusai.png', angle, 0, 0 )
end
function HandleTheRendering ( )
if ( init_tick ) then
return
end
init_tick = getTickCount ( )
addEventHandler("onClientRender", getRootElement(), renderDisplay)
end
addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering)
addCommandHandler ( "bibis", HandleTheRendering )