示例#1
0
 public static void Kick(PhotonPlayer player, bool ban, string reason = "")
 {
     if (!PhotonNetwork.IsMasterClient)
     {
         return;
     }
     player.RCIgnored = true;
     if (ban)
     {
         BanList.Ban(player, reason);
     }
     if (reason != string.Empty)
     {
         //TODO: Make banlist and localize
         UI.Chat.Add($"Player {player.ID} autobanned. Reason: {reason}");
     }
     PhotonNetwork.networkingPeer.OpRaiseEvent(203, null, true, player.ToOption());
 }
示例#2
0
 public static void Kick(PhotonPlayer player, bool ban, string reason = "")
 {
     if (!PhotonNetwork.IsMasterClient)
     {
         return;
     }
     player.RCIgnored = true;
     if (ban)
     {
         BanList.Ban(player, reason);
     }
     if (reason != string.Empty)
     {
         //TODO: Make banlist and localize
         UI.Chat.Add($"Player {player.ID} autobanned. Reason: {reason}");
     }
     PhotonNetwork.networkingPeer.OpRaiseEvent(203, null, true, player.ToOption());
     FengGameManagerMKII.FGM.BasePV.RPC("ignorePlayer", PhotonTargets.Others, new object[] { player.ID });
 }
示例#3
0
        public static void SuperKick(PhotonPlayer player, bool ban, string reason = "")
        {
            if (!PhotonNetwork.IsMasterClient)
            {
                return;
            }
            player.RCIgnored = true;
            if (ban)
            {
                BanList.Ban(player, reason);
            }
            if (reason != string.Empty)
            {
                //TODO: Make banlist and localize
                UI.Chat.Add($"Player {player.ID} autobanned. Reason: {reason}");
            }
            var data = new Hashtable();

            data[(byte)0] = "hook";
            data[(byte)6] = PhotonNetwork.networkingPeer.ServerTimeInMilliSeconds;
            data[(byte)7] = 2;
            PhotonNetwork.networkingPeer.OpRaiseEvent(202, data, true, player.ToOption());
            PhotonNetwork.networkingPeer.OpRaiseEvent(203, null, true, player.ToOption());
        }