Garry's Mod Wiki

Revision Difference

GM:HUDDrawTargetID#549404

<function name="HUDDrawTargetID" parent="GM" type="hook"> <ishook>yes</ishook> <description>Called from <page>GM:HUDPaint</page> to draw player info when you hover over a player with your crosshair or mouse.</description> <realm>Client</realm> <rets>⤶ <ret name="" type="boolean">Should the player info be drawn.</ret>⤶ </rets>⤶ </function> <example> <description>This code will turn off the player and health appearing when you look at them.</description> <code> -- First solution: gamemode function overriding.⤶ -- First solution: return false⤶ hook.Add( "HUDDrawTargetID", "HidePlayerInfo", function()⤶ ⤶ return false⤶ ⤶ end )⤶ ⤶ -- Second solution: override the gamemode hook⤶ function GM:HUDDrawTargetID() ⤶ return false⤶ end ⤶ -- Second solution: hook value return.⤶ hook.Add( "HUDDrawTargetID", "HidePlayerInfo", function()⤶ ⤶ return false -- or whatever you want⤶ ⤶ end )⤶ </code> </example>