Want to improve the docs? Take a look at scripting-api-data!
Found a bug? jc3mp/bugs is a good place to let us know.
The global instance of the JCMPNamespace.
This class does not have any properties.
Listens on a event called from client packages or other UIs
returns: undefined
Name | Type | Description |
---|---|---|
name | string | event name |
handler | function | event handler |
jcmp.AddEvent('MyTestEvent', function(x) {
console.log(`MyTestEvent: x is ${x}`); // prints a message to the CEF console
});
Calls another UI event or client package event
returns: undefined
Name | Type | Description |
---|---|---|
name | string | event name |
...args | any | optional event arguments |
jcmp.CallEvent('MyTestEvent', x);
Calls the given event on a client package that registered an event using WebUIWindow#AddEvent
returns: undefined
Name | Type | Description |
---|---|---|
name | string | event name |
...args | any | optional event arguments |
jcmp.CallLocalEvent('MyTestEvent', x);
Shows the Cursor (refcounted)
jcmp.ShowCursor();
hides the Cursor (refcounted)
jcmp.HideCursor();
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.