function startgetTickCount()
start = getTickCount()
end
addEventHandler ( "onClientResourceStart", root, startgetTickCount)
local max = 2000 -- Definir valor maximo
local count = 0 -- Definimos el contador
local alpha = 255
function Linea()
if count < max then
now = getTickCount()
count = now - start
else
end
if alpha > 0 then
alpha = alpha - 0.10
else
end
dxDrawRectangle ((1110/mi_x)*user_x, (200/mi_y)*user_y, (count/8/mi_x)*user_x, (30/mi_y)*user_y, tocolor( 0, 0, 0, alpha), false )
dxDrawRectangle ((1100/mi_x)*user_x, (200/mi_y)*user_y, (10/mi_x)*user_x, (30/mi_y)*user_y, tocolor( 0, 255, 0, alpha), false )
dxDrawTextPerLetter ( 'Has comprado una Pizza-HEAL', (1150/mi_x)*user_x, (207/mi_y)*user_y, (0/mi_x)*user_x, (30/mi_y)*user_y, tocolor ( 255, 255, 255, alpha ), 1, "default-bold" )
end
addEventHandler("onClientRender", root, Linea)
setTimer (function()
removeEventHandler("onClientRender",root,Linea)
end, 3000, 1)