I'm trying to make a little something like the right click for editable entities but transfer it over to players as well. The issue is that I can't find a function or way to get all the NetworkVars an entity has installed on it. The next step would be checking if it's tagged as editable.
[editline]27th October 2017[/editline]
Was searching the wrong thing, [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/Entity/GetNWVarTable"]Entity:GetNWVarTable[/URL] is my solution. It's just not available for use at the moment. Any way around this?
It's undocumented but I use
ENTITY:GetNetworkVars()
It returns all of the network vars and their values
[QUOTE=dence47;52827891]It's undocumented but I use
ENTITY:GetNetworkVars()
It returns all of the network vars and their values[/QUOTE]
As per the [URL="https://github.com/Facepunch/garrysmod/blob/784cd57576d85712fa13a7cea3a9523b4df966b0/garrysmod/lua/includes/extensions/entity.lua#L358-L378"]source[/URL], that won't include netvars of type entity. Only way I can see to get the actual table is by using [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/debug/getupvalue]debug.getupvalue[/url] on one of those functions below it.
Sorry, you need to Log In to post a reply to this thread.