does anyone know what my problem is? when i try it, it only shows me spectating when i die not people spectating me. If anyone can fix it i would greatly appreciate it.

Code:
hook.Add( "HUDPaint", "GetSpectators", function()
if GetConVar( "spectators_enable" ):GetInt() == 1 then
local ply = LocalPlayer()
for k,v in pairs ( player.GetAll() ) do
	if ( ply:GetObserverMode() == OBS_MODE_IN_EYE || ply:GetObserverMode() == OBS_MODE_CHASE ) then
		draw.DrawText( "Players Spectating you: "..ply:Nick(), "TargetIDSmall", ScrW()/2, 25, Color( 255, 100, 50 ), 1 )
		end
	end
end
end)
CreateClientConVar( "spectators_enable", 0, false, false )