Garry's Mod Wiki

GM:PreRegisterSENT

GM:PreRegisterSENT

  boolean GM:PreRegisterSENT( table ent, string class )

Description

Arguments

1 table ent
The entity table to be registered.
2 string class
The class name to be assigned.

Returns

1 boolean
Return false to prevent the entity from being registered. Returning any other value has no effect.

Example

Disallow registration of entities created by Garry, and change admin-only entities into regular entities.

hook.Add( "PreRegisterSENT", "MakeThingsFun", function( ent, class ) if ( ent.Author == "Garry Newman" ) then return false end ent.AdminOnly = false end )

Special Pages


Wikis

?

Render Time: 22ms

DB GetPage 2
Generate Html 5
SaveChanges (1) 6
Render Body 0
Render Sidebar 7