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.
Sometimes, you want different Packages communicating with each other. In JC3:MP, you can do this using the EventSystem
(Server documentation, Client cocumentation).
You can use jcmp.events.AddEvent
and jcmp.events.CallEvent
to communicate between two server packages. See the EventSystem documentation for more information and examples.
Communication between Client Packages works just like on the Server. Check out the EventSystem documentation for the client.
The EventSystem
also provides you a way to send events from the Server to the Client and vice-versa.
The Server sends an Event using jcmp.events.CallRemote
, while the Client receives the event by registering a handler using jcmp.events.AddRemoteCallable
. Please read the documentation for examples.
The Client sends an Event using jcmp.events.CallRemote
, while the Server receives the event by registering a handler using jcmp.events.AddRemoteCallable
. Please read the documentation for examples.
The Client sends an Event using jcmp.ui.CallEvent
, while the CEF UI receives the event by registering a handler using jcmp.ui.AddEvent
. You can find the Client UI Event functions here and the CEF functions here.
The CEF UI sends an Event using jcmp.CallEvent
, while the Client receives the event by registering a handler using jcmp.ui.AddEvent
.
Use the jcmp.AddEvent
and jcmp.CallEvent
from the CEF jcmp
object respectively. Documentation here.
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.