Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Sourcemod_Material = Material( 'particle/Particle_Ring_Wave_AddNoFog' )
- local color = Color( 255, 255, 255, 255 )
- function GetHealthColor(ply)
- if ply:Health() >= 75 then
- return Color( 46, 204, 113, 100 )
- elseif ply:Health() >= 50 then
- return Color( 241, 196, 15, 100 )
- elseif ply:Health() >= 25 then
- return Color( 243, 156, 18, 100 )
- elseif ply:Health() >= 0 then
- return Color( 231, 76, 113, 60 )
- end
- end
- hook.Add( 'PostDrawTranslucentRenderables', 'SourceMod Ring', function()
- for k,v in pairs( player.GetAll() ) do
- if v:Alive() then
- cam.Start3D2D( v:GetPos() + Vector( 0, 0, 5 ),Angle( 0, CurTime() * 120, 0 ), 0.30 )
- local source_width = 100
- surface.SetMaterial( Sourcemod_Material )
- surface.SetDrawColor( GetHealthColor(v) )
- surface.DrawTexturedRect( -source_width, -source_width, source_width*2, source_width*2 )
- cam.End3D2D()
- end
- for k,v in pairs( player.GetAll() ) do
- if v:Alive() and v:IsAdmin() then
- cam.Start3D2D( v:GetPos() + Vector( 0, 0, 5 ),Angle( 0, 120, 0 ), 0.30 )
- local source_width = math.sin( CurTime() + 10 ) * 90
- surface.SetMaterial( Sourcemod_Material )
- surface.SetDrawColor( HSVToColor( 10, 5, math.Rand( 1, 2 ) ), 50 )
- surface.DrawTexturedRect( -source_width, -source_width, source_width*2, source_width*2 )
- cam.End3D2D()
- end
- end
- end
- end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement