Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Timer Prison --------------------------------------------------------------------------------------
- Timer Prison made by Numerix (https://steamcommunity.com/id/numerix/)
- --------------------------------------------------------------------------------------------------]]
- local work = "no data"
- local duration = 0
- local timeleft = 0
- local text_timer
- hook.Add("HUDPaint", "TimerPrison:HUDPaint", function()
- if work != "no data" then
- timeleft = math.Round(duration - CurTime())
- if GetGlobalBool("DarkRP_Lockdown") then
- text_timer = TimerPrison.GetLanguage("Lockdown ! Go to cells !")
- else
- text_timer = string.format(TimerPrison.GetLanguage("Current task: %s for %s seconds"), work, timeleft )
- end
- surface.SetFont( "Timer.Text" )
- local textlenght = surface.GetTextSize(text_timer)
- draw.RoundedBox(13, 7, ScrH() - 225, textlenght + 20, ScrH()/20, Color(62,62,62,180))
- surface.SetDrawColor( color_white )
- surface.DrawOutlinedRect( 0, 0, 100, 55 )
- surface.SetDrawColor(62,62,62,180)
- surface.DrawRect( 13, 825, 302, 55 )
- surface.SetDrawColor(255, 255, 255)
- surface.DrawOutlinedRect( 13, 825, 303, 55 )
- draw.SimpleText(text_timer, "Timer.Text", ScrW() / 38 - 16, ScrH() - 238.5, Color(255,255,255,255), TEXT_ALIGN_LEFT)
- end
- end)
- net.Receive("TimerPrison:UpdateInfo", function()
- work = net.ReadString()
- duration = net.ReadInt(32)
- if TimerPrison.Settings.SoundFile != "" and !GetGlobalBool("DarkRP_Lockdown") then
- surface.PlaySound(TimerPrison.Settings.SoundFile)
- end
- end)
- surface.CreateFont( "Timer.Text", {
- font = "Roboto",
- size = 20,
- weight = 700,
- } )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement