Garry's Mod Wiki


  spawnmenu.PopulateFromTextFiles( function callback )


This is used internally - although you're able to use it you probably shouldn't.

Loads spawnlists from text files. You probably are looking for spawnmenu.AddPropCategory.


1 function callback
The function to call.
Function argument(s):
1 string strFilename - The file name for the spawnlist.
2 string strName - The "nice" title for the spawnlist.
3 table tabContents - The list of contents for this spawnlist.
4 string icon - Path to an .png icon of the spawnlist, should be 16x16 image.
5 number id - Unique ID of the spawnlist
6 number parentid - UniqueID of the parents spawnlist ID
7 string needsapp - If not empty, the internal folder name of an mountable game that is required for this spawnlist to show up.