Garry's Mod Wiki


  Panel DForm:PropSelect( string label, string convar, table models, number height = 2 )


Creates a PropSelect panel and docks it to the top of the DForm.


1 string label
The label to display above the prop select.
2 string convar
The convar to set the selected model to.
3 table models
A table of models to display for selection. Supports 2 formats:
  1. Key is the model and value are the convars to set when that model is selected in format convar=value
  2. An table of tables where each table must have the following keys:
  • string model - The model.
  • number skin - Model's skin. Defaults to 0
  • string tooltip - Displayed when user hovers over the model. Defaults to the model path.
  • The key of the table is the value of the convar.
4 number height = 2
The height of the prop select panel, in 64px icon increments.


1 Panel
The created PropSelect panel.