Documentation

Package

Constructible This class can be instantiated from your script. You can find more information on the Constructor below. Auto Destroy Instances of this class will be deleted automatically. Custom Properties You cannot add your own properties to instances of this class. They will not be saved and can cause undefined behavior.

A scripting package that is available or running already

Constructor

This class currently lacks documentation for the constructor.

Properties

Name Type Description
name string read only the Package's name
dir string read only the path to the package
valid boolean read only whether the configuration of the package is valid
config string read only JSON-encoded string of the package.json

Functions

Package.Start()

This function is marked as unstable and is not recommended for use in production environments. It is not guaranteed to work at all (we're sorry).

Starts the package

returns: boolean

Example

//Start all the packages
function main(){
  jcmp.packages.forEach(p => {
    p.Start()
  }
}
main();   

Package.Stop()

This function is marked as unstable and is not recommended for use in production environments. It is not guaranteed to work at all (we're sorry).

Stops the package

Example

//Stop all the packages
function main(){
  jcmp.packages.forEach(p => {
    p.Stop()
  }
}
main(); 

Stay informed

By becoming the newest member of our growing forums, we and hundreds of other players will always keep you up to date on everything JC3:MP related.