Example #1
0
        public static void SendToPlayer(object e)
        {
            try
            {
                // Notice shits
                if (FilterMain.DB)
                {
                    // Read the notice message
                    SqlDataReader reader = sqlCon.Return("[" + FilterMain.SUP_DB + "].[dbo].[_GetPlayerNotice]");
                    reader.Read();

                    // Register message
                    string message = reader.GetString(0);

                    // Check message length
                    if (message.Length > 0)
                    {
                        string[] notices = message.Split('|');

                        // Send to first agent
                        AgentContext.NoticeToPlayer(notices[0], notices[1]);

                        // Send to second agent
                        if ((!FilterMain.AGENT_IP2.Equals("0")) && (FilterMain.AGENT_IP2 != String.Empty))
                        {
                            //AgentContext2.NoticeToPlayer(message, )
                        }
                    }

                    // Close reader
                    reader.Close();
                }
            }
            catch { }
        }