Gamemode.PlayerStartVoice

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NamePlayerStartVoice
SyntaxGM:PlayerStartVoice( Player player )
DescriptionCalled when a player opens their mic.
ReturnsNil
Lua StateNewerClient.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.PlayerStartVoice]Gamemode.PlayerStartVoice [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPrints who opened their mic
Used onNewerClient.png
Code
 
local function PlayerStartVoice( ply )
	print(ply:Name().. " has started talking!")
end
hook.Add( "PlayerStartVoice", "PlayerStartedTheirVoice", PlayerStartVoice)
Output<Player name Here> has started talking!


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox