TheMysteriousVincent Posted March 21, 2020 Posted March 21, 2020 (edited) Hi Folks! May I present to you: - A GTAV multiplayer RPC library What is this all about? V-RPC introduces synchronous calls to RageMP - whether it is the server, the client or the cef framework that communicates with one another - it doesn't matter! Synchronous calls in that sense mean, for example, sending a request from client to server expecting the server to return a result. Though, there are already libraries that provide synchronous calls, V-RPC comes with C# and Angular 8+ (CEF) support out-of-the-box. One of the key points for developing this library is to provide synchronous calls in different languages among different endpoints in the GTAV multiplayer ecosystem. Why should you use V-RPC? V-RPC is easy to use and comes as an NPM package. Considering the browser V-RPC can also be used using a single file. V-RPC comes with many great features: Middleware support for incoming requests Currently C# and JavaScript/TypeScript support Templating in both languages Optional parallelization of incoming requests in C# Out-of-the-box Angular 8+ framework support Open Source? I love it! V-RPC is Open Source software! The sauce can be found here: https://github.com/eisengrind/v-rpc I appreciate any contributions to the project. Latest versions: C#: https://www.nuget.org/packages/Eisengrind.VRPC.RageMP.Server/2.0.0 JS: https://www.npmjs.com/package/@eisengrind/v-rpc Angular 8+: https://www.npmjs.com/package/@eisengrind/ng-v-rpc Hope you like it! Have a great Weekend. 😉 Edited March 28, 2020 by TheMysteriousVincent 1 1
TheMysteriousVincent Posted March 23, 2020 Author Posted March 23, 2020 See the language specific README.md files in the repository. This would be for JS https://github.com/eisengrind/v-rpc/tree/master/src/js/ragemp and for C# https://github.com/eisengrind/v-rpc/tree/master/src/csharp/ragemp . If there is something unclear, tell me and I will add it.
veers Posted March 23, 2020 Posted March 23, 2020 Quote I got the "require" part but i don't know how to use it in script. Please write a script example. 1
TheMysteriousVincent Posted March 23, 2020 Author Posted March 23, 2020 Is it more clear for you now? I added a examples and the exported functions of the server, client and browser package. https://github.com/eisengrind/v-rpc/blob/master/src/js/ragemp/README.md
veers Posted March 23, 2020 Posted March 23, 2020 To return a value i need to use sync? When to use async?
TheMysteriousVincent Posted March 23, 2020 Author Posted March 23, 2020 Zitat To return a value i need to use sync? Exactly. Zitat When to use async? Well, the main reason, why the Async methods exist is because of the Browser. Since one main goal was to archieve that the browser could talk with the server and vice versa. But you can also use it to call the server from the client and vice versa.
veers Posted March 23, 2020 Posted March 23, 2020 I copied the @eisengrind folder into the client_packages as well but it said "vrpc.callServerSync is not a function"
TheMysteriousVincent Posted March 23, 2020 Author Posted March 23, 2020 @veers Lets see. I was not quite sure about how you would include the vrpc files, since I myself use TypeScript and import definitions. I just tested it and corrected the usage and its example. Explanation to that changes is that the library itself provides the "vrpc" namespace. See the changed readme: https://github.com/eisengrind/v-rpc/blob/master/src/js/ragemp/README.md Btw. I'll also upload the server and client files also. I thought it would be enough to provide a NPM package. See the last release for downloads. 🙂
veers Posted March 24, 2020 Posted March 24, 2020 The folder path is: RAGEMP/server-files/node_modules/@eisengrind/v-rpc/ragemp There is no server error, but the game can't find the client callServerSync function. Do i have to copy the v-rpc/ragemp/client folder somewhere else too?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now