Garry's Mod Wiki

scripted_ents.GetStored

table scripted_ents.GetStored( string classname )

Description

Returns the actual ENT table for a class. Modifying functions/variables in this table will change newly spawned entities

Arguments

1 string classname
The classname of the ENT table to return

Returns

1 table
entTable

Example

Modifies all newly spawned gmod_button's to print a message on use

local ENT = scripted_ents.GetStored("gmod_button").t 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

Page Links


Special Pages


Wikis

?

Render Time: 63ms

DB GetPage 41
Generate Html 3
SaveChanges (1) 12
Render Body 0
Render Sidebar 6