Пример #1
0
 public void RPC(string func, params object[] args)
 {
     try
     {
         if (CheckPeer())
         {
             _netView.RPC(func, uLink.RPCMode.Server, args);
         }
     }
     catch (Exception e)
     {
         if (LogFilter.logError)
         {
             Debug.LogErrorFormat("{0}\r\n{1}\r\n{2}", GetType(), e.Message, e.StackTrace);
         }
     }
 }
Пример #2
0
 /// <summary>
 /// Replies to the player with the specified message
 /// </summary>
 /// <param name="message"></param>
 /// <param name="player"></param>
 /// <param name="args"></param>
 private static void Reply(string message, PlayerInfos player = null, params object[] args)
 {
     if (player == null)
     {
         Interface.Oxide.LogInfo(message, args);
         return;
     }
     ChatNetView.RPC("NET_Receive_msg", player.NetPlayer, "\n" + string.Format(message, args), chat_msg_type.standard, player.account_id);
 }
Пример #3
0
    void ServerBufferLastState()
    {
        uLink.Network.RemoveRPCsByName(NetworkView.viewID, "LastState");

        NetworkView.RPC("LastState", RPCMode.Buffered, Progress, FlagOwner, AreaOwner, AlmostOwner);
    }