Garry's Mod Wiki


  boolean GM:AcceptInput( Entity ent, string input, Entity activator, Entity caller, any value )


Called when a map I/O event occurs.

See also Entity:Fire and Entity:Input for functions to fire Inputs on entities.


1 Entity ent
Entity that receives the input
2 string input
The input name. Is not guaranteed to be a valid input on the entity.
3 Entity activator
Activator of the input
4 Entity caller
Caller of the input
5 any value
Data provided with the input. Will be either a string, a number, a boolean or a nil.


1 boolean
Return true to prevent this input from being processed. Do not return otherwise.


This would block any input that the lua_run entity would receive.

hook.Add( "AcceptInput", "BlockLuaRun", function( ent, name, activator, caller, data ) if ( ent:GetClass() == "lua_run" ) then return true end end )