Jump to content
RAGE Multiplayer Community

How to throw data as callback


Recommended Posts

Gretings,

I stack with a problem.

I have CEF + SPA, and I want to update some data. (Note: TypeScript + NodeJs)

So I have to call function mp.callRemote("serverEventName", args). But how to return data into this context?

Common answer: server function player.call("clientEventName", data). But how to passthrough this data?

 

I see this scheme:

GTA <= RAGE Event Manager => CEF => SPA

So If I do player.call(someData) I stack with this:

GTA <= RAGE Event Manager  => NEW CEF. Is there way to pass data to existing CEF also to exact context (might be callback) ???

Link to post
Share on other sites
Posted (edited)

Use socket.io ? 

Emit socket event from CEF => Server.

Then emit from SERVER => CEF back

 

And all while all this happens make the CEF wait for the final data to be sent back.

Edited by Willdurkumpf
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...