leonardssh / rage-rpc Goto Github PK
View Code? Open in Web Editor NEWA universal, asynchronous RPC implementation for RAGE Multiplayer
Home Page: https://rage.mp
License: MIT License
A universal, asynchronous RPC implementation for RAGE Multiplayer
Home Page: https://rage.mp
License: MIT License
At the moment, properties from ProcedureListenerInfo
cannot be used in the rage environment because they are hardcoded and do not have all the required properties and methods.
PlayerMp
with a generic type, with default any
, and let the developer pass as argument the corresponding interface for type-safe.export declare type ProcedureListener<T = any, K = any> = (args: any, info: ProcedureListenerInfo<T, K>) => any;
export declare interface ProcedureListenerInfo<T = any, K = any> {
environment: string;
id?: string;
player?: T;
browser?: K;
}
function myFunction({ player /* :any */ }: rpc.ProcedureListenerInfo) { ... }
// should be
function myFunction({ player /* :PlayerMp */ }: rpc.ProcedureListenerInfo<PlayerMp>) { ... }
Hello, I am using your template in my project and when calling an rpc event in CEF from the server side, a PROCEDURE_NOT_FOUND error occurs.
If I try to call an event from CEF on the server, then the event is called, but the Promise is not returned.
When trying to trigger events and return a Promise from the server to the client and vice versa, everything works fine.
CEF is collected via Vue-CLI
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.