Garry's Mod Wiki

DModelPanel:GetEntity

CSEnt DModelPanel:GetEntity()

Description

Returns the entity being rendered by the model panel.

Returns

1 CSEnt
The rendered entity (client-side)

Example

Creates an antlion model panel and sets the antlion's skin to 1.

BGPanel = vgui.Create("DPanel") BGPanel:SetPos(20, 20) BGPanel:SetSize(200, 200) local mdl = vgui.Create("DModelPanel", BGPanel) mdl:SetSize(200, 200) mdl:SetModel("models/antlion.mdl") mdl:SetLookAt(Vector(0, 0, 20)) mdl:GetEntity():SetSkin(1)
Output:

Page Links


Special Pages


Wikis

?

Render Time: 43ms

DB GetPage 2
Generate Html 7
SaveChanges (1) 15
Render Body 0
Render Sidebar 17