Garry's Mod Wiki

Garry's Mod Wiki

  table util.RelativePathToGMA_Menu( string filePath )

Description

Returns which Workshop addon the given file belongs to.

Arguments

1 string filePath
The relative path to a file, such as materials/myMaterial.vmt.

Returns

1 table addonInfo
The info about owner addon. Will return nil if the file doesn't belong to an addon. Table Structure:
Author = [Addon Author] File = [Steam folder]\workshop\content\4000\[Addon ID]/[GMA Name].gma ID = [Addon ID] Title = [Addon Title]

Example

Prints the AddonInfo of the given Path (The Addon the file belongs to.)

PrintTable( util.RelativePathToGMA_Menu( "[Insert here something from an addon like a Model]" ) ) -- prints the AddonInfo
Output:
Author = [Addon Author] File = [Steam folder]\workshop\content\4000\[Addon ID]/[GMA Name].gma ID = [Addon ID] Title = [Addon Title]

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...