Garry's Mod Wiki

GM:ShouldDrawLocalPlayer

  boolean GM:ShouldDrawLocalPlayer( Player ply )

Description

Called to determine if the LocalPlayer should be drawn.

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 CamData structure table instead.

This hook has an internal cache that is reset at the start of every frame. This will prevent this hook from running in certain cases. This cache is reset in cam.Start and in a future update in render.RenderView when rendering extra views.

Arguments

1 Player ply
The player.

Returns

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