Hey guys,
so i got two functions, and i want it to be that when i call the first one with a string as an argument, that one calls the second one with the same string. That is not happening, the string the second one receives is "16" or "17" always. Here's the code
function animateDX(text)
w1 = w1 -10
dxDrawRectangle(w1, screenH * 0.7898, screenW * 0.1224, screenH * 0.1083, tocolor(35, 35, 35, 255), false)
addEventHandler("onClientPreRender",getRootElement(),animateDX)
if(w1 < (screenW * 0.8776)) then
dxText(text)
removeEventHandler("onClientPreRender",getRootElement(),animateDX)
end
end
animateDX("Information")
function dxText(text)
dxDrawRectangle(screenW * 0.8776, screenH * 0.7898, screenW * 0.1224, screenH * 0.1083, tocolor(35, 35, 35, 255), false)
dxDrawText("Info", screenW * 0.8953, screenH * 0.7898, screenW * 0.9807, screenH * 0.8093, tocolor(43, 155, 21, 255), 1.00, "bankgothic", "center", "center", false, true, false, false, false)
dxDrawText(text, screenW * 0.8927, screenH * 0.8185, screenW * 0.9859, screenH * 0.8759, tocolor(254, 255, 255, 255), 1.25, "sans", "center", "top", false, true, false, false, false)
addEventHandler("onClientPreRender",getRootElement(),dxText)
setTimer(function() removeEventHandler("onClientPreRender",root,dxText) end,5000,1)
end