public static PacketBase Add <T>(this PacketBase packet, T info)
 {
     if (info.GetType().Equals(typeof(string)))
     {
         return(packet.AddString((string)(object)info));
     }
     else if (info.GetType().Equals(typeof(string[])))
     {
         return(packet.AddStringArray((string[])(object)info));
     }
     else if (info.GetType().Equals(typeof(float)))
     {
         return(packet.AddFloat((float)(object)info));
     }
     else if (info.GetType().Equals(typeof(Vector3)))
     {
         return(packet.AddVector((Vector3)(object)info));
     }
     else if (info.GetType().Equals(typeof(NetworkInstanceId)))
     {
         return(packet.AddNetwork((NetworkInstanceId)(object)info));
     }
     else if (info.GetType().Equals(typeof(bool)))
     {
         return(packet.AddBool((bool)(object)info));
     }
     else if (info.GetType().Equals(typeof(Color)))
     {
         return(packet.AddColor((Color)(object)info));
     }
     else if (info.GetType().Equals(typeof(int)))
     {
         return(packet.AddInt((int)(object)info));
     }
     else if (info.GetType().Equals(typeof(int[])))
     {
         return(packet.AddArrayInt((int[])(object)info));
     }
     else if (info.GetType().Equals(typeof(TypeOfGun.myType)))
     {
         return(packet.AddType((TypeOfGun.myType)(object) info));
     }
     else
     {
         return(packet);
     }
 }