public static void RequestCreateToolbar(PlayerId pid) { var msg = new PlayerToolbarCreatedMsg(); msg.ClientSteamId = pid.SteamId; msg.PlayerSerialId = pid.SerialId; Sync.Layer.SendMessageToServer(ref msg); }
static void OnNewToolbarRequest(ref PlayerToolbarCreatedMsg msg, MyNetworkClient sender) { var playerId = new MyPlayer.PlayerId(sender.SteamUserId, msg.PlayerSerialId); if (MySession.Static.Toolbars.ContainsToolbar(playerId)) { return; } var toolbar = new MyToolbar(MyToolbarType.Character); MySession.Static.Toolbars.AddPlayerToolbar(playerId, toolbar); }
static void OnNewToolbarRequest(ref PlayerToolbarCreatedMsg msg, MyNetworkClient sender) { var playerId = new MyPlayer.PlayerId(sender.SteamUserId, msg.PlayerSerialId); MySession.Static.Toolbars.CreateDefaultToolbar(playerId); }
static void OnNewToolbarRequest(ref PlayerToolbarCreatedMsg msg, MyNetworkClient sender) { var playerId = new MyPlayer.PlayerId(sender.SteamUserId, msg.PlayerSerialId); if (MySession.Static.Toolbars.ContainsToolbar(playerId)) return; var toolbar = new MyToolbar(MyToolbarType.Character); MySession.Static.Toolbars.AddPlayerToolbar(playerId, toolbar); }