Modules/IRCEcho/ircInit

From Multi Theft Auto: Wiki
Revision as of 14:25, 13 January 2008 by VRocker (talk | contribs) (New page: __NOTOC__ Initializes the module for use in the script. Must be ran in the scripts you want to use with the echo ==Syntax== <syntaxhighlight lang="lua"> function ircInit() </syntaxhighlight> ==Example== '''Examp...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Initializes the module for use in the script. Must be ran in the scripts you want to use with the echo

Syntax

function ircInit()


Example

Example 1: This example initializes the module on resource startup

function onResourceStart( res )
	if ( res == getThisResource () ) then
		ircInit()
		outputServerLog( "Initialized IRC for " .. getResourceName( res ) )
	end
end

addEventHandler( "onResourceStart", getRootElement(), onResourceStart )

See also