Garry's Mod Wiki

player_manager.AllValidModels

  table player_manager.AllValidModels()

Description

Returns a copy of the entire list of valid player models.

You will likely want to use player_manager.GetAllPlayerModels to also get categories and nice names of each of the player models.

Returns

1 table<string, string>
List of all valid player models.

Example

Store the list of valid player models in a local variable, and print the valid model path for "Alyx".

local models = player_manager.AllValidModels() print(models["alyx"])
Output: Console outputs: "models/player/alyx.mdl"