Garry's Mod Wiki


boolean GM:CanEditVariable( Entity ent, Player ply, string key, string val, table editor )


Called when a variable is edited on an Entity (called by Edit Properties... menu), to determine if the edit should be permitted.

See Editable entities for more details about the system.


1 Entity ent
The entity being edited
2 Player ply
The player doing the editing
3 string key
The name of the variable
4 string val
The new value, as a string which will later be converted to its appropriate type
5 table editor
The edit table defined in Entity:NetworkVar


1 boolean
Return true to allow editing


From base/gamemode/variable_edit.lua

Makes "Edit Properties..." right click property admin only

function GM:CanEditVariable( ent, ply, key, val, editor ) return ply:IsAdmin() end

Page Links

Special Pages



Render Time: 42ms

DB GetPage 3
Generate Html 18
SaveChanges (1) 8
Render Body 0
Render Sidebar 11