Draw Player Model

Hey, I want to know if there is a way to make the player models to one team invisible. So everyone on the team with the invisible player models can see each other, but everyone on the other team can’t see the “invisible player model” team. Also, is there a way to remove the sounds emitted from a player moving, for example, walking on grass?

You can use the client-side PrePlayerDraw hook to do this. Returning true in this hook will make the player not drawn that frame.

[lua]function GM:PrePlayerDraw(pl)
local localpl = LocalPlayer()
if localpl:IsValid() and pl:Team() == TEAM_WHATEVER and localpl:Team() ~= TEAM_WHATEVER then
return true

You can return true on the PlayerFootstep hook to silence the default sounds. http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index9322.html
The hook needs to be shared to be predicted properly.

This should all be in the shared.lua right?

Also, the first TEAM_WHATEVER should be the invisible team and the second TEAM_WHATEVER should be the alive team right? or should they all be the alive team?

PrePlayerDraw is client-side so it’s in cl_init.lua

The footsteps need to be in shared.lua. You might actually have to make two separate ones for server and client, I forget how the function is called.

Both TEAM_WHATEVER’s are the invisible people team.