Garry's Mod Wiki

GM:PlayerStartVoice

GM:PlayerStartVoice( Player ply )

Description

Called when a player starts using voice chat.

Arguments

1 Player ply
Player who started using voice chat

Example

Shows the icon when the player talks

local icon = Material("icon32/unmuted.png") local function iconfunc() surface.SetDrawColor(255, 255, 255) surface.SetMaterial(icon) surface.DrawTexturedRect(200, 200, 200, 200) end hook.Add("PlayerStartVoice", "ImageOnVoice", function() hook.Add("HUDPaint", "ImageOnVoice", iconfunc) end) hook.Add("PlayerEndVoice", "ImageOnVoice", function() hook.Remove("HUDPaint", "ImageOnVoice") end)

Page Links


Special Pages


Wikis

?

Render Time: 90ms

DB GetPage 52
Generate Html 4
SaveChanges (1) 13
Render Body 0
Render Sidebar 18