ENT.StartTouch

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameStartTouch
SyntaxENT:StartTouch( Entity ent )
DescriptionNone
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=ENT.StartTouch]ENT.StartTouch [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPrints a message to every player on the server when the SENT touches a player.
Used onNewerServer.png
Code
function ENT:StartTouch( ent )
	if ( ent:IsValid() and ent:IsPlayer() ) then
		for k,v in pairs(player.GetAll() do
			v:PrintMessage( HUD_PRINTCENTER, "Why hello there!" )
		end
	end
end
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox