GM:AcceptInput

From Garry's Mod
Jump to: navigation, search
 GM:AcceptInput( )

Contents

Description

Called when a map I/O event occurs.

Arguments

Entity ent

Entity that receives the input

Arguments

string input

The input name

Arguments

Entity activator

Activator of the input

Arguments

Entity caller

Caller of the input

Arguments

any value

Data provided with the input

Returns

boolean

Return true to prevent this input from being processed.

Examples

Example

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 )


Personal tools
Navigation