Spawnicon:SetModel

From GMod Wiki

Jump to: navigation, search
Function
Syntax SpawnIcon:SetModel( String Model, Integer Skin )
Description:
Sets the model of a spawnicon
Returns: nil
In Object: SpawnIcon
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Spawnicon:SetModel]Spawnicon:SetModel [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionSets a SpawnIcon's model.
Used onNewerClient.png
Code
local Frame = vgui.Create( "DFrame" )
Frame:SetPos( 20, 20 )
Frame:SetSize( 100, 100 )
Frame:SetVisible( true )
Frame:SetDraggable( true )
Frame:ShowCloseButton ( true )
 
local Icon = vgui.Create( "SpawnIcon", Frame)
Icon:SetPos( 20, 20 )
Icon:SetModel( "models/Combine_Helicopter/helicopter_bomb01.mdl" )
OutputCreates a frame with a pretty spawn icon in it.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox