resource.AddFile
From GMod Wiki
Revision as of 08:38, 17 November 2011 by Di-0xide :: K0m[pwn]3nt Killa (Talk | contribs)
Function | |
Syntax |
resource.AddFile( String filename ) Where is this used? |
Description: | |
Adds a file (and all related files) to the download list for clients. | |
Returns: | nil |
Part of Library: | resource |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Resource.AddFile]Resource.AddFile [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Send the counter strike font to all the clients that decide to play on the server. |
---|---|
Used on | |
Code | resource.AddFile( "resource/fonts/csd.ttf" ) |
Output | N/A |
Additional Notes
- garrysmod/ is the root folder.
- The capitalization of the path must match the actual path.
- For convenience, this function will automatically add any other files that are related to the selected one, and throw an error if it can't find them. For example, a .vmt file will automatically add the .vtf with the same name, and a .mdl file will automatically add all .vvd, .ani, .dx80.vtx, .dx90.vtx, .sw.vtx, .phy and .jpg files with the same name, with a separate error for each missing file. If you do not want it to do this, use resource.AddSingleFile.