Provide rpc api for other mods

This commit is contained in:
IQuant 2024-10-12 14:29:09 +03:00
parent d5e7f54ef1
commit 3e93f3741c
3 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,11 @@
local ew_api = {}
-- Creates an rpc namespace. See ew_api_example for how to use it.
ew_api.new_rpc_namespace = net.new_rpc_namespace_with_id
-- In rpc, returns player_data of a peer who called that rpc.
function ew_api.rpc_player_data()
return ctx.rpc_player_data
end
return ew_api