Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add('CalcView', 'CC.CalcRagdollEyes', CalcRagdollEyes);
- local soundHeart
- hook.Add("Tick", "TickDeathHeartBeat", function()
- local ply = LocalPlayer()
- if not IsValid(ply) then return end
- if not soundHeart then
- soundHeart = CreateSound(game.GetWorld(), "cc/heartbeat.wav")
- soundHeart:SetSoundLevel(0)
- soundHeart:Stop()
- end
- if !ply:Alive() or ply:PassedOut() then
- if not soundHeart:IsPlaying() then
- soundHeart:Play()
- end
- else
- if soundHeart:IsPlaying() then
- soundHeart:Stop()
- end
- end
- end)
- local spawnDelay = 120
- hook.Add( "HUDPaint", "PlayerDeathTimer", function()
- local ply = LocalPlayer()
- if ply:Alive() then
- if ply.SpawnDelay then
- ply.SpawnDelay = false
- end
- else
- if !ply.SpawnDelay then
- ply.SpawnDelay = CurTime() + spawnDelay
- else
- draw.DrawBackgroundBlur(2)
- local scrW, scrH = ScrW(), ScrH()
- local w, h = scrW * 0.35, 28
- local x, y = (scrW * 0.5) - (w * 0.5), (scrH * 0.725) - (h * 0.5)
- local boxX, boxY = scrW / 2, scrH * 0.1
- Text1 = "YOU ARE"
- Text2 = "DEAD"
- Text3 = "You may now respawn!"
- Text4 = "Time Remaining"
- draw.SimpleText(Text1, "SCC_PuristaS", scrW / 2, boxY - 6, Color(0, 0, 0, 200), TEXT_ALIGN_CENTER)
- draw.SimpleText(Text1, "SCC_PuristaS", scrW / 2, boxY - 10, color_white, TEXT_ALIGN_CENTER)
- draw.SimpleText(Text2, "SCC_PuristaA", scrW / 2, boxY + 18, Color(0, 0, 0, 200), TEXT_ALIGN_CENTER)
- draw.SimpleText(Text2, "SCC_PuristaA", scrW / 2, boxY + 14, Color (255, 0, 0, 255), TEXT_ALIGN_CENTER)
- local remainingTime = string.FormattedTime(math.max(ply.SpawnDelay-CurTime(), 0), "%02i:%02i:%02i")
- local remainingTimeNum = ply.SpawnDelay-CurTime();
- if (remainingTimeNum <= 0) then
- draw.SimpleText(Text3, "SCC_PuristaS", scrW / 2, boxY + 244, color_white, TEXT_ALIGN_CENTER);
- draw.SimpleText(Text3, "SCC_PuristaS", scrW / 2, boxY + 244, color_white, TEXT_ALIGN_CENTER);
- else
- draw.SimpleText(Text4, "SCC_PuristaS", scrW / 2, boxY + 244, color_white, TEXT_ALIGN_CENTER);
- draw.SimpleText(Text4, "SCC_PuristaS", scrW / 2, boxY + 244, color_white, TEXT_ALIGN_CENTER);
- draw.SimpleText(remainingTime, "SCC_PuristaS", scrW / 2, boxY + 284, color_white, TEXT_ALIGN_CENTER);
- draw.SimpleText(remainingTime, "SCC_PuristaS", scrW / 2, boxY + 284, color_white, TEXT_ALIGN_CENTER);
- end
- end
- end
- end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement