Can surface.DrawText() draw when camera is equipped?

I’ve been trying to draw text while having camera equipped
Is there a way to disabled disappearance of my text when camera is equipped? or does it have to disappear?

Would require various ifs or to check if the current active weapon is the camera.

I don’t know how to use this :confused: I still didn’t do SWEPs

Read the example on the page. Post any code you’ve tried that doesn’t work.

I’ve tried this:




if(CLIENT) then

	local CURRENT_WEAPON = NULL

	function CURRENT_WEAPON:DrawHUD()

		print("Drawing...?")

	end


	function thinking()

		CURRENT_WEAPON = LocalPlayer():GetActiveWeapon()

	end

	hook.Add( "Think", "thinkingEvent", thinking )

end




In my head it seem different but this method didn’t work for me

Oh, I thought you were modifying the camera file. In that case, use a HUDPaint hook and check if the active weapon is the camera.

I’ve tried this:




if(CLIENT) then

	function PaintHUD()

		print("CurrentWeapon:" .. LocalPlayer():GetActiveWeapon():GetPrintName())

	end

	hook.Add( "HUDPaint", "paintEvent", PaintHUD )

end



This paints with other weapons, But it stops when camera is being equipped

You need to use

GM:RenderScreenspaceEffects

[editline]5th October 2017[/editline]

For some reason the camera HUD draws over everything else except for a select few hooks including that one

I just figured out that i can use frames :s::hammered: