StartResource: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 20: Line 20:
*'''loadClientConfigs:''' A boolean specifying if client configs should be loaded alongside the resource.
*'''loadClientConfigs:''' A boolean specifying if client configs should be loaded alongside the resource.
*'''loadClientScripts:''' A boolean specifying if client scripts should be loaded and started alongside the resource.
*'''loadClientScripts:''' A boolean specifying if client scripts should be loaded and started alongside the resource.
*'''loadFiles:''' A boolean specifying if clientside files should be loaded alongside the resource.
*'''loadFiles:''' A boolean specifying if client-side files should be loaded alongside the resource.


===Returns===
===Returns===

Revision as of 00:31, 15 November 2007

This function starts a resource either persistently or as a dependency of the current resource.

Syntax

bool startResource ( resource resourceToStart, [bool persistent = false, bool loadServerConfigs = true, bool loadMaps = true, bool loadServerScripts = true, bool loadHTML = true, bool loadClientConfigs = true, bool loadClientScripts = true, bool loadFiles = true] )

Required Arguments

  • resourceToStart: The resource that should be started.

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • persistant: A boolean specifying if the resource should continue to run even after this resource has been stopped or not. If this is true then the resource will run until another resource or user terminates it or the server shuts down.
  • loadServerConfigs: A boolean specifying if serverside config (XML) files should be loaded with the resource.
  • loadMaps: A boolean specifying if any .map files will be started with the resource.
  • loadServerScripts: A boolean specifying if serverside script files should be started alongside the resource.
  • loadHTML: A boolean specifying if HTML webfiles should be started alongside the resource.
  • loadClientConfigs: A boolean specifying if client configs should be loaded alongside the resource.
  • loadClientScripts: A boolean specifying if client scripts should be loaded and started alongside the resource.
  • loadFiles: A boolean specifying if client-side files should be loaded alongside the resource.

Returns

Returns true if the resource has been started succesfully, false otherwise.

Example

This page does not have an example

--add an example here.

See Also