• DrawTargetID?
    4 replies, posted
Does HUDDrawTargetID get called only when the player is looking at another player?
No, I think the HUDPaint hook just calls it so it'll look cleaner.
[QUOTE=Chessnut;35616935]No, I think the HUDPaint hook just calls it so it'll look cleaner.[/QUOTE] ^ that It's a seperate hook so you can easily draw your own nameplates.
Does somebody know of a hook that is called when you look at someone? It gets called each time?
No, but you can make your own hooks. [lua] hook.Add("PaintTargettedEntity", "paintPlayerTarget", function(entity) if ( entity:IsPlayer() ) then -- Draw stuff here. end; end); hook.Add("HUDPaint", "paintTargettedEntity", function() local trace = LocalPlayer():GetEyeTraceNoCursor(); local entity = trace.Entity; if ( IsValid(entity) ) then hook.Call("PaintTargettedEntity", GAMEMODE, entity); end; end); [/lua]
Sorry, you need to Log In to post a reply to this thread.