Hiding Players

So, I was looking for a way to hide players from other players originally I used some shitty piece of code to prevent them being drawn on client but any trails that were from util.SpriteTrail (env_spritetrail’s) would still show and fps would drop regardless even if I colored the trails invisible.

Recently I came across this function

from this page:

I thought: “Oh, I can do something similar to the sourcemod ‘hook’ SetTransmit”

tried calling it with true and false on a player to a player (both ways) with lua_run no effect.

I then tried it in an autorun with a concommand.

Still no dice.

So, does anyone:

  1. Know wether this function works
  2. If so does it work on players
  3. How do I properly use it on players
  4. If none of the above please give alternatives.

Try this: http://wiki.garrysmod.com/page/Entity/SetNoDraw

Thanks, I guess i’ll try calling it on the client unfortunately it will mean that whatever trails the entity has via util.SpriteTrail will show up but maybe SetPreventTransmit will work on the trails.

You could set a variable persay when they go invisible and use that to not draw any pointshop items as well.