diff --git a/api/AltV.Net.Async/AsyncCore.cs b/api/AltV.Net.Async/AsyncCore.cs index c064501cd..60570372a 100644 --- a/api/AltV.Net.Async/AsyncCore.cs +++ b/api/AltV.Net.Async/AsyncCore.cs @@ -986,12 +986,14 @@ public override void OnScriptRPCEvent(IntPtr eventpointer, IPlayer target, strin if (!ScriptRpcAsyncEventHandler.HasEvents()) return; - Task.Run(async () => + var task = Task.Run(async () => { var clientScriptRPCEvent = new AsyncScriptRpcEvent(target, answerId); await ScriptRpcAsyncEventHandler.CallAsync(@delegate => @delegate(clientScriptRPCEvent, target, name, objects, answerId)); }); + Task.WaitAll(task); + if (UnansweredServerRpcRequest.Contains(answerId)) { target.EmitRPCAnswer(answerId, null, "Answer not handled"); diff --git a/runtime b/runtime index 1831c4cb8..88a8e39bd 160000 --- a/runtime +++ b/runtime @@ -1 +1 @@ -Subproject commit 1831c4cb871c91ee9038e3611ea48cbe274f602e +Subproject commit 88a8e39bdd79f9c3a602017fc75e6285d6bf78c8