iiv03 Posted October 30, 2019 Share Posted October 30, 2019 (edited) hey , i have a problem in countdown gamemode race and the pictures are not showing i don't know why, but i feel that it is in the function setcount is not giving an order to interpolateBetween count = { tick = 0, countdownValue = nil, alpha = 0 } --Optimization function drawCountdown() local currentTick = getTickCount() count.alpha = interpolateBetween(count.alpha or 0, 0, 0, count.countdownVisible and 1 or 0, 0, 0, dxDrawImage(hud.countdownX - scale/2, hud.countdownY - scale/2, hud.countdownSize - scale, hud.countdownSize - scale, path, 0, 0, 0, tocolor(255, 255, 255, 255 * count.alpha), false) end --INTERPOLATEBETWEEN function setcount(countdown) if countdown then if not count.countdownVisible then count.countdownVisible = true end count.tick = getTickCount() count.countdownValue = countdown if count.countdownValue == 0 then count.countdownEndTimer = setTimer(setcount, 1000, 1, false) end else if count.countdownEndTimer and isTimer(count.countdownEndTimer) then killTimer(count.countdownEndTimer) end count.tick = getTickCount() count.countdownVisible = false end end addEvent("onArenaDrawCountdown",true) addEventHandler("onArenaDrawCountdown",resourceRoot,setcount) --FUNCTION COUNTDOWN I fixed it i forget onClientRender._. Edited October 30, 2019 by xFabel Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now