Hey guys. Pretty simple question here. I may be using this totally wrong, but I’d like to use the vgui element “DModelPanel” ( or something similar ) to draw an SENT inside a dframe. Is this possible, or only with models such as props and playermodels?
edit: My code so far is this:
local panel = vgui.Create( "DModelPanel", parent ) panel:SetSize( 200, 200 ) panel:SetEntity( "my_sent" )
and it errors with this:
[ERROR] lua/includes/util.lua:184: bad key to string index (number expected, got string) 1. error - [C]:-1 2. __index - lua/includes/extensions/string.lua:262 3. IsValid - lua/includes/util.lua:184 4. unknown - lua/vgui/dmodelpanel.lua:90
edit: I’ve just realized that, obviously, SetEntity requires an entity as it’s arguement. But this is a serversided SENT that I want to show. Would I need to use net messages to send the client an entity?