Garry's Mod Wiki

properties

The properties library gives you access to the menu that shows up when right clicking entities while holding C.

Fields

table properties.List
A list of all properties registered with properties. Add.

Methods

properties.Add( string name, table propertyData )
Add properties to the properties module. Properties can be blocked via GM:CanProperty.
boolean properties.CanBeTargeted( Entity ent, Player ply )
Returns true if given entity can be targeted by the player via the properties system. This should be used serverside in your properties to prevent abuse by clientside scripting.
Entity properties.GetHovered( Vector pos, Vector aimVec )
Returns an entity player is hovering over with their cursor.
properties.OnScreenClick( Vector eyepos, Vector eyevec )
Checks if player hovers over any entities and open a properties menu for it.
properties.OpenEntityMenu( Entity ent, table tr )
Opens properties menu for given entity.
properties.Remove( string name )
Remove an entity right-click property. See properties. Add for details.