steamworks/DownloadUGC

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(workshopID is number not string)
 
Line 5: Line 5:
 
}}
 
}}
 
{{Arg
 
{{Arg
|type=string
+
|type=number
 
|name=workshopID
 
|name=workshopID
 
|desc=The ID of workshop item to download. '''NOT''' a file ID.
 
|desc=The ID of workshop item to download. '''NOT''' a file ID.

Latest revision as of 21:07, 22 January 2020

 steamworks.DownloadUGC( )

Contents

Description

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

Arguments

number 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