General > Developers Corner
Disable Decals
Mr582:
Hello There. I am making a Hidden Gamemode in Gmod and when i was testing the main problem was that you could see the decals on the hiddens body, making it easy to see him. Is there a way to disable decals. If not can someone help me.
MrPresident:
Do you mean their name when you mouse over them?
Mr582:
No the blood. The name would be nice too.
MrPresident:
Here is how you remove the player names
http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index6cc7.html
I'll take a look into the decals.
I couldn't find anything that jumped out at me at first glance. You could do it a pretty hacky way though if you want to.
--- Code: ---function NoBloodHiddenPlayer( ply, atkr )
if ply:IsHiddenPlayer() then
for k, v in pairs( player.GetAll() ) do
v:ConCommand( "r_cleardecals" )
end
end
end
hook.Add( "PlayerHurt", "NoBloodHiddenPlayer", NoBloodHiddenPlayer )
--- End code ---
The IsHiddenPlayer() boolean check would be replaced by you for whatever method you choose for tracking who is a hidden player or not.
[edit-JamminR] Placed hook.add into the code block
JamminR:
Mrpresident, Could he use WEAPON:DoImpactEffect() to override, if the tr table it hit was the player entity that was 'hidden'.
I've no idea if that would work, or if it would work, if one would also have to write in the fact the player got hurt/etc too, though not seen.
Navigation
[0] Message Index
[#] Next page
Go to full version