You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
If you check out my #41 you can see, I use triggers, because the current RPC system is really weird.
Describe the solution you'd like
I'd like to suggest make a new RPC system it will better, simple and it will contains documentation.
What's the actual problem with the RPC system? This issue isn't really clear about what the problem is.
When I tried to use it. I had got a weird function behavior. For me server. did not make a call from a server (maybe I made it incorrectly). And about clientCall can we make something which can return data from client from the function? Or we will got a problem with asynchronous operations?
Server RPC
I think you need to do server:setPlayerName(localPlayer, "test") with the :. Did that not work?
Client RPC
clientCall -- we could implement something by incorporating coroutines. The caller would also have to specifically opt into it, as usually we don't care about the return value. We can call it client.async:stuff. But it might be a wee bit complicated as it would freeze the entire AMX virtual machine. Ideally we add stuff to mtasa-blue to expose other properties that are synced (e.g. reloading), or do the syncing ourselves.
Client RPC: doing the syncing ourselves
Since amx is statically compiled, perhaps we could do some pre-analysis to check what functions are called (if possible), so we don't sync extra information unnecessarily.
Server RPC
I think you need to do server:setPlayerName(localPlayer, "test") with the :. Did that not work?
About Server RPC. I'll check it out later. Maybe it was a problem of my code.
Ideally we add stuff to mtasa-blue to expose
About Client RPC
I hope it will be important for mtasa-blue. There are few features which we must add to mtasa-blue I suppose. I can set up a label for issues which contains this depension from mtasa-blue and I'll be create issues there.
Activity
qaisjp commentedon Jun 18, 2020
What's the actual problem with the RPC system? This issue isn't really clear about what the problem is.
Disinterpreter commentedon Jun 18, 2020
When I tried to use it. I had got a weird function behavior. For me
server.did not make a call from a server (maybe I made it incorrectly). And aboutclientCallcan we make something which can return data from client from the function? Or we will got a problem with asynchronous operations?qaisjp commentedon Jun 19, 2020
Server RPC
I think you need to do
server:setPlayerName(localPlayer, "test")with the:. Did that not work?Client RPC
clientCall -- we could implement something by incorporating coroutines. The caller would also have to specifically opt into it, as usually we don't care about the return value. We can call it
client.async:stuff. But it might be a wee bit complicated as it would freeze the entire AMX virtual machine. Ideally we add stuff to mtasa-blue to expose other properties that are synced (e.g. reloading), or do the syncing ourselves.Client RPC: doing the syncing ourselves
Since amx is statically compiled, perhaps we could do some pre-analysis to check what functions are called (if possible), so we don't sync extra information unnecessarily.
Disinterpreter commentedon Jun 19, 2020
About Server RPC. I'll check it out later. Maybe it was a problem of my code.
I hope it will be important for mtasa-blue. There are few features which we must add to mtasa-blue I suppose. I can set up a label for issues which contains this depension from mtasa-blue and I'll be create issues there.