Garry's Mod

Garry's Mod

Customizable Taunt Menu for Prop Hunt
Vash Baldeus 21 Mar, 2017 @ 8:56am
Taunt delay code.
Just replace the end of SERVER with this:
util.AddNetworkString("send_taunt") net.Receive( "send_taunt", function( _, ply ) local taunt = net.ReadString() if ((ply.Delay or 0) < CurTime()) then sound.Add( { name = "playerTauntSound", channel = CHAN_AUTO, volume = 1.0, level = 150, pitch = 100, sound = taunt } ) ply:EmitSound("playerTauntSound") ply.Delay = CurTime() + SoundDuration(taunt) + 3 end end ) end

It will make a dealy, forbid spam.
< >
Showing 1-2 of 2 comments
M̶O̶N͞4̵͢D͘  [developer] 25 Mar, 2017 @ 1:15pm 
Nice! I will include this in the next version if thats ok :steamhappy:
Vash Baldeus 25 Mar, 2017 @ 1:23pm 
Originally posted by Catzen:
Nice! I will include this in the next version if thats ok :steamhappy:
Sure, just note that some taunts might not work correct as according to GLUA wiki the function I used is not precise (SoundLength)
< >
Showing 1-2 of 2 comments
Per page: 1530 50