NanoBob Posted November 6, 2019 Author Share Posted November 6, 2019 A new version of the core has been released! Async RPCs A new feature called "Async RPCs" has been implemented. This allows you to return a value over an RPC, and use `async / await` in order to use it, so you will no longer need to bounce RPCs back and forth to get a value from the server to the client or vice versa. Example: Server: RpcManager.Instance.RegisterAsyncRPC<SingleCastRpc<string>, EmptyRpc>("Async.RequestMapName", (player, request) => { return new SingleCastRpc<string>(GameServer.Announcement.MapName); }); Client: Task.Run(async () => { string name = (await RpcManager.Instance.TriggerAsyncRpc<SingleCastRpc<string>>("Async.RequestMapName", new EmptyRpc())).Value; ChatBox.WriteLine($"Map name: {name}"); }); Updating In order to update an existing project use `slipe update-core` 1 Link to comment
komal Posted November 8, 2019 Share Posted November 8, 2019 your create new MTA with all the codes , thank you using System; namespace Vehicle { public void createVehicle(VehicleModel model, Vector3 position) } createVehicle(311,111,222,12); } To Lua local system = {} system.Vehicle=function() createVehicle(311,111,222,12); end system.Vehicle() Link to comment
Zorono Posted August 18, 2020 Share Posted August 18, 2020 Thanks dude, that looks inspiring for me... Link to comment
The_GTA Posted July 22, 2021 Share Posted July 22, 2021 Fascinating approach! Converting C# to Lua is a genius idea and craftsmanship. Looking forward to more. I wonder, which language is easier to teach to newcomers... C# or Lua? Development is a lot about models and converting those to code... A true OOP language like C# is ideal for that. Thank you! Link to comment
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