Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function LoseControl:OnUpdate()
- local remain = self.tEnd - GetTime()
- if remain > 0 then
- if remain <= 60 then
- self.timer:SetTextColor(1,1,0)
- self.timer:SetFormattedText("%.01f",remain)
- elseif remain <= 3600 then
- self.timer:SetText(ceil(remain/60).."m")
- self.timer:SetTextColor(1,1,1)
- else
- self.timer:SetText(ceil(remain/3600).."h")
- self.timer:SetTextColor(0.6,0.6,0.6)
- end
- else
- self:Hide()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment