Memory Posted October 25, 2012 Share Posted October 25, 2012 Hi, How can create function "set timeleft", example, if get hunter, time set to 2 minutes? Link to comment
HunT Posted October 25, 2012 Share Posted October 25, 2012 I Dont Know But Maybe This One Can Help U in race_client.lua function updateTime() local tick = getTickCount() local msPassed = tick - g_StartTick if not isPlayerFinished(g_Me) then g_dxGUI.timepassed:text(msToTimeStr(msPassed)) end local timeLeft = g_Duration - msPassed guiSetText(g_GUI.timeleft, msToTimeStr(timeLeft > 0 and timeLeft or 0)) if g_HurryDuration and g_GUI.hurry == nil and timeLeft <= g_HurryDuration then startHurry() end end Edit : Anyway u can make the server side for check the hunter and trigger client with this : guiSetText(g_GUI.timeleft, msToTimeStr(timeLeft > 0 and timeLeft or 0)) -- need edit 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