Gamemode.PlayerCanSeePlayersChat

From GMod Wiki

Revision as of 15:16, 17 February 2011 by BlackVoid (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NamePlayerCanSeePlayersChat
SyntaxGM:PlayerCanSeePlayersChat( String Text, Boolean TeamOnly, Player Listener, Player Speaker )
DescriptionCan this player see the other player's chat?
ReturnsBoolean
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.PlayerCanSeePlayersChat]Gamemode.PlayerCanSeePlayersChat [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionHow the base gamemode handles it.
Used onNewerServer.png
Code
function GM:PlayerCanSeePlayersChat( strText, bTeamOnly, pListener, pSpeaker )
 
	if ( bTeamOnly ) then
 
		if ( !IsValid( pSpeaker ) || !IsValid( pListener ) ) then return false end
 
		if ( pListener:Team() != pSpeaker:Team() ) then return false end
 
	end
 
	return true
 
end
OutputN/A


Additional Notes

See Also


Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox