Interesting idea.
And for the main function of what I'd want, I think it would work 100% (making an automatic table of sbox_ and sbox_wiremax_ commands)
Actually, wouldn't Gmod lua functions execute before any others? So even if I somehow overwrote CreateConVar, sbox_ standard from server.cfg wouldn't use mine, but use Garry's original?
As for the wire mod, seems I'd have a 50/50 chance whether my function got used first.
And, with my inexperience here, how would I do it?
CreateConvar is a server side function, and doesn't seem to have any lua. Probably like ConvarExists...it's in the static gmod code.
Without having any lua to base it on, how would I go about doing it?
I've looked at our ULib shared IsSuperAdmin/Admin, and see a meta, but I'm not sure how to still have the variables passed to it run/get added after I added them to my tables.
There is a FindMetaTable("ConVar") to work with, but no CreateConVar function within it.
] lua_run convars = FindMetaTable("ConVar") PrintTable(convars)
> convars = FindMetaTable("ConVar") PrintTable(convars)...
MetaID = 25
GetName = function: 03B41D40
MetaName = ConVar
GetFloat = function: 03B41D88
GetInt = function: 03B41DA0
GetBool = function: 03B41DD0
GetString = function: 03B41E00
GetDefault = function: 03B41E18
__index:
MetaID = 25
GetName = function: 03B41D40
MetaName = ConVar
GetFloat = function: 03B41D88
GetInt = function: 03B41DA0
GetBool = function: 03B41DD0
GetString = function: 03B41E00
GetDefault = function: 03B41E18
__index = table: 03F3CD60
GetHelpText = function: 03B41D70
GetHelpText = function: 03B41D70
Any guidance would be appreciated.