Update README.md

This commit is contained in:
Micah Allen 2018-11-01 08:47:02 -04:00 committed by GitHub
parent a0d85686a4
commit e1f7043d87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,11 @@
**rage-eventbus** simplifies two-way communication between the RAGE Multiplayer server, client, and browser instances. **rage-eventbus** simplifies two-way communication between the RAGE Multiplayer server, client, and browser instances.
It can be used as a full-on replacement for RAGE's built-in `mp.event` API, providing consistency and clarity. It can be used as a full-on replacement for RAGE's built-in `mp.event` API, providing consistency and clarity.
### Examples ---
#### Server to Client ## Examples
### Server to Client
**Situation:** The server wants to ask a specific player if they are currently running. **Situation:** The server wants to ask a specific player if they are currently running.
@ -36,7 +38,7 @@ rbus.on('getIsRunning', () => mp.players.local.isRunning);
--- ---
#### CEF to Server ### CEF to Server
**Situation:** A CEF instance wants a list of all vehicle license plates directly from the server. **Situation:** A CEF instance wants a list of all vehicle license plates directly from the server.
@ -66,4 +68,4 @@ rbus.on('getAllLicensePlates', () => {
With `rage-eventbus`, CEF can directly communicate with the server and vice-versa. With `rage-eventbus`, CEF can directly communicate with the server and vice-versa.
###### In vanilla RAGE, you would have to set up multiple events for sending/receiving on the client-side, call them from CEF, then resend the data to the server and back. It's a hassle. ###### In vanilla RAGE, you would have to set up multiple events for sending/receiving on the client-side, call them from CEF, then resend the data to the server and back. It's a hassle.