steamworks/DownloadUGC

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
Line 9: Line 9:
 
|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.
}}
 
{{Arg
 
|type=boolean
 
|name=ignore
 
|desc=Will be removed
 
 
}}
 
}}
 
{{Arg
 
{{Arg

Revision as of 16:17, 18 December 2019

 steamworks.DownloadUGC( )

Contents

Description

Next Update Change

This feature is only available in the next update.

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