|  Developer
Updated on November 23, 2021

subscribe(script_name[, events_filter])

  • Subscribe a script for 2GIG events, optionally specifying event filter rules. After subscribing the script will be launched for each event happens on a 2GIG addon and information about this event will be passed as parameters.
Edit
  • script_name: string
Edit
  • subscriber_id: string
Edit
				
					local twogig = require "2gig"

twogig.subscribe("HUB:2gig/scripts/events_handling")