Garry's Mod Wiki

SpawnIcon

Description

A SpawnIcon displays an image for the given model path. It is mostly used in the Spawn Menu (Q).

Parent

Derives from DButton.

Example

Creates a DFrame with a SpawnIcon inside.

local Panel = vgui.Create( "DFrame" ) -- Main Frame Panel:SetPos( 200, 200 ) Panel:SetSize( 200, 200 ) Panel:SetTitle( "Spawn Icon Test" ) Panel:SetVisible( true ) Panel:SetDraggable( false ) Panel:ShowCloseButton( true ) Panel:MakePopup() local SpawnI = vgui.Create( "SpawnIcon" , Panel ) -- SpawnIcon SpawnI:SetPos( 75, 75 ) SpawnI:SetModel( "models/props_borealis/bluebarrel001.mdl" ) -- Model we want for this spawn icon

Page Links


Special Pages


Wikis

?

Render Time: 30ms

DB GetPage 4
Generate Html 2
SaveChanges (1) 9
Render Body 0
Render Sidebar 12