Garry's Mod Wiki

GM:WorkshopSubscriptionsMessage

  GM:WorkshopSubscriptionsMessage( string message )

Description

Called when a Workshop Message is received?. Currently, it seems like the message will be #ugc.mounting every time.

When does this exactly get called?. If an addon is subscribed, unsubscribed, error occurs or on any event?

Arguments

1 string message
The Message from the Workshop. Will be a phrase that needs to be translated.

Example

Translates the message and prints them.

hook.Add( "WorkshopSubscriptionsMessage", "Example", function(msg) print( language.GetPhrase(msg) ) end ) steamworks.Subscribe( "104514796" ) -- Subscribes to a Random addon. "Directional Gravity" steamworks.ApplyAddons() timer.Simple(10, function() steamworks.Unsubscribe( "104514796" ) --UnSubscribes the Random Addon. "Directional Gravity" steamworks.ApplyAddons() end)
Output:
Mounting Workshop content, please wait... [After 10 Seconds] Mounting Workshop content, please wait...