/// <summary>
        /// Отправка сообщений на сервер.
        /// </summary>
        /// <param name="roomType"></param>
        /// <param name="message"></param>
        /// <param name="recipientId"></param>
        /// <returns></returns>
        public string ChatMsg(RoomType roomType, string message, int recipientId)
        {
            //cmd: chatmsg roomtype id Message to send
            //response example: STATUS=1
            //chatmsg 0 -1 msg      (all)
            //chatmsg 1 cid msg     (coalition message, 0 - neutral, 1 - allies, 2 - axis)
            //chatmsg 2 cid msg     (country message, 0 - all)
            //chatmsg 3 cid msg     (private message, cid - client id from playerlist)
            string command;

            switch (roomType)
            {
            case RoomType.All:
                command = string.Format("chatmsg 0 -1 {0}", message);
                break;

            case RoomType.Coalition:
                command = string.Format("chatmsg 1 {0} {1}", recipientId, message);
                break;

            case RoomType.Country:
                command = string.Format("chatmsg 2 {0} {1}", recipientId, message);
                break;

            case RoomType.ClientId:
                command = string.Format("chatmsg 3 {0} {1}", recipientId, message);
                break;

            default: return(string.Empty);
            }
            Execute(command);
            return(lastCommandResult);
        }
Beispiel #2
0
 set => SetPixel(co, value);
 public AgentTypeDescriptor(co instance)
 {
     _internal = instance;
 }