No esta completo, Solo puse el codigo que lo hace mover en eje de las X
local sx, sy = 1280,600
local x, y = guiGetScreenSize ( )
local font2 = dxCreateFont( "img/font2.ttf", ( 15 / sy ) * y )
function joinQuit()
for _, v in ipairs( textos ) do
local i = v[1]
local texto = v[2]
local ancho = dxGetTextWidth( texto, 0.60, font2, true )
--outputDebugString( ancho )
local cuenta = ( getTickCount( ) - textos["tick2_"..tostring(i)] )
local endTime = textos["tick_"..tostring(i)] + 1000
local elapsedTime = getTickCount() - textos["tick_"..tostring(i)]
local duration = endTime - textos["tick_"..tostring(i)]
local progress = elapsedTime / duration
local xe, x2, ae = interpolateBetween ( 0, 0, 0, ancho+2, ancho+1, 255, progress, "OutQuad")
--outputDebugString( xe )
local alp = 0
textos["rectangle_"..tostring(i)], textos["text_"..tostring(i)], alp = xe , x2 , ae
if cuenta >= 2500 then
alp = 0
local newcount = math.floor( ( cuenta / 10 ) - 250 )
if newcount <= 100 then
textos["texty_"..tostring(i)] = newcount
end
if newcount <= 100 then
textos["rectangley_"..tostring(i)] = newcount
end
local newcounts = math.floor( ( ( cuenta / 10 ) - 250 ) * 2.5 )
if newcounts <= 250 then
textos["alpha_"..tostring(i)] = newcounts
end
if newcounts >= 240 then
textos["alpha_"..tostring(i)] = 250
table.remove( textos, 1 )
end
end
if 200 - textos["alpha_"..tostring(i)] - 175 > 0 then
dxDrawRectangle( ( ( 1270- ( textos["rectangle_"..tostring(i)] / sx ) * x ) / sx ) * x , ( ( 290 -textos["rectangley_"..tostring(i)]) / sy ) * y , ( 165+ancho / sx ) * x, ( 15 / sy ) * y, tocolor(0, 0, 0, 200 -( textos["alpha_"..tostring(i)] - 175 ) ), false)
end
if 200 -textos["alpha_"..tostring(i)] > 0 then
dxDrawText(texto, ( ( 1275 - ( textos["text_"..tostring(i)] / sx ) * x) / sx ) * x , ( ( 290-textos["texty_"..tostring(i)] ) / sy ) * y , ( 500 / sx ) * x, ( 315 / sy ) * y, tocolor(255, 255, 255, 200 -textos["alpha_"..tostring(i)] ), 0.60, font2, "left", "top", false, false, false, true, false)
end
end
end
addEventHandler("onClientRender", root, joinQuit )
function outputBarMessage( msj )
if not textos then
textos = {}
end
if not id then
id = {}
end
textos["tick2_"..tostring(#id+1)] = getTickCount( )
textos["tick_"..tostring(#id+1)] = getTickCount( )
textos["rectangle_"..tostring(#id+1)] = 0
textos["text_"..tostring(#id+1)] = 0
textos["rectangley_"..tostring(#id+1)] = 0
textos["texty_"..tostring(#id+1)] = 0
textos["alpha_"..tostring(#id+1)] = 0
table.insert( textos, { #id+1, tostring( msj ) })
table.insert( id, { #id+1 })
end
EDIT2: Lo he puesto completo, no importa de igual voy a liberar este recurso.