steamworks/DownloadUGC

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
{{Func
 
{{Func
|Description={{NextUpdate}}
+
|Description=Downloads a Steam Workshop file by its ID and returns a path to it.
Downloads a Steam Workshop file by its ID and returns a path to it.
+
 
|Realm=Client and Menu
 
|Realm=Client and Menu
 
|IsClass=No
 
|IsClass=No

Revision as of 16:08, 21 January 2020

 steamworks.DownloadUGC( )

Contents

Description

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

Arguments

string workshopID

The ID of workshop item to download. NOT a file ID.

Arguments

function resultCallback

The function to process retrieved data. The first and only argument is a string, containing path to the saved file, or nil if the download failed to any reason.

Examples

Example

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

steamworks.DownloadUGC( 104607228, function( name )
	print( name )
end)


Personal tools
Navigation