Garry's Mod Wiki


boolean GM:ShouldDrawLocalPlayer( Player ply )


Called to determine if the LocalPlayer should be drawn.

Due to an optimization, this hook is only called once per frame.

This is problematic if you need to have the player drawn only in certain contexts, such as within render.RenderView or based on the render target. As a workaround, you can call cam.Start3D and cam.End3D within this hook to force the engine to call it every time.

Issue Tracker: 3092

If you're using this hook to draw a player for a GM:CalcView hook, then you may want to consider using the drawviewer variable you can use in your Structures/CamData table instead.


1 Player ply
The player


1 boolean
True to draw the player, false to hide.

Page Links

Special Pages



Render Time: 132ms

DB GetPage 46
Generate Html 11
SaveChanges (1) 61
Render Body 0
Render Sidebar 12