scripted_ents.Register
Description
Registers an ENT table with a classname. Reregistering an existing classname will automatically update the functions of all existing entities of that class.
Sub-tables provided in the first argument will not carry over their metatable, and will receive a BaseClass key if the table was merged with the base's. Userdata references, which includes Vectors, Angles, Entities, etc. will not be copied.
Arguments
Example
local ENT = scripted_ents.Get( "gmod_button" )
local oldUse = ENT.Use
function ENT:Use( activator, caller, type, value )
print( tostring( self.Entity ) .. " just got pressed!" )
oldUse( self, activator, caller, type, value )
end
scripted_ents.Register( ENT, "gmod_button" )