Garry's Mod Wiki



  steamworks.DownloadUGC( string workshopID, function resultCallback )


Downloads a Steam Workshop file by its ID and returns a path to it.


1 string workshopID
The ID of workshop item to download. NOT a file ID.
2 function resultCallback
The function to process retrieved data. The first argument is a string, containing path to the saved file, or nil if the download failed to any reason. The second argument is a file_class object pointing to the downloaded .gma file. The file handle will be closed after the function exits.


Downloads the Fire Extinguisher addon from Steam Workshop prints path to its .gma file to be used with game.MountGMA.

steamworks.DownloadUGC( "104607228", function( path, file ) print( path, file ) end)

Special Pages



Render Time: 54ms

DB GetPage 5
Generate Html 5
SaveChanges (1) 34
Render Body 0
Render Sidebar 8